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.
just upgraded my wordpress and received the above message.
How do I update my server rewrite rules?
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.
just upgraded my wordpress and received the above message.
How do I update my server rewrite rules?
Edit your .htaccess
Change:
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/blogs.php?file=$2 [L]
to
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
The whole thing looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPressThanks for that Ipstenu. Much appreciated.
I'm migrating from MU 2.9.2 to WP 3.0 getting the error
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
and I'm not quite sure where to even put this change at. Which file am I adding/changing or what?
If you're running Apache, then WordPress MU 2.9.2 would have installed an .htaccess file in your root, next to the other wp-* files and folders.
In there, you can change references from wp-content/blogs.php to wp-includes/ms-files.php (see ipstenu's comment above for rewrite rules if you are using subdirectories). You can then safely delete your wp-content/blogs.php file.
Your blog *will work* with blogs.php, but its usage is deprecated.
I'm a complete moron on this but how would I find out if I was running Apache? A friend hosts my blogs on his server but I have no way of asking him at the moment.
Well I'm not seeing a .htaccess file anywhere so I presume that I'm not running Apache. I'm pretty lost here.
Hi, I upgraded from WPMU 2.9.2 to WP 3, all went fine (with great relief) I went and changed the
#uploaded files
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
to
#uploaded files
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
but I still have the message at the top of the admin
So here is my full .htaccess (minus the site name) - I am wondering if I have stuff in there that I do not need - hope someone can help me, thanks
suPHP_ConfigPath /home/sitename/public_html
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_COOKIE} !^.*1b89f55297a947d7973f3b06bbcd6fd4.*$
RewriteRule ^wp-comments-post.php - [F,L]
# as you're using WordPress MU, copy these lines into your .htaccess file, making sure the paths match the location of the signup form.
RewriteCond %{HTTP_COOKIE} !^.*1b89f55297a947d7973f3b06bbcd6fd4.*$
RewriteRule ^wp-signup.php - [F,L]
#uploaded files
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>
#If you're feeling adventerous, you can add the following two lines before the regular WordPress mod_rewrite rules in your .htaccess file. They will stop comments from spambots before they reach the database or are executed in PHP:
RewriteCond %{HTTP_COOKIE} !^.*1b89f55297a947d7973f3b06bbcd6fd4.*$
RewriteRule ^wp-comments-post.php - [F,L]
#As you're using WordPress MU, copy these lines into your .htaccess file, making sure the paths match the location of the signup form.
RewriteCond %{HTTP_COOKIE} !^.*1b89f55297a947d7973f3b06bbcd6fd4.*$
RewriteRule ^wp-signup.php - [F,L]
# BEGIN W3 Total Cache
<IfModule mod_setenvif.c>
SetEnvIfNoCase Host ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?(:[0-9]+)?$ DOMAIN=$2
SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR]
RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
RewriteCond /home/sitename/public_html/wp-content/w3tc-%{ENV:DOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
RewriteRule (.*) wp-content/w3tc-%{ENV:DOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
</IfModule>
# END W3 Total CacheIt looks like you have a couple extra lines in there, and I'm not sure why. What version of WPMU did you start with back when?
I would try this....
Replace this:
# as you're using WordPress MU, copy these lines into your .htaccess file, making sure the paths match the location of the signup form.
RewriteCond %{HTTP_COOKIE} !^.*1b89f55297a947d7973f3b06bbcd6fd4.*$
RewriteRule ^wp-signup.php - [F,L]
#uploaded files
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]
With this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPressThanks Ipstenu
I have been using WPMU for many versions, I am not sure how many.
I did make the change you posted, everything still works but the message is still there.
So I am still after a fix if anyone has one.
At the top of every admin page?
That's very weird. You have a lot of ... cruft? Stuff I don't recognize at least in your .htaccess and stuff that looks duped.
Try this as your WHOLE .htaccess (backup the existing one first, o'course):
suPHP_ConfigPath /home/sitename/public_html
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
# BEGIN W3 Total Cache
<IfModule mod_setenvif.c>
SetEnvIfNoCase Host ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?(:[0-9]+)?$ DOMAIN=$2
SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR]
RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
RewriteCond /home/sitename/public_html/wp-content/w3tc-%{ENV:DOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
RewriteRule (.*) wp-content/w3tc-%{ENV:DOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
</IfModule>
# END W3 Total CacheHi Ipstenu
I replaced the .htaccess with the one you provided and the message is still at the top of all my admin pages.
Another thing that I feel is related is that I can not login to any of my other hosted sites as admin via the admin ie. Superadmin/sites/backend
I can get into the Superadmin/sites/edit
The path to the edit is working but not for backend for each of my sites.
The link to the backend points to wp-admin for all my sites
Any ideas?
I think you are forgetting to remove blogs/wp-content/blog.php
Only when you remove the message goes. Please let us know if this worked.
Thanks hamzahali
I thought I had done that, ... and now I have the message has gone.
Only one thing more and thats the path to the backend via the admin.
I guess we can close this and I will ope a new post.
Thanks to all for your help
After upgrading my wordpress 2.9.2 to 3.0 early this today, the upgrade went on successful but there was a notice that appeared on top of my wordpress dashboard. After following the process referred by the notice, I was able to get everything to work normal. But the problem now is that I can not log into my wordpress dashboard as the admin. Error message says my password is incorrect. After wandering for some time what the problem could be, I had to click the "Lost your password" link to obtain a new password so I can login again. But up till now I have not received a new password in my email. Any help on how to fix this error is highly appreciated. Looking forward to utilizing any help I can get from wordpress community. Best regards.
Hello one and all, am happy to announce that I found a solution to my admin login problem that happened after I installed wordpress 3.0. The admin login problem is supposed to be a simple problem if you are used to wordpress. Without much ado, to fix admin password problem after installation of wordpress 3.0 Follow below steps:
Two things may happen, 1. if you are not used to such problem you may click on lost your password? link and you did not receive the new password. 2. You may receive the new password.
But if your case is similar to mine just follow below steps
Step 1. Just clear your browser cookies. This step is sure to work if you had not clicked on lost your password link.
Step 2. Log into cpanel and click on phpmyadmin. Locate and click on wp_user, and then browse. On the user_pass field, click “browse” and find the ID number associated with your login (there is usually only one) and click Edit.
Select the password content and delete it. Type in your new password as you normally would.
# In the dropdown menu, choose MD5.
# Click Go or Save at the bottom of the screen.
# Return to the tab for your WordPress blog and test the new password. If it doesn’t work, start over.
Viola
I am having a similar issue to thewackonerd with the 'backend' link taking me back to the main sites dashboard. Are there any reports on a clean fix for this?
new topic here: http://wordpress.org/support/topic/411872?replies=1
Thanks Ipstenu
Your post helped me out tremendously I couldn't figure it out but it finaly worked.
I'm having one small issue with this. I change my htaccess and delete the blogs.php file, everything seems fine for a minute and the message is gone in admin, then after cache clears I noticed that my header image and all my users who uploaded their own avatars are missing. Anyone seen this yet?
thanks in advance and let me know if you need more info.
Anyone? I really need help with this, once changes are made I lose my header image and all users uploaded images. I don't understand what I'm doing wrong.
I am having the same problem as jproducer -
jproducer - I double checked my edit to my htaccess file
I had :
wp-content/ms-files.php?file=$2 [L]
instead of:
wp-includes/ms-files.php?file=$2 [L]
I'm not sure why, but I'm not the only person to have this either by the look of it.
Thanks all, especially Ipstenu
@hamzahali - thanks buddy, you got it! maybe wordpress 3.0.1 should automatically search htaccess to see if that alt has been made and then delete blogs.php for us. because that wasn't terribly clear WP people. :\
Ipstenu is A **Rock Star**
3.0 upgrade melt down fixed...
.htacess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
WooHoo Thank YOU!!!
@hkcharlie Once you have completed the .htacess file update. Delete the wp-content/blog.php file and you will see the message go away
Hi,
I upgraded from WPMU 2.9.2 to WP 3.0.1, I removed wp-content/blogs.php and I changed .htacces file
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-content/blogs.php?file=$2 [L]
to
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
all went fine but I have a problem: I see posts of root site but I don't see posts of subsite. I checked the DB and it's ok. What is the problem?
Thanks
I tried my best, changing the .htaccess code was only part 1 of the solution.
Part 2 is... actually removing the blogs.php file from wp-content folder.
Hehe... after that, the message was gone... like 4ever?
REASON? Please look into the following code:
function ms_deprecated_blogs_file() {
if ( ! is_super_admin() )
return;
if ( ! file_exists( WP_CONTENT_DIR . '/blogs.php' ) )
return;
echo '<div class="update-nag">' . sprintf( __( 'The <code>%1$s</code> file is deprecated. Please remove it and update your server rewrite rules to use <code>%2$s</code> instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '</div>';
}By the way seem like redirecting FollowSymLinks MultiViews sometimes isn't turned on. I mean this:
<Directory /usr/local/var/www>
Options FollowSymLinks MultiViews
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
Where it should be:
<Directory /usr/local/var/www>
Options FollowSymLinks MultiViews
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
in file: httpd.con
Why the hell in WordPress MU they made redirect via .htaccess like this:
domain.com/files/2011/02/file.jpg points to ms-files.php which translates that as domain.com/wp-content/blogs.dir/1/files/2011/02/file.jpg
delete:
#RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
To avoid ms-files.php...
and replace with:
RewriteRule ^([_0-9a-zA-Z-]+/)?blog1/files/(.+) wp-content/blogs.dir/1/files/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?blog2/files/(.+) wp-content/blogs.dir/2/files/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?blog3/files/(.+) wp-content/blogs.dir/3/files/$2 [L]
etc.
or like in my .htaccess files:
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?local-transport/files/(.+) wp-content/blogs.dir/3/files/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?international-transport/files/(.+) wp-content/blogs.dir/4/files/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?buses/files/(.+) wp-content/blogs.dir/5/files/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?rescue-transport/files/(.+) wp-content/blogs.dir/6/files/$2 [L]
Adress looks like http://www.domain.com/myrootblog/local-transport/
in myrootblog is my wp installed in subdirectory (not in root folder)
and local-transport is my second blog name etc.
Hope it will be helpful.
This topic has been closed to new replies.