Select Page

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.

Print Friendly, PDF & Email
Translate »