How To Move A WordPress Site

Following are step by step instructions on how to move a WordPress installation.

I’d advise Semiologic Pro users who can’t make any sense of what follows to contact a virtual assistant.

If You Installed WordPress With A One-Click Installer…

If you’ve one-click installed WordPress via your host’s control panel, you’ll typically find a list of your existing installations somewhere in your control panel.

In this list, your site will frequently be listed under its old location after you’ve moved it. Do not delete it, as you’d end up deleting all of your data.

Moving A Site To A New Location On The Same Server

This is relatively straightforward.

1. Make a Backup

Honestly, you really should. Because you never know… Plus, you’re going to panic a few times if you’ve never gone through this before. You’ll panic less if you’ve a backup.

Browse Manage / Backup after activating the Database Backup feature from Semiologic Pro, and backup your database.

2. Turn The Cache Off

If you are using the Semiologic Cache plugin or similar software, turn it off; and delete these files and folders:

wp-content/advanced-cache.php
wp-content/cache/

3. Copy Your Files

Using your favorite FTP software, download the site’s files (including uploads folders, media folder, etc.) to your desktop. And upload them to their new location.

At this stage your new site shouldn’t be very functional, because trying to log in will in fact log you into the old site. Try it, you’ll see.

4. Change Permissions

Odds are you need to make a few files and folders writable by the server. In particular:

  • The .htaccess and wp-config.php files.
  • The wp-content/ folder.
  • The wp-content/headers/ folder, and the file within it, if you’re using the Semiologic theme.
  • The wp-content/authors/ folder, and the files within it, if you’re using the Author Image plugin.
  • The wp-content/sitemaps/ folder, and the files within it, if you’re using the Sitemap plugin from Semiologic Pro.
  • The wp-content/sem-cache-config.php file if you are using the Semiologic Cache plugin.
  • The media/ folder if you are using the Mediacaster plugin; and maybe a few of its subfolders as well (e.g. media/2008/ and media/2008/04/ if you’re going to write new posts in April 2004).

5. Change The Url

Log into the old site, browse Settings / General, and change both of the site urls. This will log you out as a side effect.

Don’t panic. Your old site might look like a mess. So might your new site. And your new site is probably returning 404 errors all over the place. All of this is perfectly normal.

6. Refresh Your Permalink Structure

Log into the new site, and browse Settings / Permalinks. Save your settings to refresh the contents of your .htaccess file. Your done.

Moving A WordPress Site To A New Server

The procedure is similar to the one above, except that we’re going to need to move the database.

Steps 1 to 4 are unchanged. Please refer to the instructions above.

Step 5 is unchanged as well. But make sure you’ve mastered step 6, below, before you give it a go — your site will be down until you’ve completed it.

6. Move Your Database

Open your wp-config.php file. On your new server, create a database with the same details — or create a database with different details, then update your wp-config.php file.

You can now move your database (video):

On your old server, open your old site’s database in phpMyAdmin. Depending on your host, you’ll find it under MySQL, or Databases. Please contact your host if you cannot locate it.

In phpMyAdmin, you’ll find a menu item that goes something like Import/Export. Export your entire database as a zip archive.

On your new server, open your new site’s database in phpMyAdmin, and use that same menu to import it.

Was the import successful? Great. Now you can go through step 5. Change your old site’s url, under Settings / General. And repeat the process.

You can then proceed with the last step: Refresh your permalink structure, as above. And you’re done.