January 7th, 2009
How To Transfer To A Different Web Host
While I am waiting for a couple thousand files to be downloaded and then uploaded from one web host to another, I decided that I should write this blog post explaining how to move your files from one host to a different host.
There are 4 steps to the process. They are:
- Backup your files and then upload them to your new host
- Backup your database and then dump it on your new host
- Recreate email accounts on new server
- Change the domain nameservers
Step 1: Dealing With Files
Firstly you need to log into your existing hosting account via ftp and download all the static files, images and whatever else you have hosted onto your local hard-drive. This may take a while depending on how many files you have hosted and how big those files are.
Once all your files are downloaded on to your local hard-drive, log into your new hosting account via FTP and upload all the files to it. Your new host should have given you an IP address or perhaps even a subdomain which you can use to log in via ftp.
Step 2: Dealing With Databases
This is where it can sometimes get a little tricky. Now that you have all your files ready to go live, we need to move across your databases. The way to do this is to log into a database manager such as PHPMyAdmin and export the database. In PHPMyAdmin I like to download the .sql file.
Now that you have your database exported, we need to import it. Firstly, we need to create a new database on the new hosting account. So, create that and then log into a database manager on your new host and select the database you just created. Now, we import the database from the old host to the new one. In PHPMyAdmin I click the “SQL” link on the top menu and just copy and paste the database dump text from the .sql file into the form field and hit go. It then adds all the old data into the new database.
Now, the most important thing here is if you are running any software such as WordPress, PHPBB or anything else, you may have to change some of the settings in the config files. Open the static config file that you just uploaded to the new host and make sure that all the database connection data is set correctly for the new web host.
Step 3: Dealing With Email
You may also have been using email on your previous host. If so, you will have to recreate the email accounts (or perhaps forwarders) on the new hosting account. Simply log into your new hosting accounts admin area and look for the section which deals with email, and create all the same email accounts as you had before.
Once we complete the final step, all your email will then be handled by your new host. Again remember if you are using Thunderbird, Fedora, Outlook or any other mail client, you may have to change the account settings to accommodate your new web host server. An example would be that some hosts use pop.your-domain.com while others use pop3.your-domain.com.
Step 4: Change The Domain Name Servers
Now that everything is setup and ready to go, all that is left is to log into your domain registrar account and change the domain nameservers on your domain. Replace the old nameservers to the nameservers of your new host. This can take up to 48 hours, so be prepared to be patient while waiting for the changes to propagate.
And thats it
You should now be setup on your new hosting account. Questions? Leave them in the comment box below.

















Of course, if both hosts are using cPanel, you can simply tell your cPanel to create a full backup, ftp it to the new server, and “restore” it – ie, decompress and set up your old server’s files, databases, email accounts, logs, preferences, domains, subdomains and all of that.
And if you’re not using cPanel, you should.
I always advise people to host their mail on Google Apps. That is unless they have issues with Google indexing their mail. Then you never have to worry about moving it around.
As for name servers, my favourite is definitely EveryDNS. Pretty awesome free service. Just change records and your good to go, no moving name servers etc.
@Wogan
Very true. As you say, this is more a guide for people not using a control panel like cPanel. A lot of cloud and cluster hosting services like MediaTemple have their own custom hosting panels though.
@Prieur
Great advice. I host all my mail on Google and it is awesome.
As for EveryDNS, it seems really cool. Just not too sure how much trust I could put into a free service like that. What if they randomly shut down one day? I suppose you would catch it and then switch nameservers, but it would mean downtime…
EveryDNS is a pretty trustworthy service. They have been going since 2001 and is backed by OpenDNS (www.opendns.com) – another very cool free DNS service. They host close on 110 000 domains so they are not just a fly by night
Awesome, I may have to give them a try then!