Upgrading from WPMU to WP 3.0

Now that 3.0 is officially released, you may have seen an upgrade notice in the backend of your WPMU install. While the process is generally just clicking the upgrade button, there are a couple of additional steps to fully smooth out any merged changes that occurred.

First, backup your database(s) and the entire wp-content folder. Then hit the Upgrade button.

You’ll notice immediately after doing the auto-upgrade that there’s a yellow message in the admin area that states the following:

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, go ahead via ftp or through your web hosts control panel and delete the blogs.php file from the /wp-content/ folder. It’s been moved and renamed to /wp-includes/ms-files.php for you already.

You’ll now need to update your .htaccess file so your uploaded images will continue to display properly for your users. Find the line that says:

RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

and change it to this:

RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

You will also need to add a nonce salt to wp-config.php. You’ll get a warning about it and it will look similar to this:

 define( 'NONCE_SALT', '6xF{&bvT_PAsmbnG<72.dJH>D8R8M!M{~r.U]-~j:rG!g!0(g7hvz)+/h9 IY7Ge' ); 

Stuff it in there with your other salts.

If you decide to upgrade manually, replacing the new files, make sure you snag the new TwentyTen default theme, as well as make the above changes. Feel free to finally dump Kubrick & Classic. ;)

One of the things you will instantly notice is the renaming of the menus. Now that you’ve completed the basic upgrade, make sure your entire network gets updated by visiting the Super Admin -> Update page. As before, this will step through the blogs (now sites) a chunk at a time, applying any needed database changes.

Additional notes:
Since you are upgrading from WPMU, you are already running a network of sites. Please DO NOT follow the Create a Network instructions, as you will not need them.

If you’re running our multi-site plugin, no worries! It has worked smoothly for us and reportedly others who have upgraded MU.

In case you are running a version of WPMU earlier than the 2.9 branch, please step through upgrades manually to 2.9.x as outlined in the codex. Then you can continue as above.

About andrea

City kid turned country wife, obsessive crafter.

Comments

  1. Thanks for this. If upgrading manually, from WPMU 2.9.2 to WP3, do you need to edit wp-config.php to enable network?

    • Like I said near the end, if you’re on MU, you’re alreayd running a network. So no, you don’t need to enable it.

      • thanks. I read that but I wasn’t sure if the auto-upgrade did that for you. Thanks again.

  2. Is there anything special we’ll need to do, or do we even still need to use Donncha’s Sitewide Tags plugin?

    • Just the steps above. Donncha’s SWT plugin is still needed. The devs didn’t roll anything like that in.

  3. Which multi-site plugin are you talking about? This one: http://wpmudev.org/project/Multi-Site-Manager ?

    • The one we sell here on the site. It’s for running multiple networks.

      Look in the top menu bar. :)

      • I see, I am running this one now serving about 1000 blogs on two domains. Do you know if it is possible to switch to yours instead without much hassle?

        • Honestly, it’s been a while since I even looked at the older plugin (it hasn’t been updated in a very long time) so I really don’t know. Ours provides the interface to make more networks (sites in mu). when you remove it, those still exist and function because it’s all saved in the database.

          we’ll be coming out with an update soon, probably next week.

          • I see, would you be able to email me a sample database structure so I can check for myself if it is much different?

          • @Robert – the MU multi-site/WP network use the existing MU/WP tables. As far as we know, none of the multi-site plugins created tables.

  4. The process for upgrading from WordPress MU 2.8 follows these exact same steps, too.

  5. Is the mu-plugins directory still in use???

  6. If, after upgrading, you find you no longer have Super Admin access, check to make sure your account is still listed as a Super Admin. You may need to use a database tool to do this.

    This is what happened to me…

    On my original install of WPMU 2.x I used phpMyAdmin to manually change the name of the super admin account. The name I use has an uppercase letter in it. For this example, I’ll use “Frank” (not the real name).

    Example: admin was changed to Frank

    After the upgrade, Frank (admin) no loner has Super Admin privileges.

    Super Admin was listed as “frank” before 3.x and had to be changed to “Frank” for 3.x to work.

    • Nice catch. :) I’ve seen one person with the same issue, but has no clues.

    • Gary, that’s exactly the problem I’m facing now. main blog’s theme still the same old ‘home’ theme. but default theme when new user register is changed to twentyten, which is fine I suppose. I just copy my choice of default theme into ‘twentyten’ theme folder.

      I can’t log on as admin, can’t do anything admin tasks. I’m looking into database as you suggested. Which table should I check on ‘admin priviledges’ of the admin? As far as I can see, only two table seems to be related ‘wp_users and wp_usermeta’.

      thanks

  7. When i run the upgrade blogs script it stops at the same blog every time. around 50 blogs out in the upgrade.

    is there any way of finding out what causes this or read any log?

    • MU doesn’t generate any logs for this. If it is the same blog, you could try logging in to the backend of that blog, which will force the same upgrade.

      It’s hanging becasue there’s something wrong with that blog in particular. So sort out any issues there.

  8. Happy Father’s Day RON!!!!
    Long time no talk to you!
    I would like to upgrade from wpmu 2.7.1
    to wordpress 3.0.
    You helped me with my website before. And I couldn’t tell you what was done (I’m still ignorant to a lot of the wpmu stuff. What do you recommend?

    • I’d recommend upgrading to
      MU 2.8.6 and then 2.9.2. Once you are at 2.9.2, you can upgrade to 3.0 via the automatic upgrade.

  9. I was just wondering what $wpmuBaseTablePrefix is replaced with.

    This is used in a lot of plugins i use on my site.

  10. I’m pretty new to this. I’ve made updated to 3.0 and made the changes in the initial post except for the .htaccess change. I’m assuming that file already exists but I’m not sure where it is located. I’ve done a FIND use File Manager in each of the directories but cannot find. Any guidance would be helpful. Thanks!

    • Just make the htaccess change and don’t worry about the file. If it hasn’t been removed already, changing the rewrite rule will effectively ignore it.

  11. I found it using the Legacy File Manager and made the change to the .htaccess file. Does the .htaccess_MU need to be changed at all?

    • There is no .htaccess_MU file. You or someone working on your site must’ve renamed a file to keep a copy.

  12. Okay. When I first did the upgrade to 3.0, there was text at the top of my dashboard stating to change my wp-config.php file by adding this statement…

    define( ‘NONCE_SALT’, ‘8f]uMwtil+0Zk~/ESoSyW5wl$z,:hZmbYky=MzWsW4K)JZSM&9jh0#;#5}+>TR=1′ );

    however the 1st post here says to add this…

    define( ‘NONCE_SALT’, ‘6xF{&bvT_PAsmbnGD8R8M!M{~r.U]-~j:rG!g!0(g7hvz)+/h9 IY7Ge’ );

    Do I need both statements or only one of them?
    Which one?
    What do these statement do?

  13. Thanks, this helped give me confidence to make the jump from WPMU 2.9.2 to 3.0.

    Only 1 hitch so far… my images have dropped off from my sites on images using the WP upload feature.

    Here’s an example for one of the sites settings:

    upload path: wp-content/blogs.dir/3/files

    fileupload URL: http://sitesubscribe.com/4everyoungmbs/files

    Here’s a URL on the actual page where the image doesn’t show:
    http://sitesubscribe.com/4everyoungmbs/files/2010/03/testimonials.jpg

    When I upload new images they still don’t show up.

    I checked permissions on ‘wp-content/blogs.dir’, it is 777.

    In this instance I’m using the ‘sub-folder’ config.

    Do I need another htaccess edit beyond the one you already mentioned? (changing blogs.php to ms-files.php)

    Any ideas?
    Thanks.

    • Forget it… just 5 minutes after posting this I found I had not changed the htaccess part correctly… I need to change not only the blogs.php file, but the directory to ‘wp-includes’ as well.

      That fixed it.

      So virtually a seamless migration except for my own typo. And had to delete a couple of malfunctioning plugins.

  14. Hey Andrea,
    Used your post doing the upgrade from WPMU to 3.0 last night. Worked a treat, thanks :)

    Fiona

  15. Thanks for the tutorial! When I upgrade from WPMU 2.9.2 to WP 3.0, the site admin pages take 2+ minutes to load. I have gone through all steps mentioned on this and other tutorials, but every time seem to have the slow admin page load. Do you have any recommendations or troubleshooting tips that you would recommend?

    Thanks!

    • Try clearing your browser cache. Also, did you upgrade the network to 3.0 through the upgrade network page?

  16. I have been testing WordPress 3.0 on a development server for a while before I am about to upgrade my 2.8.6 main site. One question I have, is it possible to make all my sites use the new Twenty Ten theme? Most, if not all, of my sites are using the K2 theme currently and I was wondering if there was a way to this. Thanks.

    • All newly created sites will use twentyten.

      to get the Kubirck ones using the /default/ theme to now use 2010, the quick & dirty way is to rename or remove Kubrick. That’ll trip each blog into using the new default.

  17. Hey Ron & Andrea,
    Thanks for your guidance today on Twitter @andrea_r. I was able to get my WPMU 2.9.2 installed from the Automattic svn repository finished correctly by doing what you suggested: I simply had to install via the WP.org core svn repository. When I tweeted there were errors I found out those were being caused due to my failure to copy over the wp-content directory with all my installed plugins.

    So, all is groovy except I’m also not getting uploaded images to show (as was stated earlier by @SiteSubscribe)

    I’m wondering, Ron, if this is due to the rewrite line not being translated and inserted in the proper place in the Nginx conf files.
    rewrite ^.*/files/(.*) /wp-includes/ms-files.php?file=$1;

    Any thoughts? I’m messing around trying to figure it out, but thus far am striking out. Boo!

    Thanks in advance.

  18. Alok Sharma says:

    Hello Andrea,

    If you remember last time I had discussed about installing WP 3 multi site in a sub-domain and then point the wild card entry to that sub-domain folder so that I can use the domain root for other script and at the same time be able to create different sites with sub-domains enabled.

    Well, I confirmed this from my host and they said that its very much possible.

    Currently, WP 3 multi site is installed in the domain root. I wanted to know that how do I can move this installation to a folder of some sub-domain. Moving means, making changes to the necessary configurations where ever applicable.

    Any help will be highly appreciated.

    Regards,

    Alok

    • It really depends on the host. Yours will do it (point the wildcard to another folder), many shared hosts won’t.

      For moving the install.. just move the files. Go through the database with a search & replace on the domain name.

      • Alok Sharma says:

        I moved all the files, searched the DB for the primary domain and replaced it with the sub-domain. Also edited the wp-config file and changed the domain there also.

        Everything worked but I am not able to login to other sites. Earlier when I used to click on My Sites > Dashboard link, it used to login to that site directly. But now I get the login page. Even though I enter the correct login details, it still shows the login page again.

        Just won’t understand what to do.

  19. It seems that if this update from WPMU to WP 3.0, but not a clean install and the base network already includes the line:
    define (‘MULTISITE’, true);
    not necessary and even prevented, with it I get an error:
    Error establishing a database connection

  20. Alok Sharma says:

    Hi Andrea,

    I wanted to know that is it possible to create sub-sites in sub-domains.

    For e.g. the main site is example.com and it has site1.example.com.

    Now I want to create site1.example.com/sub-site1.

    I desperately need such feature to implement it for one of the projects.

    Regards,

    Alok

  21. Thanks, worked like a charm. ^_^

  22. MadtownLems says:

    “Please DO NOT follow the Create a Network instructions, as you will not need them.”

    It would appear that some plugins check for IS_MULTISITE and if you don’t define that in your wp-config, those plugins will not work correctly.

    • MULTISITE is a constant and is_multisite() is a function.

      The is_multisite() function returns true for both a WP 3.0 install converted to a WP network and a MU install upgraded to WP 3.0.

      If you have an upgraded MU install, DO NOT change the VHOST constant to the SUBDOMAIN_INSTALL constant. If you do that, then is_multisite() will return false. There is a ticket in trac with a patch to correct the bug that causes that.

      • MadtownLems says:

        Great – thanks for the clarification. I meant define( ‘MULTISITE’, true );

        Plugin Commander at least wasn’t working until I added that site.

        Sounds like PC could do a better job of checking, and WP could do a better job of answering the question :P

        Thanks!

        • If someone adds the MULTISITE constant to their upgraded MU install, it takes down the main site (the other sites still work).

          Upgrading from MU to WP 3.0 does not require any wp-config.php changes. If a plugin doesn’t work in that scenario, then it’s the plugin that needs fixed.

  23. Jacob Schipper says:

    I have following problem:
    I installed WordPress MU 2.9.2 using the Software installation utility provided by Softaculous, which worked very well on all other (single install) 7 WP sites I am administering. This is my first WP MU.
    In contract with a normal upgrade upgrading from 2.9.2 has become however a complicated procedure since WPMU has merged with WP as of the introduction of WP 3 The procedure is as follows: one has to remove the MU install however with UNCHECKED installation boxes of Softaculous. When one unchecks these boxes just the details of the installation is removed the installation itself will remain on the server. The next step is to upgrade in WP now to WP 3.0.1
    I had expected that these procedure would take care of all details. However the warnings in the yellow window are still there: the one about “salting” the site; the one about wp-content/blogs.php file, which is deprecated; and last but not least the one about changing the .htaccess file. Where the first 2 one are easy, the latter is not, because I cannot find the line RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L], simply because it is not there! My .htaccess looks as follows:

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    order deny,allow
    deny from all
    allow from all

    order deny,allow
    deny from all

    AuthName isenior.nl

    Please advise.
    Regards Jacob
    P.S. the site seems to work partially: I have added one addtional sub site http://isenior.nl/mu/tuinieren/
    but notice some errors still, e.g. every few days I receive a system message that a new user has been added, which is all the time the same one: the editor of this subsite!

  24. Jacob Schipper says:

    Hi,
    I have uploaded a copy of the .htaccess example file for subfolders mentioned in http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite
    and got an error message.
    Only after deleting the wp-content/blogs.php file it worked immediately, (I added the “salt” but left the wp-content/blogs.php file in to see what was happening).
    I argued if something is depreciated how can it interfere?! Apparently it does!

    I also see that this new copy is quite different from the one which was in place earlier (see my first question). To that previous one I had added some modifications to have the webalizer statistics generated by cPanel shown by internet in a protected folder inside the public_html directory.
    Should I add all missing lines of the earlier .htaccess into the new above mentioned copy in order to continue this facility?
    Regards and thank you so much.
    Jacob Schipper

    • wp-content/blogs.php only gives you the warning in the admin area. It does not interfere with the functioning of the site.

      You’ll have to talk to your web host about those other rewrite rules. They look like they are related to how you web server is configured.

  25. Very helpful. Thanks for taking the time to share this. I was a little nervous at first, as it seemed like an intense undertaking – but it was actually a very smooth and efficient process. Cheers.

  26. See my earlier questions about the upgrade of WPMU: I followed the guidelines as proposed in this document and the Multi Site works partially.
    However when I upload an image using the browser upload facility (not by FTP) then I cannot open this file and get an error message: Error 404 – File not Found.
    It still may have something to do with the .htaccess file of which I found now that there are 2 of them: 1 in the public_html (which is also the location for a single install WP site) and another one in the directory where the MU version is installed. I have named this directory “mu”. Both are however not the same!
    Questions:
    1) is it correct that 2 .htaccess files are present in an WPMU install
    2) how does one obtain the correct one(s) or does the system generate them itself.
    Remark: a .htaccess file is not present in a “fresh” WPMU download from WordPress
    Please advise
    Jacob

    • See above where we advised about having the proper htaccess file. If you have an upgraded MU install, then no – this is not regenerated for you.

      If this is the install that was set up using a script, I can;t help you, as I have no idea what it does or does not do. Please contact your host.

      I *can* tell you that there absolutely needs to be the line to the rewrite rules for the image URL rewrites. That is in the post.

  27. Andrea, thanks so much for this tutorial. I was dreading updating a clients WPMU website. I had put it off as long as I could. If i knew it was this easy I would have done it sooner! I guess that’s what I get for listening to all the hype.

    Thanks for the great tutorial! :-)

    Blessings,
    Wendy

  28. Thanks!!! Works perfect!

  29. Thanks for these clear and concise instructions – I was able to get WordPress Multisite up and running very quickly thanks to this.

Trackbacks

  1. [...] has written a great guide about domain mapping in Multisite mode in WordPress 3.0.The excellent WPMU Tutorials has a fantastic guide on how to upgrade from WordPress MU to WordPress 3.0 Multisite.Custom Post [...]

  2. [...] excellent WPMU Tutorials has a fantastic guide on how to upgrade from WordPress MU to WordPress 3.0 [...]

  3. [...] using the instructions on the WordPress Codex and WPMU Tutorials I got started clicked on the upgrade to WordPress 3.04 button and waited. I did not get any of the [...]