I recently moved my photo blog to a new domain and this is how I got all the wordpress data and files transfered and setup.  This guide is based off the official Moving WordPress guide on the WordPress Codex with the extra steps I need as I was moving an existing site to a new site that was created using my ISP one click installer.

  1. Backup the original site:
    1. Use an FTP client to download copies of all the file from your old wordpress installation and also any files in your file upload location if you are using a custom location (you can check this in Settings > Media).
    2. Use phpMyAdmin to download a copy of the database.
    3. Store these copies in a folder clearly named something like ‘original files’.
  2. Change Domain:
    1. Log into your blog’s administrator account.
    2. Go to the administration > Settings > General panel.
    3. Change the WordPress address (URI) and Site Address (URL) box to the new URL which should match.
    4. Click save changes but do not try to view your blog now!
    5. Using an FTP client download copies of all the file from your old wordpress installation and also any files in your file upload location if you are using a custom location (you can check this in Settings > Media).
    6. Use phpMyAdmin to download a copy of the database.
    7. Store these new files in another folder named something like ‘modified files’.
  3. Restore your old site back to its original state by uploading the original files using an FTP client and restoring the original database using phpMyAdmin.  It should be safe to goto the site again and it should work.
  4. Download the wp-config.php file created by your ISP’s one click installer this has the configuration details we need to run the old site on the new installation.
  5. Copy the key database settings from the new configuration file into the configuration file in the modified files directory, this will allow the old site to run in the new installation.  I copied the following settings from the new file into the modified file:
    1. DB_NAME
    2. DB_USER
    3. DB_PASSWORD
    4. DB_HOST
    5. DB_CHARSET
    6. DB_COLLATE
  6. Drop the wordpress tables in the new database created by your ISP’s installer, they will be prefixed by whatever table_prefix is set to in the new config file.
  7. Rename the tables in the database backup, search for table_prefix from the old configuration file and replace it with the prefix specified in the new configuration file.  This isn’t essential but I like things to be tidy.
  8. Upload the modified files using an FTP client to the new server and the tables in the modified database using phpMyAdmin to the empty new database.
  9. Replace the links to the old site in the posts table in phpMyAdmin using the replace function in a MySQL query, you only need to search the post_content field: replace the old URL with the new URL.

Your old site should now be running on the new domain with working links and correctly named database tables.  This guide is meant as a rough guide for those wishing to move a domain without relying on automated scripts and is a record of how I moved my WordPress 3.5 site between domains.

Follow this guide at your own risk!