247 pointsWPMU DEV ExpertI'm new here
damianedwards
Member
—
22nd June 2010 (1 year ago)
Hi,
I have just updated to 3.0, and whilst everything else has gone smoothly, the only problem I have now is that all of the images in my media library have gone.
I have just updated to 3.0, and whilst everything else has gone smoothly, the only problem I have now is that all of the images in my media library have gone.
@damianedwards: Forgive me asking these basic questions but did you:
1. Copy over the entire wp-contents folder when you upgrade - if so you overwrote your themes and images
2. Have you checked your images are on your sever?
3. Have you checked your permissions on your server for that folder?
You haven't changed your .htaccess file. You need to follow all the upgrade instructions - I believe the htaccess change for media and images is one of the last ones.
I have just checked, and whilst I copied over the wp-contents folder, it only seems to have added a new theme and a couple of other things to the already existing file - all of the previous theme that I added are still there and seem to be the same as before I updated.
Can you load the images in the browser by putting in there real locations? I.e. The blogs.dir path? Do they load in the browser with the files pretend path?
If no to the first, then it may be a permissions issue. If yes to the first and no to the second, it looks like an ms-files issue.
I saw a similar thing, even though my .htaccess was modified correctly. Somehow, some of the files in blogs.dir did not survive the upgrade process, so I had broken image links in many blogs including blog/site 1.
Cracking open the backup I made before the upgrade, and copying over the old blogs.dir files seems to have fixed it. I think I'll make another backup now. :-)
Responses (11)
Theme Designer — 22nd June 2010 (1 year ago) #
@damianedwards: Forgive me asking these basic questions but did you:
1. Copy over the entire wp-contents folder when you upgrade - if so you overwrote your themes and images
2. Have you checked your images are on your sever?
3. Have you checked your permissions on your server for that folder?
Developer — 22nd June 2010 (1 year ago) #
You haven't changed your .htaccess file. You need to follow all the upgrade instructions - I believe the htaccess change for media and images is one of the last ones.
Member — 22nd June 2010 (1 year ago) #
@Barry
I did change my .htaccess file to add the line:
RewriteRule ^(.*/)?files/(.*) wp-content/ms-files.php?file=$2 [L]
Is that what you mean, or have I missed something else?
@Tammie
Yes I did copy over the entire wp-contents folder. I will check my backup and see what has changed.
Thanks.
Member — 22nd June 2010 (1 year ago) #
@Tammie
I have just checked, and whilst I copied over the wp-contents folder, it only seems to have added a new theme and a couple of other things to the already existing file - all of the previous theme that I added are still there and seem to be the same as before I updated.
Developer — 22nd June 2010 (1 year ago) #
Can you load the images in the browser by putting in there real locations? I.e. The blogs.dir path? Do they load in the browser with the files pretend path?
If no to the first, then it may be a permissions issue. If yes to the first and no to the second, it looks like an ms-files issue.
Member — 22nd June 2010 (1 year ago) #
@Barry
No to no.1 - when I type it in I get a 404 message.
How do I edit the permissions?
Thanks.
Lead Developer — 22nd June 2010 (1 year ago) #
So the files are still there in blogs.dir/#/files/?
Also can you paste you whole .htacess file?
Member — 22nd June 2010 (1 year ago) #
@Aaron,
Yes the files are all still there.
.htaccess file:
SetEnv DEFAULT_PHP_VERSION 5RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
Member — 22nd June 2010 (1 year ago) #
If it helps, the message I am getting on the 404 page is this:
The requested URL /wp-content/ms-files.php was not found on this server.
Lead Developer — 22nd June 2010 (1 year ago) #
Helps a lot! That line in your htacess file should be:
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]Member — 22nd June 2010 (1 year ago) #
I saw a similar thing, even though my .htaccess was modified correctly. Somehow, some of the files in blogs.dir did not survive the upgrade process, so I had broken image links in many blogs including blog/site 1.
Cracking open the backup I made before the upgrade, and copying over the old blogs.dir files seems to have fixed it. I think I'll make another backup now. :-)
Become a member