This post may have affiliate links, please check the full disclosure on this post.
How I did the migration – you can skip this part if looking for quick answer on how to view website before changing dns, just scroll down to the second part
I have finally done it: switched host for my website. It’s the migration from Hostgator to Bluehost.
Now I am generally satisfied by the Hostgator service but I had some problems upgrading to the their hatchling plan. You see when I first started I thought one site is enough (haha) and I wasn’t sure if I’d continue doing websites. But now I am quite hooked. It’s even strange how I can’t quit even if I want to.
So my first host was Hostgator and their baby plan. Then I had some site downtimes, one even on New year’s eve!, and decided to give Bluehost a try. And with Bluehost you get unlimited domains from the one hosting package you buy.
So I had some sites on Bluehost and only one on Hostgator. And the thing that pissed me most is that they automatically renewed my baby plan while I wanted to expand to the hatchling plan. So that was the final draw and I knew I truly wanted to switch to Bluehost.
I don’t know about you but the migration sounded quite scary to me. So I postponed it as long as I could.
And yesterday finally made the migration from Hostgator to Bluehost. I’m not gonna go too much into details with this but basically here are the steps required:
1. I use “W3 Total Cache” so it is necessary to clean all the caches that you can find that are activated. I also use “Optimize Database after Deleting Revisions” plugin so I did optimization of the database.
2. MAKE A BACKUP
This is so crucial! You have to make a backup. I did 2 kinds of backups – one from the cpanel and their wizard backup software: one backup for my home directory and one for my sql database. I also made a backup of my wp-content folder from ftp. I used Filezilla. The ftp backup of wp-content folder is something that I actually used for the migration as well the sql db backup.
3. Make a new addon domain on Bluehost. There are plenty good video explanations for this step on youtube, just search it. I had to verify it as I haven’t yet switched the dns nameservers. For verification I had to find my EPP authorization code, Godaddy emailed it to me. Just search for this step, there are good explanation online.
4. I created new database on Bluehost. Completely unrelated to the one I am migrating. Different database name and user as well as password.
5. Install new wordpress on the new addon domain and for the newly created database. I used an install script on Bluehost for faster solution.
6. Now import the backup database from PhpMyAdmin. I had no problems with this so if you have problems at this step I can’t advise you.
7. Copy the backup wp-content on the new host (Bluehost for me) via ftp.
8. Update wp-config.php with the new database name and user. You also need to know the database prefix of your old database. But if you can’t remember just go to PhpMyAdmin and check it. Replace the table prefix in wp-config.php with your old one.
8. Find the IP adrress of your new host (Bluehost for me).
View Website Before Dns Resolves
So until this step I have copied my wp-content folder and imported my old database, updated wp-config.php as well.
Now go to etc/hosts on your computer. As I have windows for me this was the path: “C:\Windows\System32\drivers\etc\hosts”.
Open the hosts file as administrator (you can do so from control panel by opening the file as administrator).
After the line:
you just add a new line with the ip address of the new host followed by your fully qualified domain name. You may have to include www. For example:
This will tell your computer to go look for the given ip when searching for the site. You will be able to preview the site and check if the migration was successful before actual changing of the dns servers or propagation as it is called.
Now to test if this is really resolving the right way (to the new ip) you can ping your site from command line:
and check the ip it gives you.
If you still have problems here are some additional steps:
Open command line prompt. You can reset the dns resolver cache:
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
This is another step to ensure you are truly accessing your migrated site before DNS change.
Try also restarting Windows if none of the above is working for you.
After verifying all is ok and changing the dns nameservers in Godaddy finally this is the command that was most helpful to me:
On my Non-authoritative answer I could see if the propagation has finally finished and be completely sure that what I am seeing is my fully migrated site.
If something is unclear please check more detailed explanations as I have just quickly told you the commands and steps I took for successful migration of my site from Hostgator to Bluehost.
Oh by the way I checked prices for site migration: they range from 100$ to 400$. So if you are really good at it you can start selling this service :).
Good luck with whatever you do!