See the special steps you need to take before and after you migrate to a new host, especially if you’re currently using CloudFlare or have converted to HTTPS.
!!!!!!!! READ THIS FIRST !!!!!!!!!
Following are a few tips to help you have a smooth migration.
- Read the whole post before attempting any of the steps.
- HTTPS – The first part of this tutorial assumes that your site is not HTTPS.
- If it is HTTPS, there are extra instructions and info in the HTTPS section.
- cPanel – This tutorial assumes that your new host is doing a free cPanel migration for you. If not, see the notes near the end about the host doing a manual migration.
- Your exact steps may vary, depending on your host and domain registrar.
- Check with them for support first.
I’m happy to project manage the tech parts of your migration.
Just contact me :-)
General Migration Steps
The following steps apply to all migrations.
Test your logins
Do yourself and your new host a favor and actually test the login info before you give it to them.
Bad login info costs time and money.
Ensure you can log into all of the following:
- Client area at original host – to gather info needed for the migration
- cPanel at original host
- Domain registrar – if different from original host
- CloudFlare – if a standalone account
PHP Level and Switcher Tips
To ensure your site doesn’t break after you migrate, you need to ensure that both hosting accounts are using the same PHP level.
Check with your original host to determine what your current PHP level is.
Most new hosting accounts are being set up with PHP 7.x as the default.
If you’re not at that level with your original host, have the new host match your current level.
You can upgrade your PHP level after you switch.
READ: Check Plugins for PHP 7 Compatibility for more details on switching.
NOTE: All hosts have different ways of setting the PHP version!!! Be sure to have them check how that is being done at the original host and strip out anything that won’t work on the new host.
Domain Registrar Tips
If your domain registrar is your original host, then you’ll either need to:
- Keep your account open with them for just the domain.
- Transfer your domain to another registrar.
If you stay at the host for the domain, and a free domain was part of the package, you’ll suddenly need to start paying for the domain.
For better security, it is preferable to have your hosting and domain at two different companies.
I like GoDaddy and Namecheap for domain registrars (not for hosting).
Transferring and pointing a domain are two different things.
- Transferring means you are moving to a new domain registrar (who you pay for your domain).
- Pointing means you are directing the DNS to where your site files exist, (who you pay for hosting).
CloudFlare Account Tips
If you got your CloudFlare account through your original host, you will need to have them detach it first.
Some hosts give you a login to a CloudFlare account, some don’t. You’ll need to check with your host.
If your CloudFlare account is through the host, they should do the DNS changes for you when the accounts are disconnected, just like they did when the accounts were connected in the first place.
If you got your CloudFlare account directly, meaning that you signed up for it yourself at CloudFlare, follow the steps in the tutorial below for disconnecting it yourself.
Read through the steps below before disconnecting CloudFlare, no matter who does it!!
No More Changes
Stop making any changes to your site.
Ensure no posts are scheduled to publish.
Get a Full Backup
Take a full backup of your site.
And I do mean full!!!!
Ensure your backup includes:
- Wp-config.php file
- .htaccess file
- Robots.txt file
- The entire wp-contents directory (excluding other backups and cache folders/files)
- Extra files for Google verification, Pinterest verification, etc.
All of these files and the database will transfer over in a cPanel migration.
But, if you can’t do a cPanel migration, or you’re moving to another host using a restore from your backup, you’ll need all of these files.
Check your restore process
Not all backup solutions offer a full restore of the WP core files and may require that you set up a database and install WordPress first.
With your own, full backup, no matter what happens during the migration, you can rest assured that you have everything.
FYI, it’s a good idea to ensure that your backup is truly full, and you can easily restore from it any time, not just for this migration.
Want to check your backup files? I can restore your site to a sandbox to ensure you’re getting everything. See site services details here.
Get New Hosting Account
Be sure to use the same primary domain name for the new hosting account as you have for the original hosting account.
That will ensure that the site in the root remains the same.
Make note of any add-on domains you may have at the original host.
They should transfer over in the cPanel migration.
You just want to make note of them. Don’t set them up on the new host, but do check them after the migration.
Check your email/mailbox setup on your original host.
Again, these should transfer during a cPanel migration, but you do want to check before and after to ensure they make it through.
Be prepared for email disruptions!!!
When your domain is propagating through all of these changes, your domain related email delivery will be disrupted too!!!!
You may want to use a non domain related email for your new hosting account, to ensure you receive emails from them. Perhaps set it up temporarily to notify a Gmail account that is not associated with your domain.
READ: Get Your Email Off Your Hosting for more reasons why I advocate that you don’t use your host email service for anything.
How to Migrate Your Site
Step 1. Get your original host’s DNS info.
It will look something like this:
(You may have up to 4 DNS records.)
Some hosts display the DNS info in the sidebar of the cPanel.
Some hosts display it in your hosting account admin panel (where your billing info is).
If you don’t see it in those two places, contact your host.
Step 2. Get your CloudFlare DNS info.
Log into your CloudFlare account and go to the DNS tab.
Take a screenshot of all records.
Copy special records into a plain text editor like Notepad.
Special records include:
Most of those special records will be email related.
If they are records from your mailbox on your host, they will be picked up again in a later step.
If they are records from an outside account, like GSuites (Gmail), they may or may not be picked up again, so ensure you have copies.
DKIM records may be from:
- Your host email account
- 3rd party email accounts, like MailChimp
NOTE: If your CloudFlare account was through your host, you may or may not be able to see these records.
Step 3. Purge the CloudFlare cache.
Go to the Cache tab.
- In the first module, click the down arrow and select Purge Everything.
- Wait :30 minutes.
- Then purge everything again.
- Wait :05 minutes.
Cloudflare will report that you only need to wait :30 seconds.
But, I’ve been burned more than once by not giving CloudFlare a full :30 minutes to purge it’s cache from all over the globe.
The second purge is to clear what little bit it may have cached while you were in that first waiting period.
Step 4. Delete Your Site from CloudFlare
Go to the Overview tab.
- In the first module, click the Advanced link.
- Then click the Delete button.
I know this step sounds extreme, but it’s not if you have your own CloudFlare account.
CloudFlare will warn you that your settings will be lost, but they likely won’t.
Your host DNS settings are going to change when you move to the new host, but the rest of your settings will likely remain.
NOTE: If your CloudFlare account was set up through your host, you may very well lose your settings. If you can see them, copy them.
Settings that likely won’t change include:
- Page Rules
All of those settings will return when you submit your site after the migration, in a later step.
Step 5. Point your DNS to Your Original Host
It will take from 2-24 hours (sometimes up to 48 hours) for your domain to fully propagate back to the original host.
Step 6. Request the Migration
Open a support ticket at your new host to request your migration.
Some hosts have a specific form for you to fill out, so look for that.
Most require the same basic info, but check with them to be sure.
Basic info to include:
- Primary domain name
- cPanel login at the original host
- PHP level and switcher
Your host may require additional information.
NOTE: Keep in mind that any changes made to your site after the migration request may not get into the backup the host takes.
That includes any comments left on your site.
So, you may want to check with your host to see how soon they process a migration after the request is made, and try to do it on an off day, when traffic and comments are likely to be as low as possible.
Step 7. Preview Your Site
Once the migration is complete, your host will send an email with the new DNS information.
Before you point your DNS to the new host, preview your site first, to ensure nothing is broken.
Each host has their own way of allowing you to preview the site prior to pointing the DNS. Check with them for instructions.
Step 8. Point Your DNS to the New Host
Log into your domain registrar and point your DNS to the new ones that the new host provided you.
Wait 12-24 hours before doing the next step, to allow the domain to fully propagate.
You may need to wait longer for your domain-related email to catch up, depending on how you have that set up.
Maybe send yourself an email from another address to check it.
Step 9. Submit Your Site to CloudFlare
If you did not already have your own CloudFlare account, create one.
- Submit your site.
- Point your DNS to CloudFlare.
- Check your CloudFlare settings, especially all DNS settings for MX, TXT, and DKIM records.
It may take up to 2-48 hours for your domain to finish propagating.
And again, your email may lag behind.
Update Hosting Account Logins
The login info you received from your new host likely became invalid immediately after the migration.
It was likely overwritten with the login of your original host.
Be sure to try to log into your new cPanel (once the domain has fully propagated to the new host) and check that you have the correct info.
Also, check that info in your hosting account area and ask the host to update the login, if it is incorrect and was indeed overwritten during the migration.
If your site was already converted to HTTPS, ensure that a new SSL certificate has been issued at your new host prior to migration.
When you delete your site from CloudFlare, your original host certificate should still keep your HTTPS status active.
But, if you enabled HSTS through CloudFlare, you’ll lose that status until you resubmit your site after the migration.
The HSTS security header is required to be on the Chrome Safe Site Preload List.
It’s not likely that you will lose that status if there are only a few days between the time you take the site off CloudFlare and when you put it back on.
You’ll want to check your SSL status again about 12-24 hours after you re-submit your site to CloudFlare.
Delete Files and Database at Old Host
Once you are satisfied that all is well with your site at the new host, you need to take one more step.
Be sure to delete your site files, database, and database user at the old host.
Your database and some of the site files contain site access info.
You most certainly do not want those files sitting on the old host unattended.
Hosts take their own sweet time with clearing server space. There’s no telling how long those files will sit there before they are deleted by the host.
Don’t leave that potential security hole wide open for hackers!!!!
Deleting the files is not enough.
You need to also delete the database and its user too, as those contain your site login info.
If you need to move to another host in a hurry, or your site is not accessible, you may not be able to do all of the steps above due to lack of access on the original host.
This is precisely why you need to do the following right now, while you have access and are not under duress. They will make migrating under duress easier.
Take these steps today:
- Ensure you have your own full backup that you know how to restore.
- Have separate accounts for your domain and hosting.
- Get your email off your hosting – if you can’t do a cPanel migration, you’ll lose your email.
- Get your own CloudFlare account.
- Disconnect any 3rd party account offered by your host via cPanel or other integration.
Some hosts offer CloudFlare, Sucuri, and other 3rd party services at a discount via cPanel. Don’t do it. Get your own
When connected through the host, the settings for those accounts are in a grey area and you may or may not be able to disconnect them yourself.
If your host is toast, meaning that it has fried or come under attack, and you can’t get to your cPanel or support, you’ll have a tangled mess to sort out during a migration.
Whatever meager discount you were getting won’t matter anymore.
If you are on Bluehost or HostGator, or one of the other 50+ hosts owned by EIG, your host will likely not be able to do a cPanel migration. They should be able to do a manual migration for free, though.
The following items will not transfer to your new host:
- domain related email accounts
- extra FTP accounts
- redirects made in cPanel
You may want to get those items checked/cleaned up prior to making the migration request.
You can have a smooth and easy migration to a new host by going through this checklist first, and getting all of your ducks in a row before you request the migration.
It’s way easier to do that than it is to detangle a messed up site or accounts after a move.
Be patient with the steps that require a wait period.
Taking next steps too soon could further delay the migration completion.
I’m here if you need help!