Upgrade WP-MU 2.6.5. to New WordPress 3.0

A step by step guide on how to upgrade your WordPress Multiuser installation version 2.6.5. to the New and Awesome WordPress 3.0 with Multisite funcionallity.
I have been very busy lately and thus didn’t find the time to maintain my WordPress MU installation up to date. What’s more, I read through the upgrade instructions and didn’t feel to sure about the process, it sounded complex and somewhat complicated.
Finally when version 3.0 of WordPress came out I dared to try and do a one step upgrade from 2.6.5. to 3.0 leaving out the intermediate upgrades 2.7, 2.8 and 2.9. (This could have ended in a disaster, but it didn’t).
Of course before touching ANYTHING I made a backup of the complete Database as well of my complete server root folder.
That way, if something goes wrong I could have recovered my 2.6.5 and try again (which wasn’t necessary after all).

So, here are the step by step instructions on how to do a direct WP-MU 2.6.5. to WP 3.0 upgrade.

1. Make a Database backup
2. Backup of all WordPress files on your server root
3. Download wp 3.0…
4. edit wp-config (wp-config-sample.php)
5. deactivate plugins
6. upload all 3.0 files
7. Run the Upgrade function. do /wp-admin/upgrade.php 8. do /wp-admin you should get redirected to your admin pages
8. Updates and plugins

1. Make a backup of your database
Login to your phpMyAdmin. Depending on the version on your server views could be different. My MySQL version is 4.1.22 and my phpMyAdmin is 2.8.0.1.
After loging in you should see a split window, on the left your database and all the tables, on the right th MySQL functions. Find the “Export” link on this page and click on it (if you have more than one databases, you have to make sure to select the one running your WP-MU blog).
Select the “SQL” tick button
Select all the tables of your database
In “Structure” select:
Structure
Add DROP TABLE / VIEW / PROCEDURE / FUNCTION
Add IN NOT EXISTS
Add AUTO_INCREMENT value
Enclose table and field names with backquotes

do not select:
Add CREATE PROCEDURE / FUNCTION
and do not select:
Add into comments
Creation/Update/Check dates

In Data select:
Data
verify Maximal lenght of created query is 50000
and Export type is insert

On the bottom in “Save as file” select:
Save as file
Remember template
compression = zipped

Hit the “Go” button. You will get prompted to select a location where to save the file to.
That is all, your done backing up your complete WordPress MU Database.

2. Backup of all WordPress files on your server root
To make a backup copy of your WordPress files on the server you will have to use an FTP program like ACE FTP freeware. Login to your account and select all the WordPress folders and files. Select all files if you are not using your server for anything other than the WordPress MU installation.
Now right click on the selected files and select “Download”. This will take some time, so be pacient.

3. Download wp 3.0…
Go to the WordPress dot Org site to download the new WordPress 3.0. Unzip all the files.

4. edit wp-config (wp-config-sample.php)
You will have to edit the wp-config.php file to make the installation work properly with your previous settings. A few things will look different in the new wp-config file, but if you follow the instructions, things should work just fine.
A good help to do the editing is a html editor like ACE html. In the editor, open your old wp-config.php file, from your security copy backup, now open the wp-config-sample.php file in the uncompressed WordPress 3.0 folder.
Here is what the wp-config.php looks like:
—————————————————————————————
/* Don’t try to create this file by hand. Read the README.txt and run the installer. */
// ** MySQL settings ** //
define(‘DB_NAME’, ‘your db name’); // The name of the database
define(‘DB_USER’, ‘your db username’); // Your MySQL username
define(‘DB_PASSWORD’, ‘your password’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);
define(‘VHOST’, ‘yes’);
$base = ‘/’;

// Change each KEY to a different unique phrase. You won’t have to remember the phrases later,
// so make them long and complicated. You can visit http://api.wordpress.org/secret-key/1.1/
// to get keys generated for you, or just make something up. Each key should have a different phrase.
define(‘AUTH_KEY’, ‘your key’); // Change this to a unique phrase.
define(‘SECURE_AUTH_KEY’, ‘your key’); // Change this to a unique phrase.
define(‘SECURE_AUTH_SALT’, ‘your key’); // Change this to a unique phrase.
define(‘LOGGED_IN_KEY’, ‘your key’); // Change this to a unique phrase.
define(‘SECRET_KEY’, ‘your key’); // Change these to unique phrases.
define(‘SECRET_SALT’, ‘your key’);
define(‘LOGGED_IN_SALT’, ‘your key’);

// double check $base
—————————————————————————————
Now here is the wp-config-sample.php file
—————————————————————————————
define(‘DB_NAME’, ‘copy the original name here’);

/** MySQL database username */
define(‘DB_USER’, ‘copy the original username here’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘copy the password here’);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8′);

/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);
define(‘VHOST’, ‘yes’);

/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define(‘AUTH_KEY’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘NONCE_KEY’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘AUTH_SALT’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘SECURE_AUTH_SALT’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘LOGGED_IN_SALT’, ‘put your unique phrase here or use the old one, cookies will be keept’);
define(‘NONCE_SALT’, ‘put your unique phrase here or use the old one, cookies will be keept’);

define(‘WP_ALLOW_MULTISITE’, true); add this line (isn’t included in wp-config-sample.php)
—————————————————————————————
That’s it, after updating all the fields correctley, save the file as wp-config.php in the unzip 3.0 folder.

5. deactivate plugins
Go to your WordPress Admin – Plugins page and deactivate all your plugins. This eliminates trouble with incompatibility of some Plugins that haven’t been tested with WordPress 3.0.

6. upload all 3.0 files
Use your FTP program to upload all the new 3.0 files from the unzip folder. When prompted check the overwrite option. This is not suggested by WordPress who suggest to delete all WordPress files from the server, but I choose to try the overwrite option, and it worked perfectly.
Upload will take time, so a have a coffee…

7. Run the Upgrade function
Call the URL http://my domain.com/wp-admin/upgrade.php. Within half a minute or so you’ll get a message that the upgrade has been done successfully.
Call http://my domain.com/wp-admin you should get redirected to your admin pages. Depending if you’ve used your old or new pass phrases, you may have to do a login, use your usual login information to do so.
Once in your admin pages you may get some messages. One of them asks you to delete blog.php. Do so using your ftp program and refresh the wp-admin pages. The message should disappear.

8. Updates and Plugins
There may be an issue with the automatic update of your plugins with Worpress 3.0.
Upon selecting one or more plugins from the “upgrade available” tab and clicking on update, the system gets stuck on “maintenance” mode.
To get out of maintenance mode you will have to use your ftp programm and delete .maintenance file manually (you should find this file on your server root.
If you can’t see the file, enable “show hidden files” in file permissions.
Return to “plugins” “active” and find the plugins that have an upgrade available, then click on the or “upgrade automatically” link. This should work. I’m hoping for a bug fix to come out soon, to resolve this issue and to be able to do bulk plugin upgrading. For now it has to be done manually.

If you run into any problems, please comment on it.
Enjoy WordPress 3.0 and all the new options and functions it has.

A special thanks to Matt Mullenweg for the outstanding job on the best free blog software of the Internet.

Incoming search terms:

No related posts.

Tags: mu 2.6.5, one step upgrade, wordpress 3.0, Wordpress MU, wordpress mu upgrade

One Response to “Upgrade WP-MU 2.6.5. to New WordPress 3.0”

  1. Thanks Ralf,

    Those instructions helped me so far.

    Any ideas on the following error message?

    Notice: define() was called with an argument that is deprecated since version 3.0! The constant VHOST is deprecated. Use the boolean constant SUBDOMAIN_INSTALL in wp-config.php to enable a subdomain configuration. Use is_subdomain_install() to check whether a subdomain configuration is enabled. in /wp-includes/functions.php on line 3321

    If I use the following code in wp-config.php as the error suggests, it tells me my database tables are unavailable and I need to repair.

    //define(‘VHOST’, ‘yes’);
    define(‘SUBDOMAIN_INSTALL’, true);

    Thanks,

    James

Leave a Reply