I have a baking blog that I run and recently I have changed the url.

The problem I have now is when I add images to the posts or libary they are not showing/rendering.

The uploading steps go through OK, but the image does not render.

Can you assist, I just don't where I have gone wrong.


Based on the link you posted as a comment to your original question this looks like a permissions issue which could be the result of several things.

Along with the domain change did you change servers too?

First step I think would be ensuring that all of the uploads are readable. chmod all files and directories in wp-content/uploads to 755 or 766.

In terminal this would be done by SSH-ing into your server, navigating to the uploads directory cd wp-content/uploads/ then running chmod -r 755 *.

  • I'm still having trouble with so I did a bit more digging and found this code: [code] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?your-site.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?your-other-domain.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ i.imgur.com/g7ptdBB.png [NC,R,L] [/code]do you have an idea how I could work this, as it didn't work for me. – jelly46 Nov 24 '13 at 19:41
  • tried this but still nothing – jelly46 Nov 24 '13 at 19:42
  • I don't see how that .htaccess code would be beneficial to you here. Can you confirm that that the directory, parent directories and the image that was uploaded all have the appropriate permissions to be readable by anyone? – Joey Yax Nov 25 '13 at 18:18

Wordpress uses relies on your domain to point to a specific path for your images. You can do a search and replace in your database to replace the old image paths, i.e. http://oldpath.com/uploads/image1.jpg (old path) http://newpath.com/uploads/image1.jpg (new path)

If you do not trust yourself well enough with mysql, you can use a plugin: You can search for the plugin on Wordpress.org called Serach and Replace. NB: But please backup your database first.

The safest and last option is to go through all your posts and manually update the images urls (as above). Switch to text mode and update the links with your new path / domain.

  • If editing the database manually be careful when updating addresses. Many values are stored in serialized arrays and if the number of characters in the url changes it will break the entire array. I haven't used the plugin mentioned, but would assume it handles these arrays gracefully. Alternatively, and while not a plugin I have used this: interconnectit.com/products/… with success in the past. – Joey Yax Nov 13 '13 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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