Move Wordpress CMS to Another Server With a Different Domain

How to move a Wordpress FTP installation from one server to another that has a different domain

There are two ways to move a Wordpress site between servers, they differ slightly and are based on different requirements.

Moving a Wordpress site to another domain without exporting posts:

This method of moving is for if you are not worried about the original blog functioning or not.
  1. Backup your SQL Database from the domain we're moving from.
  2. Copy everything from the FTP server and save it as a backup on your local machine.
  3. Install Wordpress on the new domain we want to move our site onto (so it's ready for our backed up site).
  4. On your local machine, edit the "wp-config.php" file and add the SQL database username and password of the fresh installation of Wordpress.
  5. You can find the SQL Database information by logging onto the Heart Control Panel for that domain and selecting "MySQL Databases", from there you can view the Usernames and Passwords for active MySQL Databases on that domain and manage them accordingly. NOTE: 'DB_NAME' shoud be the same as 'DB_USER', in the "wp-config.php" file.
  6. Open your backed up SQL Database in your favourite text editor, then run a search & replace for the old domain name, replace for the newer and save your changes (this obviously only applies if the domain name will be changing).
  7. Compress your SQL Database backup file as a .zip so it will come under the 8MB upload limit that PHPMyAdmin has.
  8. Log onto the customers control panel once again, select "MySQL Databases" and select 'Manage' for the SQL Database that will soon be used for the moved site. This will load up the 'phpMyAdmin' panel.
  9. Select your database once you are logged into the phpMyAdmin panel and select "Import".
  10. Browse to your compressed database and select 'upload' (any options you may leave set to their defaults).
  11. Once the database has been imported, providing you have not written your URLs incorrectly you should see the posts etc appear on the new site.
  12. Upload the "wp-content" folder and the "wp-config.php" file to the FTP, replacing their exisiting versions.
  13. The import will remove whatever existing users there are on your new installation of Wordpress and replace them with the users of the imported site. You will need to edit one of the users passwords via phpMyAdmin to gain access to your new Wordpress installation.
  14. In the customer control panel, select "Manage" for the Database (located in "MySQL Databases"), select the database name in question and select "wp_users" on the left hand side navigation.
  15. Click "Edit" on the user you would like to change the password for, look for a Javascript Md5 password generator online and generate an MD5 encrypted password you can use to replace the current password for whatever user you are changing the password for. (Wordpress uses the 'md5 algorithm' to encrypt passwords, so you need to provide a password pre-encrypted for use when editing users via the phpMyAdmin screen.)
  16. There is a way to create users via the phpMyAdmin screen however when it comes to the permissions it seems to fall over.
  17. Activate any Plugins or templates that are required if for whatever reason they failed to activate (they should have). 
  18. Give the site a once-over to ensure everything is working.

Method if a login to existing site is available:

This method of moving is best if you need the original blog to be functional.
  1. On the Wordpress installation we are moving go to Tools > Export. Ensure the drop down's are set to: "All Dates", "All Dates", "All Authors", "All Terms", "All Content" and "All Statuses". Select "Download Export File" and save it to your local machine.
  2. Copy the "wp-content" folder from the FTP and save it locally on your machine.
  3. Install Wordpress onto the new domain.
  4. On the new installation of Wordpress go to Tools > Import, select "Wordpress" and install the plugin if required. Repeat this step once the plugin has been installed however this time you will be able to import your XML file into the new installation of Wordpress.
  5. Upload your previously downloaded "wp-content" folder to the new Wordpress FTP installation, replacing any existing version of it.
  6. Activate any plugins / Themes that failed to activate during the move.
  7. Give the site a once-over to ensure everything is working.