Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Can you confirm that the image actually gets uploaded? –  Joey Yax Nov 12 '13 at 22:14
    
Yes it get uploaded by the look of it but i doesn't render in the library or page, if you click to edit it will show it. I have also followed these instructions as i have changed the URL recently codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php and it is still not working. –  jelly46 Nov 12 '13 at 22:37
    
Could you post link to your page? –  Krzysiek Dróżdż Nov 13 '13 at 6:43
    
Can you give us an example URL to look at? It could be some hard-coded links in your template –  TomC Nov 13 '13 at 9:06
    
add comment

2 Answers

up vote 0 down vote accepted

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 *.

share|improve this answer
    
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
add comment

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.

share|improve this answer
    
Thanks Archie I will try and let you know. –  jelly46 Nov 13 '13 at 9:27
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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