I've recently moved a website from one hosting to another and the website is running in perfect order, but for one issue.

All the images on the website that were uploaded from the previous hosting aren't showing at all. Nothing on the Media page is showing either. If the images were broken I would see an icon indicating they're broken, but I can only see the default WordPress icon for a placeholder.

The permissions on the old and new images seem to be exactly the same: enter image description here

When I upload a new image on the new hosting it's uploading perfectly fine and also displaying perfectly fine. What can be the issue here?

Below a screenshot of the current status on the Media page: WordPress Media page with broken images

PS: For what it's worth, I'm also using Cloudflare on this website, but have the caching turned of. So it goes directly to the original hosting without loading any cached data on the Cloudflare servers.

1 Answer 1


I had a friend run into that same issue before and I was able to fix it by doing a DB repair. Have you tried that yet?

If not add this to wp-config.php

define('WP_ALLOW_REPAIR', true);

Then make sure you're logged in and visit yoursite.com/wp-admin/maint/repair.php

If that doesn't work can you post what is shown in your htaccess files? Could be an issue there...

Here's someone with the same question, but that was never answered.

Also, when you click on one of those images what does it look like?

media uploader wordpress

What is the file type shown? And if you copy and paste the actual url of the image in the browser does it work? It could be registering the wrong file type. For example, I know that some CDN's use webp images which is somewhat of a newer technology and I'm not positive that wp would recognize those.

The last option I can think of is making sure your database prefix hasn't changed. In your old site if your wordpress config had this: $table_prefix = 'wp_'; and then you exported your content to your new site which had, say, $table_prefix = 'xyz'; this would cause the issue you're having because for instance wp_posts would have been changed to xyzposts. You can fix this by exporting your old sql posts and bulk manually changing the prefix with grep / find in the terminal or some sort of editor like sublime.

  • 1
    Thanks, you pointed me in the right direction. I did change the table_prefix in the database and the config file when moving the site over to improve on the site's security. Backtracked my steps and followed this guide to replace the table prefix: wpbeginner.com/wp-tutorials/…
    – Mr.Mark
    Commented Mar 10, 2016 at 3:17

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.