I have moved my website to new hosting.

The site was originally in public_html/websites/dcworldholding/newsite on my server, on the new server its in public_html/

Some images are showing but the majority are not, i've tried updating url's and rerferences in the database, and regenerating thumbnails and neither works.

I've also checked the server and the images are definitley there, but when i enter the direct url to the image, it 404's.

any ideas would be helpful

thanks in advance!

I wondered if anyone might have other ideas?

1 Answer 1


The issue is that images URLs are stored in the database as a full URL; domain and all.

When you move a site to a new URL, that doesn't update the URLs in the database. So a 'search and replace' process is needed to go through the database and replace your www.olddomain.com with your www.newdomain.com .

I usually use the "Better Search and Replace" plugin to do that. It works well (and easy and fast) to take care of the problem. You could also do it manually with MySQL commands, but a plugin is much faster.

A backup of your database before is always a good idea.


You can verify in the generated page code source, or with Developer Tools (usually F12, then look at the Network tab and reload the page; see the URLs that are being requested for the images).

If the images are still 'scr' from the old domain, then that's how the URL is stored in the database. So the Search/Replace is needed.

Look at an existing Media item; you'll see that one of the fields (meta values) is the full URL of the media item. That comes from the database, so a Search/Replace will fix that.

It's possible that it is a caching issue on the phone or device. Restarting the device ought to fix that. But you can tell via Developer Tools, Network (or the page source) the URL being specified for the media item.

  • Hi Rick, i thought this too but i've already tried this - the domain is the same jsut pointing to a new server. the site's working fine on my phones, it just seems to be in Chrome - but i didnt have this problem on the old server.
    – reigns1989
    Commented Oct 29, 2018 at 21:31
  • See added info on my answer. Commented Oct 29, 2018 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.