Bottom line: A clean migration takes about 90 minutes if you follow the order below. The order matters — most broken migrations are out-of-order migrations.
Before you start: 4 things to confirm
- You have admin access to the old hosting account
- You have HostGator login + cPanel access
- You can access your domain registrar (to update nameservers)
- You have at least 30 minutes uninterrupted
Step 1 — Back up the old site
Two backups, two formats:
- Full file backup: Download the entire
public_htmldirectory via FTP or cPanel File Manager. - Database export: phpMyAdmin → select database → Export → SQL format → Save.
Keep both files locally. These are your safety net if anything breaks.
Step 2 — Use HostGator's free migration (if available)
HostGator offers a free migration on most shared plans. To request it:
- Log into your HostGator account
- Open a support ticket: "Migration assistance"
- Provide old hosting login details
- Wait 24-72 hours
Skip to Step 6 if you go this route.
Step 3 — Manual migration: upload files
- Connect to HostGator via FTP (Filezilla works)
- Upload your full
public_htmlbackup to HostGator'spublic_html - Wait for the upload to complete fully — partial uploads cause site breaks
Step 4 — Manual migration: import database
- HostGator cPanel → MySQL Databases → create a new database
- Create a new user, assign full privileges to the new database
- cPanel → phpMyAdmin → select new database → Import → upload the .sql file from Step 1
- Wait for import to finish — large databases can take 5-10 minutes
Step 5 — Update wp-config.php (WordPress only)
Edit wp-config.php in HostGator's public_html with the new database credentials:
- DB_NAME: the new database name from Step 4
- DB_USER: the new database user from Step 4
- DB_PASSWORD: the new password from Step 4
- DB_HOST: usually 'localhost' on HostGator
Step 6 — Test before changing nameservers
This is the step most migrations skip — and it's the one that prevents the broken-site disaster.
- Edit your local
hostsfile to point your domain at HostGator's IP - Visit your domain — it should now load from HostGator
- Click around. Test the homepage, a single post, a category, the contact form
- If anything is broken, fix it BEFORE updating nameservers
- Once everything works in the test, remove the hosts file entry and update nameservers at your registrar
What to do after the nameserver change
- Wait 1-24 hours for full DNS propagation
- Re-test the live site
- Submit the new sitemap to Google Search Console
- Cancel the old hosting plan AFTER 7 days of confirmed stability — never sooner
The 3 things people break on migration
- Skipping the local hosts test (Step 6). Always test before nameservers move.
- Cancelling old hosting too soon. If something fails on day 3, you need the old account to roll back.
- Not updating WordPress siteurl. If URLs in the database are absolute, run a search-replace after migration. Better Search Replace plugin handles this in 30 seconds.