How to Migrate a WordPress Website

You’re switching website hosting to a different provider (here are my recommended providers). You want minimum downtime, and to avoid breaking anything you might not notice right away.

So, here’s the checklist for moving your website, mydomain.com from an old hosting provider (let’s call them DumpSites) to a new one (Stellarhost).

Overview

From six hundred feet up, here’s what you’ll be doing.

  • Create a new hosting account on Stellarhost.
  • Back up data from DumpSites hosting account (website, and old emails if any).
  • Copy the existing website to Stellarhost.
  • Update the DNS (Domain Name System) records of your domain registration to point to the Stellarhost server. The data on your old server will become inaccessible via that domain name, though you still will be able to access it in other ways.
  • Make sure everything is working.
  • Terminate old hosting service and hopefully get a refund.

Back Up Your Email

This is about email addresses in your domain (e.g. me@mydomain.com) if any.

Such email accounts can either be hosted by the company that hosts the website, or by someone else (G Suite is a popular email provider, for instance).

If DumpSites hosts email accounts, the email stored on their server will become inaccessible when you close your account with them. You’ll want an offsite backup of the contents of all email accounts associated with the domain.

If your email goes through G Suite or other outside service, you won’t lose access to it permanently. What I’m about to tell you is still a good idea, but not essential. We’ll do other things later to avoid a temporary outage.

The best way to back up your email is to install an email client on your PC. This is also the best way to read your email. The Thunderbird email program is free and has several advantages over reading mail in your web browser:

  • You can read and send email while offline.
  • You don’t have to login since the program remembers your credentials.
  • If you choose, it consolidates all your inboxes from multiple accounts into a single screen.
  • If an email arrives to the wrong account, you can drag it to the right account and respond to it from the email address you want to use for that exchange.
  • Your offline copy remains up to date automatically, so you can set this up and not have to worry about missing messages when you lose access to your old email service.

Once you install Thunderbird, tell it about each of your email accounts. In most cases you just enter the email address and your login information, and it sets things up automatically. If that doesn’t work, go to the “control panel” of your current hosting provider and look for manual email setup instructions under the Email category of the site settings. You’ll need the following information:

  • IMAP mail server domain name(for incoming mail)
  • Port number for IMAP server
  • SMTP server domain name (for outgoing email)
  • Port number for SMTP server
  • Authentication style (generally SSL/TLS and Normal Password — if they don’t say, that’s a safe bet. STARTTLS is the second thing to try)
  • Username (typically your full email address)
  • Password (you should already know). This is a password specifically for email, not the one you use to administer your website. If you login with a web browser now to read your email, it’s that password.

Create the New Hosting Account & Install WordPress

Create the new hosting account on Stellarhost. Tell them you have an existing domain, and what it is. You may be offered the option to have them set up WordPress on the new site. You do want to do that. If it doesn’t happen automatically while setting up hosting, do that now as your next step.

Now: Stellarhost knows where your new website is — on their server. However, the rest of the Internet doesn’t know this. Anyone who uses a web browser to access mydomain.com still sees the site hosted by DumpSites. Later you’ll tell the DNS (Domain Name System) where your new server is, and this information will spread around the Internet. Until then, your old site is still active.

Create Email Addresses

If you want the new website hosting provider to host email accounts for you, create those accounts now.

If you have email accounts already with DumpSites, create the same email addresses on Stellarhost. Similar to your new website, the new email addresses can’t receive email yet because nobody knows to deliver them there until the DNS settings are updated. But if you create them now, they’ll start to work immediately once the new DNS settings take effect.

While you’re at it, don’t forget to also copy mail filters and forwarding addresses from DumpSites.

Back Up Your Old Site

Create a full website backup to your PC hard drive. I like the WPvivid Backup and Migration Plugin, which is free and works for any size website. This is your safety margin in case all doesn’t go well. As a last-ditch you can also use it to migrate your website to the new hosting provider by uploading it to the new site as a restore point, if the methods described below don’t work.

There are other plugins that will do full backups, including UpdraftPlus which I review here. I like WPvivid better because the free version works for any size website and inclides auto-migration capability.

To use a backup plugin to create a backup to your PC hard disk:

  • Install and activate the plugin.
  • Use it to create a backup on your old web server — the plugin may refer to it as a “local” backup because their code runs on your server, which is local as far as that code is concerned.
  • Download the individual backup files — there may be several of them. Put them somewhere you can find them later.

Will Your New Hosting Company Migrate Your Website for You?

Some hosting providers (e.g. SiteGround) have tools to assist in migration. Generally this takes the form of a “live” migration plugin that you install on both the old and the new site, then tell the two sites to talk with each other and sort it out. If this is available, I find it’s the easiest way to do it.

Many hosting providers — at least the better ones — will migrate the site for you for free or a fee. Look into it, because they’ve got lots of practice and are unlikely to make mistakes.

The problem I find with having someone else do the migration is that you don’t know when it’s happening, or what their steps are. So you end up twiddling your thumbs for a few days not entering any new information into your website, so you won’t have to redo it on the new site in case they’ve already copied the old data.

Another problem is they’ll probably want a lot of information that you don’t need if you’re doing it yourself. Things like your database name and password and FTP username and password. If you’re a typical WordPress website owner, you might not have realized you have those things. Surprise!

DIY Copying the Site Over

Whether you’re using a plugin supplied by your hosting provider (such as SG Migration from Siteground) or a back and restore tool like WPvivid, it’s best to transfer your website before you switch the domain name to point to the new site. That means you have to be able to access the new site in some other way than typing “mydomain.com” in your browser. There are a few ways that commonly work, and they all involve knowing the IP address of your new server. You can find this information in your hosting control panel.

Hosting control panel showing IP address of your server.

This will be a long number interrupted with periods, 108.163.201.34 in the above example. There may be other IP addresses shown (“Last login” for instance) which are not the one you want. If you’re paying extra money you may have a dedicated IP address rather than shared.

How do we use this information to access the new website? There are a few usual ways.

  • Stellarhost may offer the ability to give your website a temporary URL so you can set it up. This is the easiest way.
  • If your new server is a “dedicated” server — with only your website on it — you should be able to access your website by just using the IP address instead of the domain name, e.g. “http://108.163.201.34”. This is unlikely to be your situation — probably you’re sharing a server so there are other websites at the same IP address.
  • You can edit the “hosts” file on your PC so your computer, unlike the rest of the world, thinks your DNS name points to this IP address. This is tricky to get right, because your computer and your browser might be holding the old address in memory, so it can be hard to know you’re viewing the correct site.
  • You can use a free service such as hosts.cx, which lets you enter your domain name and this IP address, and create a temporary URL to access your site. This doesn’t work perfectly, but it works well enough to do the job. Keep an eye on the address field of your browser window to make sure you don’t accidentally switch back to the old site.

Once you have access to the WP Dashboard on your new website, use the WPvivid backup you created earlier to “restore” the site onto the new server.

Make A Trivial Change to Differentiate the Sites

Later we’ll switch the DNS service to point to your new site on Stellarhost, but that takes an unpredictable amount of time to take effect and not everyone will see the change simultaneously. So that you can easily tell when the DNS change takes effect for you, anyway, use Customize on the old site to make a small change to the appearance of the site — change the tagline, background color, whatever — so you can tell at a glance whether you’re looking at the old or new site.

If You Use Third-Party Email and Calendar Service

Back to email. If you have email address in your domain, and those email boxes are managed by someone other than DumpSites, you must take action now to make sure email will continue working after the transition.

The reason it might not keep working is that the world uses your DNS information to decide where to deliver your email (if incoming) and whether the email is really from you (if outgoing). When you switch to the new name servers provided by Stellarhost, those name servers need to already know about this outside email to avoid an interruption in service.

This involves the creation of “DNS records” regarding your domain. It’s in your hosting control panel under DNS Records, Zone Records, or similar. You could find this information in the DumpSites settings and try to figure out which records to duplicate on Stellarhost, but it’s hard to be sure you’ve copied the right ones and your old settings might not even be entirely correct.

That’s why I think it’s better to find your email/calendar providers instructions and follow those. Here are instructions for Microsoft Outlook and Google G Suite, for instance.

If you’re uncertain, or find you have a problem with email later, Stellarhost’s tech support should be able to look at the DNS setup and tell whether you got it right.

Change Name Servers

Your new website host, Stellarhost, will have information somewhere in their control panel about the “nameservers” for your domain. Normally there’ll be two or three with “ns1” and “ns2” in the names.

Go to the website of your domain registrar, which in many cases might be DumpSites. Find the DNS settings for your domain. There should be an option to specify custom nameservers. Select that option, and enter the nameservers you got from the Stellarhost screen.

Once you click OK or Save or whatever, you’ve set up for your new website to go live. It supposedly can take up to 48 hours for your changes to propagate to all the DNS servers in the world, but I’ve never known it to actually take more than three hours.

So, do something else for a while, and check back to see whether the new site is live. Refresh the webpage and look for the indicator change you made before.

Test New Website & Email

Once it’s live at the new domain, bop around on your migrated website to make sure it all works.

If you have email accounts in the domain, whether hosted by the website host or by an outside service, send yourself email at those addresses to make sure it arrives, and try responding.

Domain Registrar Change?

If your website is registered through DumpSites, and if you don’t hate them with every quivering atom of your body, there’s no need to move the domain registration to Stellarhost (though if they’re offering free domain registration as part of the service, there’s no good reason not to).

Some people prefer to keep the domain registration separate from the web hosting because they fear that if they have an issue with the web host and their account is shut down, they would also lose the domain name. Unless what you’re putting on your website is particularly controversial, there’s little chance of that, and you can of course get a new, similar domain and restore the site from a recent backup. That reminds me — set up scheduled backups!

That Is All

If you find this website helpful, why not…

Subscribe for email updates

Your information will not be shared (except with MailChimp, who manages the subscriber list).

Share...

Leave a Reply

Your email address will not be published. Required fields are marked *