Upgrading WordPress MU 2.9.2 to WordPress 3.0

WordPress 3.0 was officially released today. The main feature of the WordPress 3.0 is the merge of WordPress MU. In this post, I’ll cover upgrading WordPress MU 2.9.2 to WordPress 3.0. 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. If you are upgrading from WordPress 2.9.2 standard and want to enable multisite, then follow the instructions on this post instead.

Upgrade WordPress:

You can upgrade WordPress by following the link in the update message at the top or by going to the Upgrade screen under Tools. Return to the dashboard after upgrading. You will have to login again after the upgrade.

Update wp-config.php:

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');

Update Network:

Follow the link at the top to the Update Network screen or browse to the Update screen under Super Admin to update all sites(blogs) in your network.

Update Rewrite Rules:

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. Replace wp-content/blogs.php with wp-includes/ms-files.php in .htaccess and delete wp-content/blogs.php.

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>

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.