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 – be sure to check the extra instructions and info in the HTTPS section.
- cPanel – Most hosts will do a free cPanel migration for you. But, some hosts don’t have cPanel or make taking a backup there possible. That means you’ll be doing a manual migration and some hosts charge for that service, and/or it may not get everything. See the manual migration section for more.
- Changing hosting environments – keep in mind that your new host may use a totally different server type, or a totally different server setup than your old host. Failure to strip out the old setup after migration is the main cause of breaks at the new host.
- 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 or control panel at original host – for some hosts, the client area and control panel logins are the same
- 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.
NOTE: Some hosts use the PHP version manager shown in the tutorial above. Some use a MultiPHPini manager/editor. Be sure you check which way it is done at both hosts, and if different, advise the new host to strip out the old way after the migration!!
Check for Extra .htaccess Files
If you’ve had your site a long time, or you’re on a host that has been around since 2009, they may have hidden .htaccess files all over your hosting account.
Those directives can seriously impact how your site acts at the new host, as they may have super old instructions or PHP handlers that your new host doesn’t use.
Be sure to check every directory/folder on your current site and remove the extra .htaccess files prior to migration, if possible. Or remove immediately after.
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 standalone 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. Give that 24 hours to process before requesting your migration.
If you got your CloudFlare account directly, meaning that you signed up for it yourself at CloudFlare, follow the steps in the tutorial further down the checklist for disconnecting it yourself.
What to do 24 hours prior to migration
No More Changes
Stop making any changes to your site after you request, and until 24 hours have passed since the migration is complete and the DNS (nameservers) updated.
Any changes to your site during the migration period may not appear on the site after migration, as they may not have been included in the backup taken for migration.
Get a Full Backup
Take a full backup of your site the night prior to migration.
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.
READ: Backup Checklist to ensure you are getting a full backup.
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 if this will be a cPanel migration.
That will ensure that the site in the root remains the same.
If you want to use a different primary domain for the new hosting account, then the host may need to do a manual migration and/or may charge for making the change after the migration.
Add-On and Sub-Domains
Make note of any add-on or sub-domains you may have at the original host.
They should transfer over in a cPanel migration.
The host may charge extra for manually migrating more than one site.
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
NOTE: You don’t technically have to delete your site from Cloudflare. You can simply update the A record to the new host’s primary IP. However, I ALWAYS take a site off Cloudflare first because I want to get a fresh scan of all the DNS records at the new host. Otherwise you would have to manually delete/add records that are not the same between the two.
NOTE: Taking your site off Cloudflare does leave it vulnerable, as you are no longer receiving the security protection CF provides. That’s why you want to do this step 12-24 hours prior to the migration.
NOTE: If you are on the Pro (paid) plan, you’ll receive an email that your account has been terminated. The CF account is still active, meaning you can still log in. And you can simply get back on the Pro plan after migration. You’ll have a slight disruption in the billing cycle and will get charged a pro-rated amount when you put the site back on Cloudflare.
Go to the Caching tab.
- Purge Everything
- Wait 10 minutes for it to fully clear.
Go to the Overview tab.
- In the lower right column, click Remove Site from Cloudflare
- NOTE: Cloudflare tweaks the interface often, so where this link appears may be different than stated here.
CloudFlare will warn you that your settings will be lost, but they won’t be. Only the DNS records will change.
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 they may request:
- Primary domain name
- cPanel login at the original host
- FTP login at the original host
- PHP level and switcher
Your new host may require additional information.
Instructions to Include
Be sure to tell your new host:
- to match your current PHP level
- where to strip out extra PHP handler directives if they do it differently
- about any extra .htaccess files
- about any security plugins that creates a .user.ini file
- if your email runs through the host or not
- about any special FTP accounts
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 nameservers 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 if it was a cPanel 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.
Change the password for control panel login on your new host.
If your site was already converted to HTTPS, ensure that a new SSL certificate has been issued at your new host.
It cannot be issued prior to pointing the DNS to the new host, so it may not be active. It should activate once the DNS propagates to the new host’s primary IP. If not, and you have cPanel, you can run AutoSSL to connect it. If your new host does not have cPanel, then ask them to do this step for you.
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.
Rotate the SALT keys in wp-config.php at the new host.
These are your master login encryption keys. READ: Why to Rotate Your SALT Keys for Better Brute Force Protection for more on why you want to rotate them regularly.
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!