Upgrading WordPress MU 2.9.2 to WordPress 3.0 (beta) with MultiSite

The main feature of the WordPress 3.0 is the merge of WordPress MU. However, upgrading from WordPress MU to WordPress 3.0 (beta 2) is not an automatic single-click process. In this post, I’ll cover upgrading WordPress MU 2.9.2 to WordPress 3.0 (beta 2).

  1. Replace WordPress Files:
  2. Download and unzip the latest version of WordPress 3.0 (beta 2). Delete the wp-admin and wp-includes folders. Upload the unzipped files to the server, overwriting the old files. Ensure that you overwrite all the files and pay attention to the wp-content folder. You must overwrite the files in this folder and not replace the folder with the new one since it contains the themes and plugins.

  3. Update WordPress:
  4. Log in to the WordPress back-end and follow the link to the Update Network screen to update all sites(blogs) in your network.

  5. Update wp-config:
  6. WordPress encrypts cookies but you must add NONCE_SALT code shown at the top of the admin area to wp-config.php. For example: define( 'NONCE_SALT', 'a<u3S[ g<.4I)#p^-iy?sbb3JPu+W~-Zk|aPLMN[TvoiHIKGI_bbB-h?iliBb2ra' ). This code will be unique to your installation. Add it above the line that says: /* That's all, stop editing! Happy blogging. */

    define( "WP_USE_MULTIPLE_DB", false );
    
    define( 'NONCE_SALT', 'a<U3S[ g<.4I)#p^-iy?sbb3JPu+W~-Zk|aPLMN[TvoiHIKGI_bbB-h?iliBb2ra' );
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

  7. Update Rewrite Rules:
  8. The wp-content/blogs.php file was deprecated in WordPress 3.0 and you must update the rewrite rules to use wp-includes/ms-files.php. Delete wp-content/blogs.php and change it to wp-includes/ms-files.php in .htaccess:

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

    wpmu-settings.php was also deprecated in WordPress 3.0 and can be deleted.

You should always backup your databases before attempting to upgrade WordPress. If you are not sure how to backup your database, you can find complete instructions in the WordPress Codex.

WordCamp San Francisco

WordCamp San FranciscoI’m attending WordCamp San Francisco this weekend at Mission Bay Conference Center. WordCamp San Francisco is the original WordCamp and is generally considered the best gathering of the WordPress geeks. You should definitely check it out if you are in the area.

WordCamps are all about networking, so make it a plan to attend all the parties and hit me up if you see me. WordCamp San Francisco has an exciting lineup of speakers and it’s well worth the $50 in addition to a cool t-shirt and a swag bag.

It’s officially a one day conference but there is a developer unconference scheduled for Sunday, May 2nd at the Automattic Lounge (Pier 38) if development is your forte. There is also a code sprint scheduled for May 3rd and 4th and everyone is welcome to attend if you are interested in contributing to WordPress.