Skip to content

KeNIC-accredited .KE registrar

Hosting · How-to

Back up your website before changing hosting: 8 steps for a safe migration

How to back up and move your website, email and DNS to a new host without losing data or downtime, including the mistakes that cause most migration problems.

By John KariukiPublished Updated 6 min read

External hard drive connected to a laptop

The short answer

  • Keep the old hosting active until the new site has worked for a week.
  • Take a full backup, download it, and keep a second off-site copy.
  • Record all DNS records, including MX and TXT, and plan for email.
  • Test on the new host before switching DNS, then check SSL and email.

Moving your website to a new host is routine, but it’s also when things most often go wrong: missing files, a broken database, or email that stops arriving. A complete backup, and a careful order of steps, means you can always go back. Here’s how to do it safely.

Before you start

  • Don’t cancel your old hosting yet. Keep it running until the new site has worked for at least a week.
  • Check your domain login. You’ll need access to your domain registrar to change DNS or nameservers.
  • List everything you’ll move: website files, databases, email accounts, DNS records, cron jobs and SSL.
  • Pick a quiet time, such as a weekend evening, for the switch.

Eight steps for a safe migration

1. Take a full backup of the website

On cPanel hosting, use Backup or Backup Wizard to create a full account backup, or download a home directory backup plus each database. On WordPress, a backup plugin can package files and database together. Our guide to backing up your website explains the options.

2. Download the backup and keep a second copy

Don’t leave the only copy on the old server. Download it to your computer and store another copy in cloud storage, following the 3-2-1 rule: three copies, two types of storage, one off-site.

3. Back up email separately

If your email is hosted on the same account, note every mailbox, forwarder and password. Export important mail, or plan to copy mailboxes with your new host’s migration tool or IMAP.

4. Record your DNS settings

Screenshot or export all DNS records: A, CNAME, MX (email), TXT (SPF, DKIM, verification codes). Missing TXT records are a common reason email or Google services break after a move.

Network cables plugged into a server rack
Record every DNS record before you move, especially email (MX) and TXT records.

5. Restore on the new host and test before switching

Upload and restore the files and database on the new hosting. Update database connection details (for WordPress, in wp-config.php). Test the site on a temporary URL or by editing your computer’s hosts file before changing DNS: check pages, forms, logins and checkout.

6. Switch DNS or nameservers

Point your domain to the new host. If you can, lower the DNS TTL a day or two before, so the change spreads faster. During the switch, avoid updating content on the old site.

7. Install SSL and check email

Make sure an SSL certificate is issued on the new host (free AutoSSL or Let’s Encrypt on most cPanel hosts), and that every page loads over HTTPS. Send and receive test emails from each mailbox.

8. Monitor, then close the old account

Watch for errors, missing images and form problems for a week. Then take a final backup of the old account and cancel it.

Common migration mistakes

  • Cancelling the old hosting before the new site is confirmed working.
  • Forgetting email accounts or MX records.
  • Not testing forms and payments after the move.
  • Hard-coded old URLs causing mixed-content “Not secure” warnings (see fixing “Not secure” warnings).

Moving because your current host is slow or unreliable? Read signs of reliable hosting and choosing web hosting in Kenya. If your domain is moving too, see transferring a domain.

Frequently asked questions

Will my website go down when I change hosting?

Not if you restore and test on the new host first, then switch DNS. Visitors move across gradually as DNS updates.

Will I lose my emails when changing hosting?

Only if email isn’t moved. Back up or migrate mailboxes and update MX records.

How long does a hosting migration take?

Copying a small site can take an hour or two; DNS changes can take up to a day or two to reach everyone.

Do I need to transfer my domain when changing hosting?

No. You can keep the domain where it is and just point it to the new host.

Sources

Facts checked on 4 November 2026. Prices and rules change; confirm current details with the provider or regulator.

About the author. John Kariuki is the founder of Kenya Website Designers in Nairobi. He builds business websites, online stores with M-Pesa payments and custom web systems, and manages domains and hosting for Kenyan businesses.

Free quote

Move your website safely

Tell us where your website is hosted now. We reply within 24 hours with a migration plan.