Skip to content

How to Migrate Your Website to a New Host Without Downtime

Wikimania 2022 Cape Town (Saturday) 14 – How to Migrate Your Website to a New Host Without Downtime
Photo: Discott, CC BY-SA 4.0, via Wikimedia Commons

Your site is slow, your host keeps going offline during the Friday evening rush, and support replies three days later. You know it’s time to move. But then the fear kicks in: what if the website disappears for a week and customers can’t find you?

It doesn’t have to. A well-planned move to a new host can happen with no visible downtime at all. The trick is simple: build the new copy first, test it, and only then point your domain across. Your old site keeps serving visitors the whole time.

Before you touch anything: take a full backup

Download everything. That means all your website files and your database. On cPanel, use the Backup Wizard to grab a full backup, or at least the home directory and each MySQL database. If you run WordPress, a plugin like UpdraftPlus works too. Store the backup somewhere other than the old host, such as Google Drive or your laptop.

Advertisement

Think of it like moving house. You photograph the furniture before the truck arrives.

Step 1: Lower your DNS TTL a day or two ahead

TTL (time to live) tells the internet how long to remember where your domain points. Many hosts set it to 4 hours or even 24 hours. Log in to wherever your DNS is managed and drop the TTL on your A record to 300 seconds (5 minutes) at least 24 hours before the move. When you finally switch, the change will spread in minutes rather than hours.

Step 2: Set up the new hosting account

Buy the new plan and log in. Make sure the PHP version matches what your site currently uses, or is a version your theme and plugins support. A mismatch here is the number one cause of the dreaded white screen after migration.

Not sure which plan fits? For a typical Kenyan SME site with a few thousand visitors a month, a good shared plan is plenty. You can browse options on our hosting page.

Step 3: Move your files and database

You have three realistic options:

  • Ask the new host to migrate for you. Many Kenyan hosts do this free. It’s the easiest route if you’re not technical.
  • Use a migration plugin such as Duplicator or All-in-One WP Migration for WordPress sites.
  • Do it manually. Upload files through FTP or the File Manager, create a new database, import your SQL file, then update wp-config.php with the new database name, user and password.

Whichever you pick, don’t cancel the old hosting yet. It’s your safety net.

Step 4: Test the new site before going live

Here’s the part most people skip. Your new server already has a copy of your site, but your domain still points to the old one. How do you check the new copy works?

Edit the hosts file on your computer so your domain temporarily resolves to the new server’s IP address. Only your computer sees this change. Open your site, click through the pages, submit a contact form, test a checkout if you sell online. If you use M-Pesa payments, run a small test transaction. Remember to remove the hosts file entry when you’re done.

If you’d rather not touch the hosts file, many hosts give you a temporary URL or preview link for exactly this purpose.

Step 5: Handle email carefully

This is where businesses get burned. If your business email (like info@yourbusiness.co.ke) lives on the old host, switching your DNS can break it. Recreate every mailbox on the new host first, and copy over old mail using an IMAP transfer or your mail client. Also check your MX records. If you’re using Google Workspace or another external email service, your MX records stay as they are.

Step 6: Switch your DNS

Now the moment. Either change your nameservers to the new host’s, or update the A record to the new server IP. Because you lowered the TTL earlier, most visitors will land on the new server within 5 to 30 minutes. Some people will hit the old site for a short while. Since both copies are identical, nobody notices.

One thing to avoid: don’t make content changes on either site during the switch. A new blog post or order placed on the old server after you’ve copied the database can get lost. If you run an online shop, pick a quiet time, maybe early Sunday morning, and put the store in maintenance mode for a short while.

Need help finding where your DNS is managed? Get in touch and we’ll point you in the right direction.

Step 7: Check everything, then wait before cancelling

After the switch, run through this quick list:

  1. Open the site on mobile data and on Wi-Fi.
  2. Check that the padlock (SSL) shows. Install or reissue your certificate on the new host if needed.
  3. Send and receive a test email.
  4. Test forms, logins and payments.
  5. Look at Google Search Console for crawl errors over the next few days.

Keep the old hosting account alive for at least a week, ideally two. Only cancel once you’re certain nothing is still pointing there.

Common mistakes to avoid

Forgetting email, cancelling the old host too early, ignoring SSL, and skipping the TTL change are the big four. We’ve seen a Nairobi retailer lose a weekend of orders because the checkout broke after a move that nobody tested. Ten minutes of testing would have saved them.

Done properly, moving hosts is less dramatic than it sounds. Plan it, test it, and switch quietly on a slow day. Your customers will never know you moved, except that your site loads faster.

Leave a Reply

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

Chat now