• I transferred my wordpress website from localhost to hosting. Some images and a video are not getting displayed when i open my website horizonmineralwater.com on laptop and mobile phone.

    I used “broken link checker” plugin and “drlinkcheck.com” to check my website for broken links.

    The plugin showed me 3 broken links (all 3 of these links were of the images that were not being displayed.). The issue with these links was that they were using local host(https://localhost/horizon-official/wp-content/uploads/2019/09/select3.png”) instead of (http:/horizonmineralwater.com/wp-content/uploads/2019/09/select3.png”) I edited the links and repaired them.

    After I was done with the plugin, i checked my website on drlinkcheck.com and it showed me 8 broken links and almost all of them except for one or two are the links of the images and the video that are not being displayed. These links were having the same problem(localhost) as mentioned above in the case of “broken link checker” plugin. Surprisingly, drlinkcheck.com showed me broken links that i had already repaired and edited with “broken link checker” plugin.

    Now If i run view page source (CTRL+U) on my website`s home page and search “localhost” through CTRL+F, i am getting the same problem although I have edited and repaired the links through the plugin:

    Finger on a button

    Cart

    Delivery Truck

    <video class=”elementor-video” src=”https://localhost/horizon-official/wp-content/uploads/2019/10/Fresh-Water.mp4&#8243; autoplay=”” controls=”” muted=”muted” controlsList=”nodownload”></video>

    I have checked the links of these images and the video inside elementor. They seem fine over there(no localhost). I know that i have to replace “localhost” with “horizonmineralwater.com” but HOW DO I DO THAT?
    Its the 2nd day I have been stuck on this problem. Any help, suggestion, guidance would be IMMENSELY appreciated.

    • This topic was modified 5 years, 1 month ago by hannanbaig.
Viewing 9 replies - 1 through 9 (of 9 total)
  • You need to remember that ‘localhost’ must be changed to a link to the image on your host.

    So…

    https://localhost/horizon-official/wp-content/uploads/2019/10/Fresh-Water.mp4
    
    needs to change to 
    
    https://horizonmineralwater.com/wp-content/uploads/2019/10/Fresh-Water.mp4

    and

    https://i2.wp.com/localhost/horizon-official/wp-content/uploads/2019/09/select3.png
    
    needs to change to
    
    https://horizonmineralwater.com/wp-content/uploads/2019/09/select3.png

    etc…

    And I’d turn off that Jetpack Photon Accelerator (or whatever they call that now) until you have this fixed properly. That’s probably just adding to the confusion.

    This is one of the reasons I don’t like creating whole sites on a local host unless the local host is synced to the public WordPress!

    Thread Starter hannanbaig

    (@hannanbaig)

    JNashHawkins TYSM for the reply

    I have checked the links of the images and the video in the media gallery and they all have “horizonmineralwater” instead of “localhost”
    Similarly, I have checked the links of the images and the video inside elementor and they all have “horizonmineralwater” instead of “localhost”

    As i mentioned in my last pararaph, I know that i have to replace “localhost” with “horizonmineralwater.com” but HOW DO I DO THAT?

    Moderator bcworkz

    (@bcworkz)

    It sounds like some “localhost” data is still persisting in the DB somewhere. When updating moved/copied DB URL domains, it’s recommended a plugin like Better Search and Replace be used, principally because it correctly alters serialized data which most search/replace tools would fail to do correctly.

    The one place that this tool cannot reach to update is any data that’s been encoded. I’ve encountered at least one theme that Base64 encoded data. Such data is best updated through the theme settings unless you understand well how Base64 encoding works and can concoct the appropriate encoded search strings and replacements.

    Thread Starter hannanbaig

    (@hannanbaig)

    @bcworkz Better Search and Replace didnt work

    If you’ll look at what I posted, the second URL works but the links you say don’t work (pointing at localhost) are probably still in your articles. You might also notice there’s a directory under ‘localhost’ in the broken URLs.

    Better Search and replace needs to be told to find the string ‘localhost’ with the directory added in order for it to replace that with your domain name.

    The final results have to be completely correct. It’s a computer and computers can’t figure out things like people do so you need to be very explicit with what you tell it.

    This is one of the reasons I don’t like creating whole sites on a local host unless the local host is synced to the public WordPress!

    • This reply was modified 5 years, 1 month ago by JNashHawkins.
    • This reply was modified 5 years, 1 month ago by JNashHawkins.
    Thread Starter hannanbaig

    (@hannanbaig)

    @jnashhawkins You are telling me to replace “https://localhost/horizon-official/wp-content/uploads/2019/09/select3.png” with https://horizonmineralwater.com/horizon-official/wp-content/uploads/2019/09/select3.png instead of https://horizonmineralwater.com/wp-content/uploads/2019/09/select3.png using “Better Search and replace” plugin.
    Right?
    I have tried replacing with https://horizonmineralwater.com/wp-content/uploads/2019/09/select3.png and it didnt work.

    And one thing more. My website appears totally fine (with all the images and videos displaying) on the laptop on which I developed it. But it doesnt work fine on other laptops and mobile devices

    • This reply was modified 5 years, 1 month ago by hannanbaig.
    • This reply was modified 5 years, 1 month ago by hannanbaig.

    No, I’m saying to replace localhost/horizonofficial with horizonmineralwater.com
    when you do a search and replace. That should fix anything in your database with the proper URL when done.

    If you’ll click on the three links you just typed in above you should find only the last one works… so isn’t that the one you want your post to call?

    I HATE localhosts!!! Well, almost!

    • This reply was modified 5 years, 1 month ago by JNashHawkins.
    Thread Starter hannanbaig

    (@hannanbaig)

    @jnashhawkins I have replaced localhost/horizonofficial with horizonmineralwater.com and it still isnt working

    You might try flushing your cache just in case…

    But, you have this link on your home page https://localhost/horizon-official/wp-content/uploads/2019/10/Fresh-Water.mp4
    for a video so that hasn’t been fixed according to what I see so maybe you should look at your home page via that editor you are using and correct that since the search and replace missed it somehow.

    That really should be https://horizonmineralwater.com/wp-content/uploads/2019/10/Fresh-Water.mp4
    in the page itself… it is not right now. Flush the cache or fix that in elementor.

    Then look at any other image links that don’t work and do the same.

    • This reply was modified 5 years, 1 month ago by JNashHawkins.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Images and Video not being displayed after transfer from localhost to live serve’ is closed to new replies.