Transferring WordPress to Another Server
Switching servers for your WordPress site is much more involved than copying files from one server to the other. The IP of the new server needs to be set along with writing new settings for the MySQL database.
Copy the WordPress Files
The first thing you need to do is copy the WordPress files to the new server. The fastest way to do this is to the download the entire site locally to your computer and then upload the files to the new server, preferably by SSH for increased security but plain FTP could be used if that’s the only option available.
Configure the Database
A MySQL database needs to be created on the new server. The information you need to take note of is the database name, the username and password for the database, and host name. You need to edit the wp-config.php file with your new database settings. The items which are to be modified are highlighted bold below:
define(‘DB_NAME’, ‘wordpress‘); // 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
Change the IP
You need to change the IP to your new server in two fields in the wp_options table in blog’s database. The fields that need to be changed is the option_name field in bothÂ the home and siteurl record. Enter the IP of your new server here starting with http://. If the blog is in a subfolder, include it here as well. For example, the siteurl could be http://184.108.40.206/MyBlog. This address defines your blog at the IP of 220.127.116.11 at the MyBlog subfolder. You don’t need a trailing backslash with this address.
If you not sure what the IP of your new server is, the ShowIP plugin for Firefox can give you this information. There is also the option of getting this information from your webmaster.
Tomorrow we’ll look at how to transfer WordPress MU to another server.