WordPress.org

Support

Support » Multisite » [Resolved] All images are disappeared after upgrade to 3.0.1

[Resolved] All images are disappeared after upgrade to 3.0.1

  • tqeadmin

    @tqeadmin

    Hello, Experts!

    Few weeks ago, I upgraded WP mu for the websites that I am developing based on WP mu. After upgrading, I got the following message.

    “The wp-content/blogs.php file is deprecated. Please remove it and update your server rewrite rules to use wp-includes/ms-files.php instead.”

    So, as the message says, I removed wp-content/blogs.php file and rewrote rules to use wp-includes/ms-files.php in the “htaccess file”, as many people suggested. But, when I did that, all images that I have uploaded were gone. So, I reverted blogs.php file, then the images are appeared again.

    My main concern with the error message is that the WordPress sites that I’m handling aren’t working like they should— I’m afraid that if I update the sites and a newer version of WordPress is released, I will be still stuck trying to figure out the problems with the older version and won’t be able to move forward.

    Do you guys have any idea to fix this issue?
    I look forward to hear any suggestions.

    Thanks in advance.

Viewing 15 replies - 1 through 15 (of 31 total)
  • Moderator Ipstenu (Mika Epstein)

    @ipstenu

    Did you also update your .htaccess file?

    Read this post: http://wpmututorials.com/how-to/upgrading-from-wpmu-to-wp-3-0/

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    and rewrote rules to use wp-includes/ms-files.php in the “htaccess file”,

    Some people are making typos and not changing the original wp-content to wp-includes. Double-check.

    tqeadmin

    @tqeadmin

    Thank you for your replies…
    @ipstene: Sure, I updated htaccess file as the post suggested before I post this thread. But, after updating htaccess file, the images are still not showing.. That’s why I asked about the issue here.

    @andrea_r: I checked several times, but I couldn’t find any typos.. 🙁

    Thanks for your replies again. Do you have any other idea?

    tqeadmin

    @tqeadmin

    I did once again what you suggested.
    The steps that I did were;

    1) rename blogs.php to 0blogs.php instead of removing.
    2) add a nonce salt to wp-config.php as the warning message said
    3) edit the rewrite rule in htaccess file.

    After I did all steps, the message was gone.
    But, the images that I have uploaded to the sites also disappeared.

    So, when I reverted the file name blogs.php from 0blogs.php, the images were shown again even though I didn’t revert the htaccess file.

    Please help me the issue, disappearing images after removing blogs.php file.

    Thanks in advance.

    Moderator Ipstenu (Mika Epstein)

    @ipstenu

    What’s the full content of your .htaccess?

    tqeadmin

    @tqeadmin

    This is my .htaccess
    —————–
    RewriteEngine On
    RewriteBase BASE/

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/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>
    ————

    Thanks

    Moderator Ipstenu (Mika Epstein)

    @ipstenu

    Yeah, that’s not quite right. Read this link and set it more like this (depending in if you’re subfolder or subdomain).

    http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite

    tqeadmin

    @tqeadmin

    Thanks for your quick reply.

    BTW, what I did when I edit htaccess file was to change the part, “wp-contents/blogs.php” to “wp-includes/ms-files.php” in the following line.

    I mean before I change the line, it was;
    RewriteRule ^(.*/)?files/(.*) wp-contents/blogs.php?file=$2 [L]

    After I edited, it became;
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    So, do you mean I have to change more?
    But, I’m sorry but I don’t know how to change the line.. even if I read the post you linked several times.

    Could you teach me a little bit more? If you need to see more about my sites to help me, I can give you more information about the sites.

    Thanks a lot.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    So, when I reverted the file name blogs.php from 0blogs.php, the images were shown again even though I didn’t revert the htaccess file.

    Okay, this is helpful – make sure when you upgraded it actually did get all the files. Because really, even though it says to REMOVE that file (not rename it) it sounds like it’s missing the call to the new file.

    Go check in wp-includes/ and see if ms-files.php is actually there.

    Moderator Ipstenu (Mika Epstein)

    @ipstenu

    What andrea said, plus your .htaccess is probably still workable, BUT it’s less efficient and makes more calls than are needed. And when that happens, things can sometimes go wiggy. Upgrading from MU should ONLY require that one line change, but that said, a couple of those lines look like they could cause .htaccess collisions. Like I see multiple lines telling /files/ where to go.

    Once you’re sure the ms-files.php file is there, we can play with .htaccess.

    If you’re using SubDomains, use this:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /BASE/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    SubFOLDERS:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /BASE/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    tqeadmin

    @tqeadmin

    I really appreciate your kind replies.

    @andrea_r: Yes, there IS the file ms-files.php in the wp-include folder

    @ipstenu: I tried both of the codes you posted even though I’m using subfolder for WP. However, both didn’t work. Whenever I removed blogs.php from wp-content folder, the images are all gone. Only when there is the blogs.php file in the wp-contents folder, the images are showing. What should I do?

    Thank you very much and sorry for the bad news although both of you are helping me a lot.

    Moderator Ipstenu (Mika Epstein)

    @ipstenu

    I’d do a manual re-upload of all of the WordPress 3.0.1 files. It’s possible some other ones are missed.

    Then use JUST the subfolder .htaccess (and no other!).

    tqeadmin

    @tqeadmin

    Yes, that is what I did. I copied the codes for only subfolder.
    I see, I will do a manual re-upload of all of the word press 3.0.1 files.
    Thanks.

    Moderator Ipstenu (Mika Epstein)

    @ipstenu

    When you said you tried BOTH codes, I wanted to be pedantic and make sure 😉

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress


    RewriteBase BASE/”

    this is incorrect. If you’re installed in the ROOT it should be
    RewriteBase /.

    Are you sure you’re editing the right htaccess file? If you’re not even calling blogs.php in the rewrites, there’s no way it should logically even be looking at it. none. It’s called nowhere else in any of the 3.0+ files.

    And when Ipstenu gives new htacess rules, they are to *replace* what you have. Not add to.

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘[Resolved] All images are disappeared after upgrade to 3.0.1’ is closed to new replies.
Skip to toolbar