How to transfer your WordPress site manually between hosts
Here is the Scenario:
Your WordPress website is currently hosted on Linux with a company, lets call it OldHost. They do not use cPanel. This website needs to be transferred to your new company with a minimum of interruptions to e-mail and to the actual site. We call the new company NewHost and they provide you with cPanel on Linux.
Note this is a procedure that does not include full testing of the site. Additional steps may be required if uptime and full functionality is critical. If you do not have registered a domain name with your new hosting provider yet or if you want to use the same domain name you may be able to access your site using your ip address and the username preceeded by the tilde (~) charachter. However if you use WordPress you cannot test the site fully with this preliminary domain name as WP will throw a 404 on any virtual subfolders. But your home page should still show correctly as long as you use the correct path in your database (step 15)
Steps:
- Create user account with NewHost (cPanel)
- Create the domain name, which in this procedure is to be assumed the same as the one on the existing site with OldHost
- Create a blank database with a unique password on NewHost
- Setup an FTP connection using the IP address (since there is no domain name assigned yet) see also http://www.netlogistics.com.au/support/pre_ip/
- Access OldHost’s file manager and zip the entire site folder content.
- Using an FTP program (I use FileZilla) copy the zip file onto your desktop.
- Upload the zip file to the NewHost’s server.
- While it is uploading go to OldHost’s MySQL Database and log onto your users’s phpMyAdmin account.
- Export the database (not the information_schema) to SQL. The default settings should be fine. No need to save it as a file.
- Copy the resulting SQL code into the clipboard and paste it into a simple text editor e.g. Windows Notepad.
- Log into the new user’s NL cPanel and open phpMyAdmin
- Click on SQL or click on the database name and then click on the SQL tab.
- Take note of the database name.
- Back in the open Notepad delete the line starting with CREATE DATABASE and replace the database name in the next line (USE …) with the new name.
- If you use a different domain name (e.g. for testing purposes) use the Replace command to replace all occurrences of www.oldDomainName.com with www.newDomainName.com
- Copy the entire text into the clipboard
- Go back to NewHost phpMyAdmin and paste it into the Run SQL query field and click Go
- Go back to the NewHost cPanel, open the File Manager (choose to show hidden files) and locate the zip file you uploaded.
- Unzip the zip file into the www folder.
- Delete the zip files as they are no longer needed.
- Make sure the folder structure is the same as on the old server (e.g. it is not in another subfolder). Important: if you need to move things around you want to see & select hidden files as well.
- Edit wp-config.php and change the database details to the new values: DB_NAME, DB_USER and DB_PASSWORD
- At this point you can bring up the website using the ip address if you don’t have assigned the domain name yet. You should see your theme and a bunch of error messages. That means it’s all good. Once you can access the site with the proper domain name it should all work.
- Back on the NewHost cPanel, set up all e-mail accounts that you have on the old server.
- Flick the big switch: With your registrar change the name servers to your own name servers and then wait. They say it takes 24-48 hours but I found that I can access the site already within a view hours. I think it takes that long until the last server on the globe has updated. Therefore it is a good idea to wait a couple of days before starting to delete files on the old location.
- Don’t forget to setup your e-mail program with the new details and keep checking the old e-mail box for a day or two in case there are any late arrivals.
I would be gratefull for any feedback or contributions to this topic.

