Moving a WordPress site from one host to another with minimal of downtime doesn’t have to be a huge hassle, and it’s easy to do it yourself even if you aren’t a web developer. Here is the process I use to move a WordPress site to a new host, with about 10 minutes or less of actual downtime (and because of caching, many visitors during the migration may not even see the outage).
I like this method because:
- It’s easy
- You don’t have to mess around in MySQL
- It’s free
- It’s maybe 10 minutes of downtime for your site, depending how fast you can upload your backup and how much you have to do to get your caching plugin/CDN (if you have them) on board with the new IP address
Before you begin, make sure you have:
- A WordPress site on your current host
- Access to your new hosting account (preferably with CPanel and phpMyAdmin to get the most out of this guide)
- Access to your domain’s DNS records (yoursite.com may be registered with your current host, or a separate registrar)
- Nameservers for your new host (they usually look like ns1.newhost.com)
- FTP access to old host and new host via your choice of FTP software (I use Filezilla) *optional* – you can do the same stuff through your host’s CPanel File Manager if they have it
- About an hour of time to dedicate to reading this guide and the actual migration
Step 1: Install UpdraftPlus plugin on your site
Log into your WordPress dashboard (http://yoursite.com/wp-admin) and install the free UpdraftPlus plugin.
This plugin is awesome and I recommend it for use outside of just moving your WordPress site to a new host. Here’s why:
- The backup files do actually work (this plugin has saved my ass a couple times now)
- You can use it to make a manual backup of your site at any time
- You can set it up to create automatic backups and put them on the cloud storage service of your choice (personally, I back up to Google Drive)
Step 2: Use UpdraftPlus to make a backup of your site
Use Backup Now to start the backup process.
I like to do this right before I’m ready to start the migration process, so the backups are as fresh as can be.
Step 3: Download your backup files
Go back to your UpdraftPlus plugin page and go to the Existing Backups tab. Find today’s date and click each of the buttons (database, plugins, themes, uploads, others).
Updraft will prepare each backup file for you (there are 5 total). Wait for Updraft to prepare the files, then click Download to your computer for each one.
You’ll get 5 compressed files:
Step 4: Set up an account with your new host and install WordPress there
If you haven’t done so yet, sign up for an account at your new host.
I use the StartUp package for my up-and-coming sites, and the GoGeek plan for my top performers. You can upgrade your plan at any time as a site grows. I especially like the GoGeek plan because they throw in SSL for free (or at least they did for my first year) and because it has a separate staging environment for testing stuff on a copy of the site before pushing it live.
Next, install WordPress on your new host. Many modern hosts (including SiteGround and BlueHost) have an easy one-click install for WordPress nowadays – look in the CPanel or just the dashboard in general once you’re logged in.
Don’t worry about picking a login/password you want to use in the long run, your Updraft backups will replace whatever you choose during setup with whatever your existing site already has. Do write down whatever name/password you choose here, you’ll need it to access your new WP install until you overwrite it with your backups.
It’ll probably tell you the installation was successful and you can go see it at the following url, but that link won’t work because you haven’t updated your domain’s nameservers yet.
Step 5: Change your domain’s nameservers
I do this in dynadot.com’s domain manager because that’s where my domain is managed, but your domain may be attached to your old hosting. In any case, change its two nameservers from ns1.oldhost.com and ns2.oldhost.com to ns1.newhost.com and ns2.newhost.com (or similar).
It should propagate fairly quickly (check it here: https://www.whatsmydns.net/) but it may take a while to see the change on your machine. One way to speed it up (on Windows, anyway) is to open a command prompt (cmd) and type ipconfig /flushdns.
Load your site again (in an Incognito window in Chrome or after clearing browser cache) and you should now see your new WP install.
Step 6: Install UpdraftPlus on your new blog and restore backups
Now that you have dashboard access to your new WordPress installation, install UpdraftPlus and click Restore.
Drag your 5 files here and wait for them to upload.
When those are done uploading, click Restore.
Follow the prompts until you’re force to re-log in to your site. It should now look exactly like it used to on your old host, but you can confirm that it’s actually on your new host by pinging it in a command prompt or Terminal window (ping yoursite.com). If the IP address returned matches your new host’s, you’re good to go.
Extra step for CDN users:
I’m on MaxCDN, but regardless of what CDN you use (if you use one) there will probably be some additional setup steps to make sure your existing CDN account references your new IP and host.
I went through this process for MaxCDN and documented it here: http://www.tilcode.com/what-to-change-in-maxcdn-settings-after-you-change-web-hosts/
Step 7: You may need to do some other setup on your new host
Leave your old host active for a little while while you confirm everything’s working on your new site over the next couple days.
You may need to move the following separately:
- Email accounts. If you had email accounts set up at your old host, take note that they don’t come with the Updraft migration and you’ll have to recreate them (and redo any redirects) on your new host.
- Favicon: if your site had a custom favicon sitting in your site’s root directory, you might need to copy it from your old host and upload it to your new one
- Google Analytics .html file: If you put any .html files for analytics tracking (Google Analytics is the one I always have to move manually) in your old site’s root folder, you will have to copy them to your new host
- Robots.txt and anything else sitting in root (this will vary by site)
- Images or other media in dedicated folders: Anything that’s part of your site but not part of WordPress will have to be manually moved. For me, this is sometimes a site logo or images on the site that I keep in a separate images folder, not uploaded to WordPress’s file manager.
If you’re afraid of losing anything off your old site, take the time now to download a copy of its entire directory off your old host, before you shut down your old hosting account. That way, if you find something missing later on, at least you can dig around the old files and maybe find it.