Wordpress 2.2 Server Migration

So recently I decided to move and update my wordpress instance to a new server, with a new domain name. Here is what worked for me.

1. SSH to the current site and zip all the files into an archive.zip. (Don’t just download all the files with a GUI FTP application as it can be very slow, and the program might not copy everything)

2. Download the archive.zip, save it somewhere safe as a backup.

3. Install a new copy of wordpress on your new server (of the most upto date version). You are really only doing this to save the effort of manually creating a database, and configuration file that points to the database.

4. Download the wp-config.php file from the new wordpress directory.

5. Upload the archive.zip, and unzip it to the desired directory. eg. [your site home]/blog/. (I think its a good idea to keep the same subdirectory as your last host. As I tried to change it the first time and the copyed instance of wordpress would not run.)

6. Copy the wp-config.php file you downloaded in step 4 back over the file on the new server.

7. Go you your current sites MyphpAdmin and export the database (pref. as a Gzip), save it somewhere safe.

8. Unzip the exported database, and open with your favorite text editor. Search for your old domain name eg. myolddomain.com and replace it with mynewdomain.com. Depending on what plugins you have installed you might like to check each replacement one at a time. save the file when all changes are made. Note: Its a good idea to update all you all email address at this point as well. if your email address was somethingold@myolddomain.com, after the above search and replace it is now somethingold@mynewdomain.com. So search for somethingold@mynewdomain.com and replace it with somethingnew@mynewdomain.com. This is important for a future step.

9. Go you your new sites MyphpAdmin and select the database you created during install, select all the tables and ‘drop’ them. Then import the sql file you saved in step 8.

10. Visit your new site in your browser, go to the admin section. You might find your password not working. In this case click resend password (or something to that effect). Check you email and use your new password to log in.

11. Go to options > permalinks and update it to the correct setting. (from memory this ensure the .htm??? file is created with the correct settings.

12. Check most things are working. Depending on what plugins and hacks you had made you might have to search the files you unziped from the archive for any more references to you old domain and correct them. You might also need to notify 3rd party services, such as paypal that you have moved. If all is well you should remove the archive.zip file for security reasons.

Notes:

You should probably keep your old site files close for a week or so while you ensure that all is well, as it might take a few days for you to spot something odd happening. These were my experience working with dreamhost.com systems, so other servers may differ a little.

(Ignore this link, its just required by a blog search engine so that they index this blog.) Technorati Profile
Blogarama

Explore posts in the same categories: Technology
subscribe by email

2 Comments on “Wordpress 2.2 Server Migration”

  1. Moving Your Wordpress Blog to a Different Directory | Tech[niques] Says:

    […] quick scouring of the net turned up madteckhead’s Wordpress 2.2 Server Migration. While some other articles seemed to more closely mirror my problem I found them to be a little too […]

  2. Libby Says:

    Thanks for this! It worked like a charm. One thing I would add is to make sure your current blog is on the latest version of Wordpress before you start. Otherwise, Wordpress seems to get a little confused about which version you’re on.

Comment: