Support » Fixing WordPress » Images not showing

  • I moved a large wp website (100+ pages) from the backend of an old html site to the root directory. After considerable problems I got most of the site working, but have this problem:
    The image galleries are working but the single images are not showing. Initially there is an empty box, where the image should be, but after s while the box disappears leaving just an empty borderless space.
    I have tried turning off and on plugins in case there was a conflict there. I have checked images in admin dashboard and the single images are there.
    Can anyone help ??????

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moving the site usually won’t update the image references embedded in posts, I’m afraid. So, the image references embedded in your posts are pointing to where the images used to be, rather than where they are now.

    I’m imagining there’s a number of solutions to this issue you could try…

    • Go through each and every post and manually update the image URLs to reflect the new site structure (blech!)
    • Add an .htaccess rule that points references for the old URL to the new URL, assuming they’re on the same server.
    • Use a plugin or write a script that can go through your database records and find-replace old URL references with the new ones. You’ll want to test this in a sandbox first before using this on your production server. (Related forum post:

    That said, I can’t say I have much experience with the latter two. The one time I’ve run into this issue, the number of images were relatively low, so manually going through posts was trivial.

    I hope this helps!

    The path seems to be OK and is directing to the new and not the old.

    Below is an example.
    Current path:

    Old Path would have been: (with an extra wp because it was on the backend of old html site).

    The image does not show blank area does. 🙂

    I am still perplexed.


    Actually as well as the box around the image showing, also the caption/title below the image is showing, it is on the image itself that is missing!!!!!!

    It’s not the current path that’s the issue… it’s the fact that none of the URLs for any images you added to your posts would have been updated during the migration from directory to directory.

    When you add an image to a page or post, the image is included as a sort of reference: a source (SRC) URL is given that points to the image’s location. When WordPress is moved from directory to directory, the image files move, but these pointers don’t change. Hence, files not found.

    Put another way, it’s as if someone at the local library moved the photo books over to another wing but didn’t change around all the directional signs. Everyone would go looking in the old location for the books, but wouldn’t find what they were looking for.

    An example from the HTML for (shortened)
    <div id="attachment_1662" {...}><img {...} src="" {...}></a><p class="wp-caption-text">Coochie on the beach with Victoria point in the background. Courtesy State Library QLD.</p></div>

    Note in the above example the SRC attribute, which is pointing to the old directory. These are the URLs you’re going to want to change by removing the “/wp” portion from the file path. Because most of your images are going to be following the same pattern, you can probably use the aforementioned plugin to do a find-replace on the post/page content of every post/page (I’d try searching for src=””, replacing with “”).

    I hope this helps!

    It hadn’t occurred to me to check the html coding on the pages involved. When I checked that I did see that the images had wp twice. Now they are working fine. Thanks you very much for putting in the time to help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Images not showing’ is closed to new replies.