Transferring WordPress to Another Server

Posted by Johan Cyprich on 04 Jan 2008 | Tagged as: How To

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://202.73.208.34/MyBlog. This address defines your blog at the IP of 202.73.208.34 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.



Tweet This Tweet This Post!

Related posts:
    Transferring WordPress MU to Another Server
    Over 500,000 WordPress Users
    WordPress 3.0.4 Security Update
    WordPress 2.5 Is Here

Share this post:

del.icio.us:Transferring WordPress to Another Server digg:Transferring WordPress to Another Server spurl:Transferring WordPress to Another Server wists:Transferring WordPress to Another Server simpy:Transferring WordPress to Another Server newsvine:Transferring WordPress to Another Server blinklist:Transferring WordPress to Another Server furl:Transferring WordPress to Another Server reddit:Transferring WordPress to Another Server fark:Transferring WordPress to Another Server blogmarks:Transferring WordPress to Another Server Y!:Transferring WordPress to Another Server smarking:Transferring WordPress to Another Server magnolia:Transferring WordPress to Another Server segnalo:Transferring WordPress to Another Server gifttagging:Transferring WordPress 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.


Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply

CommentLuv badge