Moving a WordPress Blog to a New Server

This tutorial is written for those of you who have already upgraded your installation of WordPress to Version 2.9. Screen shots were taken using WordPress 2.9.2 on a Vista computer.

You have decided to move your hosted domain to a new server, in this case BlueHost. Before you even think of starting this process, make sure you have plenty of time AND you are not already harassed! This tutorial assumes the domain name will remain the same.

Install WordPress to your new server space. I used SimpleScripts because it was available and it installed the latest stable version 2.9.2. Before you can import the file that contains your posts and comments to your new WordPress setup you will need to change the nameservers to point to your new host server.

NOTE: There is supposed to be a work-around for this by editing the hosts file on your computer but I could not get it to work with Vista. You will also need to allow time for the nameservers to propagate down the line before you can access your new wp-admin panel.

Preparation

Step 1: Log into your current Wordpress account as the Site Administrator and remove any spam and process comments on your blog.

Before you begin the process of moving your blog from your old host to your new hosting account, log into your current blog and using Filezilla or another ftp program, copy the entire contents of your current blog to your hard drive for safekeeping. I copy the files on the server to a folder with the same domain name as the one you are using for the blog.

View Screenshot

Step 2: Log into your current Wordpress account as the Site Administrator. Select Tools > Export from the dashboard. You may have to expand the Tools option by clicking the dropdown arrow.

Screenshot WordPress Dashboard Tools Menu. 

Step 3: Clicking on Export will take you to the next menu.  WordPress Export will create an XML file for you to save to your computer. The format, which is called a WordPress eXtended RSS or WXR file, will contain your posts, comments, custom fields, categories, and tags. You have the Option to Restrict Authors. Select All Authors or choose from the dropdown. Click on Download Export File.

View Screenshot

Make sure to note where you have saved the XML file.

NOTE: The Export function is also a useful method to backup your WordPress data.

Step 4: If you want to be able to import your current  Blogroll i.e. Links they are located in the wp-links-opml.php file. Because you already backed up the whole blog you will have a copy of wp-links-opml.php file on your computer. It is located in the root folder of the files you copied to your computer.

NOTE: The OPML format doesn’t support categories even though they will be there when you do the export. Assign the major category for them when you go to import them as you’re going to have to reassign them afterwards anyway.

Importing to New Server

Step 5: Using Filezilla or any ftp program, copy the following files to your new

  • Copy the contents of the OLD wp-contents folder to your new blog server.
  • If you have changed the setting for uploading files and images from the default folder wp-content/uploads, copy the content of the folder YOU use - in my case images.
  • Copy the analyticstracking.php if you are using Google Analytics.

Step 6: Log into your NEW Wordpress blog account. Select Tools > Import  from the dashboard. You may have to expand the Tools option by clicking the dropdown arrow. WordPress supports the importing of data from a number of external sources. In many cases, posts, comments, pages, categories, tags, and users, can be imported.

NOTE: If you  choose to tick the download and import attachments option, all images and attachments will be in the root directory of the blog.

The Tools Import SubPanel lists the software packages that WordPress can import and details what types of data from each of those platforms qualifies for import.

 Select the type of file you will be importing, In this case, click WordPress.

View Screenshot

Choose the XML file you exported earlier > Click Upload File and Import.

NOTE: The maximum allowed file size is 2mb.

View Screenshot

Step 7: The next screen will allow you to assign authors. To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as admin entries. If a new user is created by WordPress, a password will be randomly generated. Manually change the user’s details if necessary. You may also choose to download and import file attachments. Click Submit.

View Screenshot

Once WordPress has imported your xml file, you will see a listing of those items that have been imported.

View Screenshot

Step 8: Select Tools > Import  from the dashboard.

Select the type of file you will be importing, In this case, click Blogroll which will Import links in OPML format. 

NOTE: There are two options when importing links. You can import links from an existing blog, or you can import links from a file you have saved to your computer.  Click Import OPML File.

View Screenshot

Once WordPress has imported your OPML file, you will see a listing of those items that have been imported.

View Screenshot

Step 9: All of the imported links are assigned to one category so you will need to add the missing categories OR use a plugin such as Import Blogroll With Categories which will NOT work with the latest version but will up to 2.7.1.

View Screenshot of imported blogroll listing

Adding Link Categories

Step 10: Go to Links > Link Categories > Add Link Category 

NOTE: To expand the menu, click the dropdown arrow.

Type the name you want for the link category. Example: Counted XStitch Designers.

Type  the link category slug. The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens. Example: cross-stitch-designers.

The Description is optional.

Click Add Category button. You will see the Link Categories listed on the right hand side of the screen.

Once you have added all of your link categories, you can then reassign the imported Blogroll links to the correct categories.

For more detailed instructions on Setting up your blog, please download the free Launching a WordPress Blog EBook

Reassign Link Categories

Step 11: Go to Links > Edit > Edit Links  NOTE: To expand the menu, click the dropdown arrow.

Work your way through each of the links. Click Edit > Update the Link Category > Click Update Link

Setting Up Your Blog

For more detailed instructions on setting up your blog, please download the free Launching a WordPress Blog EBook

Permalinks

Step 12: Click on the Visit Site at the top of the Dashboard to visit your blog. If you click on the Hello World post, you will see the following as the post name in your blog http://wp-blog.css-layouts.org/?p=1 which is not very SEO friendly. You will also see the default WordPress theme in place.

You can change the way your post titles are displayed by going to Settings > Permalinks and under Common Settings, select Custom Structure then paste in the following: /%postname%/

Your post url will now be displayed as http://wp-blog.css-layouts.org/hello-world  which is much more SEO friendly.

Activate Your Theme & Plugins

Step 13: The Default Theme is the one that will greet you. Activate your old theme. If you have customized the theme or widgets you may need to make adjustments.

Step 14: Reactivate and configure your plugins. You might want to make note of your API code as you will need it to set up some of your plugins including Akismet.

Step 15: Check and make sure everything works as you expect it to including any plugins such as your contact form and site map.

Add a New Account for Yourself

I purchased Digging Into WordPress  by Chris Coyier & Jeff Starr when it first came out in pdf format. It is also now available in a print edition. One of the suggestion they had that I have implemented is to add a new account for yourself. Once you set up an account with a username, the username can NOT be changed. So "admin" remains "admin" forever and ever.

Step 17: Set up a new account with a new username for yourself AND a very secure password. Give that account full administrative privileges.

Step 18: Log in under your new account and edit the default admin account (DO NOT DELETE IT!).  Give it ONLY subscriber access.

You can read many more of the tip Chris and Jeff offer in  Digging Into WordPress.

Additional Resources:



Copyright 2010 Expression Web Tutorials & Templates
Revised, Updated, and Tested April 2010