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 migrated our old blog to the same server in the main root. For some reason a couple of images won't load up any more even when they are in the /uploads/ folder. When going to them as a URL I'm getting 404's but I can download them straight from my FTP (and work).

Does anyone know what the problem might be?

I was thinking of my .htaccess file but I'm not sure it this is the problem:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^dreamix-studio.com [nc]
rewriterule ^(.*)$ http://www.dreamix-studio.com/$1 [r=301,nc]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
share|improve this question

2 Answers 2

Check the image file permissions. And check the path in page source to be sure the images are in the correct location.

share|improve this answer
    
Hi Songdogtech, I already checked and changed permissions. The path seems to be correct, even when checking the FTP root. –  rwzdoorn Dec 10 '12 at 15:23

You probably need to update your wp_posts table with the new URL of the images. Look for the "guid" field for all posts of post_type "attachment". It may have GUID that points to older host like http://old-host.com/blah/blah/image.jpg. IF IT IS, change it to new host like http://new-host.com/blah/blah/image.jpg.

share|improve this answer
    
The GUID is not the URL. It should not be changed. –  toscho Dec 10 '12 at 13:56
    
For me it is. Yes, I agree, it should not be changed. But I faced same problem while moving few of my WP installations and fixed them by correcting their GUID. –  M-R Dec 10 '12 at 13:59
    
Eventually the GUID will not even be a valid URL. Please do not recommend to use it as URL. –  toscho Dec 10 '12 at 14:05
    
updated the answer. It will clear up what I was talking about. Thanks for pointing out that it was bit ambiguous. –  M-R Dec 10 '12 at 14:29
    
The GUID is never used to generate permalinks. Changing it cannot affect the asker’s problem, the only effect might be that all feed item get a new GUID even if the didn’t change. –  toscho Dec 10 '12 at 14:46

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.