Transferring WordPress MU to Another Server

Posted by Johan Cyprich on 05 Jan 2008 | Tagged as: Tech Tips

Yesterday, we looked at how to transfer WordPress to another server. The multi-user version of this software, WordPress MU, is a bit more involved in switching servers. The database settings still need to be changed, but now you need to change the IP of each blog on the server. Every blog has a unique set of tables in the database and they are named wp_number_, e.g. a table can be named wp_10_categories.

Copy the WordPress Files

Like the standalone alone version of WordPress, you need to copy the program files to the new server. Again, SSH is the preferred and secure way of doing this.

Configure the Database and Base Folder

The wp_config.php file contains the configuration settings for the database and the location of the folder with the WordPress MU program files. Create a new MySQL database and record the database name, the username and password for the database, and host name in the appropriate area below in the config file. Also, set the location of the folder where there program files are in the $base variable. If they are in the root folder, then just use ‘/’. Make the changes where the text is bold.

define(’DB_NAME’, ‘wordpressmu‘); // The name of the database
define(’DB_USER’, ‘root‘); // Your MySQL username
define(’DB_PASSWORD’, ‘password‘); // …and password
define(’DB_HOST’, ‘localhost‘); // 99% chance you won’t need to change this value
$base = ‘/wordpressmu/‘;

Change the IP for the Administration Site

The administrative section of the WordPress MU needs to be configured. There are 3 tables where information needs to be changed as shown below.

wp_site Table:
Change the domain to your server IP and change path to the location of the WordPress MU program files.

wp_sitemeta Table:
Change meta_value in the site_name record to your IP.

wp_blogs Table:
Change the domain of every blog listed to the new IP. The path needs to correctly point to the individual blogs. The path in the first record will be the same as the $base variable set in wp_config.php. The blogs should have a path similar to /base/blog_1.

Change the IP’s in Each Blog

This is the fun part. Since there are multiple blogs, you need to change the IP in each blog to the new address. The only table that gets modified is wp_options. There are 3 records that get changed: the option_value in siteurl, home, and fileupload_url. Modify these values to your server’s IP and the base folder (if appropriate).

That’s all there is to it! You would be better off automating this process if a large number of blogs were active. A PHP script could go into each blog’s wp_options table and then change the IP.


Related posts:
    Transferring WordPress to Another Server
    Over 500,000 WordPress Users
    WordPress 2.5 Is Here
    WordPress 2.3.3

Share this post:

del.icio.us:Transferring WordPress MU to Another Server digg:Transferring WordPress MU to Another Server spurl:Transferring WordPress MU to Another Server wists:Transferring WordPress MU to Another Server simpy:Transferring WordPress MU to Another Server newsvine:Transferring WordPress MU to Another Server blinklist:Transferring WordPress MU to Another Server furl:Transferring WordPress MU to Another Server reddit:Transferring WordPress MU to Another Server fark:Transferring WordPress MU to Another Server blogmarks:Transferring WordPress MU to Another Server Y!:Transferring WordPress MU to Another Server smarking:Transferring WordPress MU to Another Server magnolia:Transferring WordPress MU to Another Server segnalo:Transferring WordPress MU to Another Server gifttagging:Transferring WordPress MU to Another Server

Follow Me:

Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.


2 Responses to “Transferring WordPress MU to Another Server”

  1. on 21 Sep 2008 at 7:23 am 1.Martin said …

    Hi Johan,

    have you found or written such a script?

    Greets Martin

  2. on 24 Sep 2008 at 11:00 am 2.Johan Cyprich said …

    Hi Martin. I haven’t written the script yet, but I should do it soon since I have to transfer a large number of blogs in a WordPress MU installation.

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply