Upgrading to WordPress MU 2.7… step by step

April 3rd, 2009 by Dan York

UPDATE: This post originally said “2.7.1″ in the title, however WPMU 2.7.1 is not yet out. I upgraded to WPMU 2.7.


Today it was finally time to upgrade the site to WordPress 2.7. I’ve been planning for this for a long time but first had to wait for WordPress MU 2.7 to become available at the end of January and then was caught up in working on how to make a redundant WPMU server for failover purposes (not entirely there yet, but getting close). Well… then there was this wee minor job role change in February… and suddenly it’s April!

So for those of you running WordPress MU – here’s what I did, in the hopes that it will help you. Some of this follows the steps in the WPMU Codex for upgrading – some of it is my own variation.

  1. BACKUP EVERYTHING – both the wpmu directory and the database.

  2. MAKE A WORK DIRECTORY – I’m a paranoid type, especially when it comes to working with a live site. So what I did was copy the wpmu directory to one named wpmu27. The basic idea is that I’ll do all my updates in wpmu27 and then move that into place once I’m sure it’s all good to go.

  3. DOWNLOAD WPMU 2.7 – Just grabbed http://mu.wordpress.org/latest.tar.gz. Expanding that got me a wordpress-mu directory.

  4. PREPARE TO COPY 2.7 OVER – What I want to do is just copy the files from wordpress-mu into my wpmu27 directory and overwrite all the files there. But first, I want to do two steps:

    • MOVE OLD WP-INCLUDES AND WP-ADMIN – In my wpmu27 directory, I moved wp-includes and wp-admin to have a -orig on their names. Why not just blow them away, especially when I have a copy in the neighboring wpmu directory? I don’t know… I just would rather have more backups than fewer.
    • MOVE NEW WP-CONTENT – Over in the wordpress-mu directory, I moved wp-content to wp-content-new because I do not want it overwriting all my content.

    With those steps done, I simply cd into wpmu27 and do this to bring over the new files:

    cp -R ../wordpress-mu/* .

    Ta da… all the 2.7. files are in place. I’m not done, though.

  5. COPY OVER BLOGS.PHP – In looking through what changed in the new wp-content directory (that I moved to wp-content-new in the previous step), the, only file that appeared really different was blogs.php. So in my wp-content directory, I did this:

    # cp ../wp-content-new/blogs.php .

    which overwrote my older file.

  6. ADD NEW LINES TO WP-CONFIG – WPMU 2.7 apparently needs some new lines in wp-config.php and so following Step 10 of the upgrade instructions I added these lines:
    define('DOMAIN_CURRENT_SITE', 'blogs.voxeo.com');
    define('PATH_CURRENT_SITE', '/');
    define('BLOGID_CURRENT_SITE', '1');

    I also had to add two more security keys:

    define('NONCE_KEY', 'uniquestring');
    define('AUTH_SALT', 'uniquestring');

    The “unique string”, I have learned, can be anything, really. The site at http://api.wordpress.org/secret-key/1.1/ generates very unique strings for you, and you can just copy one of them over into each of the variables. You can refresh the page to get new unique strings. (I was confused by the fact that this page has variable names on it – and didn’t have AUTH_SALT – but learned that the names are just there for convenience, but you can use the string for other variables… or just make up your own string.)

  7. ADD MORE LINES TO WP-CONFIG – After this entire process was completed, I found that the site came up, but I was unable to login to the site as an administrator. In searching the WordPress MU forums, I found this post which suggested adding these lines to wp-config.php:

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', ''); 

    That worked… and I was able to get into the site.

  8. MAKE MANUAL MODIFICATIONS – Over time, I’ve found some tweaks I need to make to the WPMU distribution for this site, specifically to files in wp-includes. Those modifications are:

    At this point, the WPMU files are all ready to be moved into place. I’ve been making all these modifications and updates in a separate directory, so the main blog site is still untouched from a user’s perspective.

  9. DE-ACTIVATE ALL PLUGINS – Logging into the WPMU web interface, I deactivated all plugins to the site.

  10. MOVE WPMU27 DIRECTORY INTO PLACE – Next I just swap the directories so that the new code is in place:

    # mv wpmu wpmu-old# mv wpmu27 wpmu

    This gives me the option to simply move the old code back in place if something fails.

  11. LOGIN TO THE SITE AGAIN – When I refreshed my screen to login to the site, I had to login again. As noted earlier, I had to add more lines to wp-config.php in order for this to work.

  12. PERFORM THE SITE-WIDE UPGRADE – In the “Site Admin” part of WPMU, I chose “Upgrade” which then upgraded all the blogs in the site. (My understanding is that this is upgrading the database if necessary.)

  13. RE-ACTIVATE ALL PLUGINS – Turn them all back on for the various blogs. (I’ve been using “Plugin Commander” to activate some plugins across all blogs.)

  14. TEST, TEST, TEST – I then went through various blogs to make sure things were working, comments could be left, etc.

  15. ENJOY… – Now the site is running WP 2.7 with the nice new dashboard, editor, etc….

That is the process I wound up going through. Hopefully this helps some of you out there who may be working with WordPress MU.

The redundant, failover server is still in the works… more on that another time.


If you found this post interesting or helpful, please consider either subscribing via RSS or following on Twitter.



Related posts:

  1. Upgrading to WordPress 2.6.2…

Tags: , ,


Want to learn how Voxeo can help unlock your communications and deliver a better customer experience? Please contact us!

If you found this post interesting or helpful, please consider either subscribing via RSS, becoming a fan on Facebook, or following us on Twitter.


3 Responses to “Upgrading to WordPress MU 2.7… step by step”

  1. Voxeo Talks » Blog Archive » Voxeo blog site upgraded to WordPress MU 2.7 Says:

    [...] For those interested in WordPress, I wrote a post diving into the details of the upgrade from WordPress MU 2.6.2 to [...]

  2. takien Says:

    thanks, is it same way to upgrade wp 2.6.2 to 2.8.1?

  3. Dan York Says:

    Yes, these are the same steps I will be using to upgrade to 2.8.1. Remember that they are the steps I use for my installation, so yours may be different… but the same general steps are ones you will want to consider.

    Thanks for commenting.

Leave a Reply

Please note: By submitting a comment you agree to comply with our Comment Policy. We welcome all comments, positive or negative, but do reserve the right to remove all or part of blog comments that do not comply with our policy.

Additionally, the first time you leave a comment on this blog, it will be held for moderation. After that first comment has been approved, future comments will be posted without delay.

Additional comments powered by BackType