Skip to content

Moved your WordPress site and images aren’t showing?

Moved your WordPress site and images aren’t showing?

The Problem…

I ran into this issue today at work where I had just moved a client’s website from http://www.domain-name.com/staging to http://www.domain-name.com/ and found that none of the 1,000 images that the client had uploaded were working on the front end. You couldn’t even access the directly with a working URL.

Skip this, show me the solution.

My Attempted Fixes:

Check src=”” Attribute was correct

I inspected the code to make sure that the <img> tag had the correct URL in the src=”” attribute. I also checked any missing background-images to ensure they had the right url. The images all had the correct URL:

<img src="http://www.domain-name.com/wp-content/uploads/2013/08/foobar.png" />

The background images were also correct with:

.foo {
    background-image: url('http://www.domain-name.com/wp-content/uploads/2013/08/foobar.png') 0 0 no-repeat;
}

Checking Images Were Uploaded

For peace of mind, I opened up FileZilla to check that the images were uploaded to the server and that they were in the correct directory with the right file name. They were.

Check the WordPress URL’s

Following the two sanity checks above, I proceeded to check that the WordPress Home URL and the WordPress Site URL were correct. I checked the following lines in my wp-config.php file:

define('WP_HOME','http://www.domain-name.com');
define('WP_SITEURL','http://www.domain-name.com');

The images were still not showing up correctly.

Searching Google…

After installing and configuring a couple of plugins such as WordPress Flash Uploader and Velvet Blue’s Update URL’s plugin, the images were still not showing.

What’s more the server had started reporting error 500’s due to the Flash Uploader plugin (beware this is quite an intensive plugin)! Progress was slow but after a couple of hours searching around Google, trying different search queries and swearing at the computer (and in particular, WordPress), I found this article.

The Working Solution:

Uninstalling User Access Manager

I read through the thread and was losing hope until I got to the bottom reply. It mentioned User Access Manager (UAM) as a possible source of the issues. Upon reading this, I remembered another WordPress build behaving in a similar way when we moved it from a /staging/ url to a standard URL.

This website also had UAM installed but that time I just re-uploaded all of the images (there weren’t that many).

I promptly deactivated the UAM plugin and a voilà the images were appearing.

No comments

Add a comment

Start the conversation.
Be the first to comment.

Popular topics

On development

On best practice

On content strategy