Migrate your site to a different hosting service

Moving your site to a new hosting service is a very critical procedure, the main objective is to ensure the lowest period of time on which your site could be down due the transfer. Before starting, you need to evaluate your destination, if you don’t have an idea of which hosting service to use, please check this link, it will take you to a list of the best web hosting services 2014, choose wisely.


Now, here is the procedure that I follow when migrating a site:


1. Evaluate your technology needs before purchasing a hosting service

You need to check which technologies are actually needed by your site, for example: you are running wordpress, so your hosting service MUST have php support, .NET for dotnetnuke, Java for Tomcat/JBoss needs and so on. Once you have identified which technologies are needed, then go a find a suitable hosting service.


2. Purchase your hosting service

Once purchased, wait until your new account is ready, make sure you have access to your (s)ftp account and that you can upload files without problems. At this point, do not transfer your domain or change your nameservers.


3. Create a Migration Checklist (from a Linux hosting perspective)

On your old hosting service create a checklist of what element should be migrated to your new account, this is an example of a list:

[ ] – Subdomains (Take note of which is the target folder or if it is a redirection to another site)

[ ] – DNS Records (custom DNS records only)

[ ] – Email Accounts (this part is tricky, I will explain it later)

[ ] – Databases

[ ] – public_html elements (these are your files)


 4. Prepare your subdomains

Since you have access to your new hosting account, start recreating each subdomain, that will also create the target directory at the same time, try to keep the logic of your subdomains, for example: some subdomains are pointing to some web folders, other may redirect to another IP.


 5. Create custom DNS record

At this point, go to your hosting DNS  Zone Editor, create any custom DNS record that you were using on your previous hosting service.


6. Migrate your email account

Here is the tricky part, if you have a third party service to handle your emails like Google Apps, then go and add the required MX records in you DNS Zone like this:

Google MX Settings

Google MX Settings

Now, if you are using the integrated email service of your hosting then you two choices:

1. Create every single email account, then copy all email physical files from the old hosting to the new one (it may work).

2. Ask for support on your new hosting account, they usually have better ideas.


 7. Databases (MySQL perspective)

Start creating all your databases and db users in your new account, then go to your old hosting account and open the phpmyadmin, go to the export tab and use the “Custom” export method, then check the following options:

SQL Object creation

SQL Object creation

Once you have the sql for each database of your, upload them into your new hosting account, find a suitable non-public location, any place except your public_html folder will do.

Edit those files, and remove the Create Database statement (you won’t need it), modify the use database statement, because of your new hosting account, the database name may have a different prefix based on your account name, for example: previously your account was “myus”, so a wordpress database name could be like myus_wor1, but on your new account, they gave you the name of “muse” or “muser”, so your database names will have the “muser” prefix, that’s why you need to change the use statement properly.

Once you have edited the sql file, import them, you can either user the mysql command like:
mysql -u username -p -h localhost DATA-BASE-NAME < mydatabasedata.sql # where username/password belongs to the db user you created previously on your account
or you can just upload the modified sql file directly using the phpmyadmin of your new account, but it could be difficult if the file is too big.

NOTE: Double check your database data after the migration, some application may rely on certain folder structure that could be different on your new hosting service, you may need to adjust them.


8. Move your public_html elements

This is quite tricky, go to your old hosting cpanel, look for the backup feature, and download the Websites backup, this includes all elements present in public_html, this file could be greater than a Gb but it’s better than nothing. Once you have the file, upload it into your home folder at your new account, you may have to use (S)FTP for this. Create a folder and name it like “migrationFiles” then extract your backup file in that position, this may take a few minutes.

Once you have all files extracted, use the File Manager utility in your new cpanel and move/copy the content into your public_html, take a look of how it may look:

Example of File Manager

Example of File Manager

Once you have all your files in place, check for any configuration file, you have to change your database name and credentials, they are in a new home now. At this point, you can test if everything is functional by asking at support if they can provide you an access to the public_html via the hosting ip (Godaddy and Bluehost are very cool with this part), you can see if your site goes up without any crash.


9. Change your nameservers or migrate your domain

At this point you have two choices, if you like your old hosting service and you want to keep them as your domain controller, then go to their domain setup, and change the nameservers according to your new hosting service, but if you really want to go, then you have to perform a Domain Transfer action, for this you need to do the following:

1. Go to your Domain Controller page (usually called domain manager in most cpanel) check if you can unlock your domain for transfer. Some companies allows you to do it by yourself, but if you can’t you may have to open a support ticket.

2. Once your domain is unlocked, find the EPP code, this code is needed in order to authorize the transfer. Again, if the code is not visible, you may have to open a support ticket.

Now go to your new hosting and start the domain transfer, you have to provide the domain name, the EPP code and an extra validation step that requires to enter a code sent to the Admin contact present on the domain registration form. Once the authentication is done, the process will start, the new registrar will ask for the domain once the old registrar “accepts” the movement, the old registrar may revoke or hold the process until proper validation are done (unlikely) but most of them will just not answer the request for 7 days, after those days, the transfer will be performed no matter what (it’s an ICANN policy).

Since your old registrar may “slow down” the process, I recommend to change the nameservers first and wait until the DNS  are now pointing to your new hosting account, this may take like 24 hours…. or 48h in some scenarios so:

Wait for a DNS Propagation

Wait for a DNS Propagation

Once everything is up running, you can now trigger the transfer, they can slow down the process, but you already have your site online.

Follow me

Carlos Alberto Umanzor Arguedas

Web Developer at carlosumanzor.com
Web Developer, QA Engineer and Gamer Enthusiast, Developer of Linkcrawler and Father of a future computer ninja.
Follow me



Pin It on Pinterest

Share This
Optimization WordPress Plugins & Solutions by W3 EDGE