• Resolved 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 - 16 through 30 (of 31 total)
  • BRAIN WAVE:

    Are you editing .htaccess or htaccess.DIST?

    the second one will not work. it is NOT USED.

    Thread Starter tqeadmin

    (@tqeadmin)

    I have been editing htaccess.DIST..

    Where can I find .htaccess?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Points to Andrea!

    You have to create .htaccess 🙂 It’s a file that is, literally, named .htaccess (just the . and the htaccess)

    It’s a hidden file so you may have to turn on show hidden files on your FTP tool. You can rename htaccess.DIST to .htaccess in there.

    Thread Starter tqeadmin

    (@tqeadmin)

    You guys may not know how much I thank you.
    As you suggested, I edited .htaccess file, not htaccess.DIST file.
    Yes, I replaced all lines as ipstenu suggested.

    However, when I removed the blogs.php file, the images disappeared again.
    For your information, the folder that WP is installed is not root folder. It is the sub-folder named “specialty”
    So, the line that Andrea mentioned is not “RewriteBase /specialty/”

    The following is the code before I edited.

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

    I changed above lines with

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /specialty/
    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>

    But, as I told you, it is not working either.
    I don’t know what else I should do. 🙁
    Sorry for another bad news, but I really appreciate you guys a lot.
    If there is any others that I can try, please let me know.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Where’s the .htaccess file? It should be in that /speciality/ folder.

    Thread Starter tqeadmin

    (@tqeadmin)

    yes, it was in /specialty/ folder. And I found it after I turned on the show hidden file function in my ftp program.

    Thread Starter tqeadmin

    (@tqeadmin)

    And, I uploaded it after edit to the /specialty/ folder.

    When you upgraded, how did you do it? Manually or auto-upgrade?

    Because as I said above, after a proper upgrade, literally *nothing* calls that blogs.php any more. removing, renaming, whatever – should have literally no effect.

    And, I uploaded it after edit to the /specialty/ folder.

    edit it right on the server.

    Thread Starter tqeadmin

    (@tqeadmin)

    @andrea_r: FYI, I upgraded manually due to other errors that I met when I tried auto-upgrade. What I did was, therefore, to download the newest version of WP, and to overwrite all files into the folder that contains previous WP version files. Then, I could see some regular error message in dashboard, for example, adding Nonce_Salt line to config file, and removing blogs.php file and rewriting the rule as I posted through this thread. And I fully followed the systems’ suggestions and what I got finally was the symptom that all images are gone.

    Thank you very much for your efforts to help me, but after all, I decided to reinstall, not update, the newest version of WP. I don’t know if it is good choice, but, I think, if I make the website from the beginning based on the newest version of WP, it will take less time than the amount of time that I will spend to solve the issue.

    I really appreciate you guys again.
    I hope everything you are doing goes well.

    If there’s not a lot of content to port over, then yeah. that works too.

    Thread Starter tqeadmin

    (@tqeadmin)

    Hi again.
    I downloaded the newest version of WP, WP 3.0.1 from the official website.
    Before install and test it, I installed it my laptop that can be used as a server. I installed apache and mySQL in my laptop, FYI
    To make it muli-site WP, I touched config file and then I could see the ‘network’menu in the tools menu.

    After that, when I tried to edit .htaccess file as the system suggested, I couldn’t find the file named .htaccess in the installed WP folder although I turned on the function to see the hidden files.

    So, I made .htaccess file and saved it, then the site showed the following error message.

    Server error!

    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

    If you think this is a server error, please contact the webmaster.

    What should I do to solve the issue? Do you have any idea?

    Make sure mod_rewrite is enabled in apache.

    Thread Starter tqeadmin

    (@tqeadmin)

    @andrea_r: Thank you so much. now it is working, and the image disappearing issue also solved. I appreciate you and ipstenu a lot.

    But I have another problem. When I try to update theme, I got following error. Could you help me again?

    Downloading update from http://www.genesistheme.com/download/?file=genesis.1.4.zip…

    Unpacking the update…

    Installing the latest version…

    Removing the old version of the theme…

    Could not remove the old theme.

    Theme upgrade failed.

    Thanks in advance.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Delete the contents of wp-content/upgrades and try again.

    If that fails, just do it manually. Sometimes the auto installs get hinky.

    (and generally open a new topic for a new issue 😉 )

    Could not remove the old theme.

    Usually due to folder permissions / ownership.

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘All images are disappeared after upgrade to 3.0.1’ is closed to new replies.