You can migrate your website to a new host without downtime by running both hosts side by side: copy everything to the new server, test it there, then switch DNS once the new copy is ready. The trick is preparation. Lower your DNS TTL a day or two in advance, freeze content changes during the cut-over, and move email as a separate, deliberate step.
This guide walks through the full process for a typical South African small business site: files, database, email, DNS and SSL.
Before you start - take stock
Most failed migrations fail because something was forgotten, not because something broke. Write down what you have before you touch anything.
| Item | Where to find it | Why it matters |
|---|---|---|
| Website files | File manager, FTP/SFTP, or your Git repository | The actual site |
| Databases | phpMyAdmin or your control panel | WordPress, shops and apps store content here |
| Email accounts | Your current host's mail section | Mailboxes, forwarders and aliases all need recreating |
| DNS records | Your DNS provider's zone editor | Custom records (Google verification, SPF, DKIM) are easy to miss |
| Scheduled tasks | Control panel cron section | Invoice runs, sitemap builds, cleanup scripts |
| SSL | Control panel | You will issue a fresh certificate on the new host |
| Domain registrar login | Registrar account | You need it to change nameservers |
Export your current DNS zone as text if your provider allows it, or screenshot every record. That record list is your safety net.
Step 1 - Lower the DNS TTL
TTL (time to live) tells resolvers how long to cache a DNS answer. If your A record has a TTL of 86400 seconds (24 hours), some visitors could keep hitting the old server for up to a day after you switch.
At least 24-48 hours before the move, lower the TTL on the records you will change (usually the A record for @ and www) to something short such as 300 seconds:
example.co.za. 300 IN A 203.0.113.10
www.example.co.za. 300 IN CNAME example.co.za.
Wait for the old TTL to expire before switching. After the migration has settled, you can raise it again. For background on each record type, see DNS records explained.
Step 2 - Set up the new hosting account
Create the site on your new host first, while the old one keeps serving visitors. On a Plesk-based plan such as NewHost web hosting, add the domain as a subscription, create an empty database and a database user, and note the credentials. For a Node.js or Next.js app, connect your Git repository instead and let the platform build it.
Match versions where you can: the same PHP version (or Node.js version) as the old server avoids surprises. Upgrade later, as a separate change.
Step 3 - Copy the files
For a classic PHP or WordPress site, download the full web root (often public_html or httpdocs) and upload it to the new host. If you have SSH on both ends, rsync is faster and preserves structure:
rsync -avz --progress user@old-host:/home/user/public_html/ ./site-backup/
rsync -avz --progress ./site-backup/ user@new-host:/var/www/vhosts/example.co.za/httpdocs/
Don't forget hidden files such as .htaccess and .user.ini.
Step 4 - Move the database
Export the database from the old host and import it on the new one. From the command line:
mysqldump -u olduser -p --single-transaction --routines olddb > site.sql
mysql -u newuser -p newdb < site.sql
Or use phpMyAdmin's Export and Import tabs for smaller databases. Then update your site's configuration file (for WordPress, wp-config.php) with the new database name, user, password and host.
Step 5 - Test before switching DNS
This is what makes a zero-downtime move possible. Preview the site on the new server while the world still sees the old one. The simplest way is your computer's hosts file, which overrides DNS on your machine only:
# Linux/macOS: /etc/hosts Windows: C:\Windows\System32\drivers\etc\hosts
203.0.113.10 example.co.za www.example.co.za
Now browse the site and check forms, logins, the shop checkout, image uploads and any admin area. Remove the line when you're done.
Step 6 - Plan the email move separately
Email is where migrations usually hurt. If your mail is hosted with your old web host, you have two options:
- Leave email where it is for now. Only change the A records for the website and keep the MX records pointing at the old mail server. Move email later as its own project.
- Move email at the same time. Create every mailbox on the new host, change the MX record, then copy old messages across with an IMAP migration tool or by connecting both accounts in a mail client.
Either way, keep the old mail account active for a week or two after the switch so late-arriving messages are not lost. Our dedicated guide on migrating email to a new host covers this in detail.
Step 7 - Switch DNS
Freeze content changes (no new blog posts, orders paused if practical), take a final database export, import it on the new server, then update DNS. You have two ways to do it:
- Change the records (A, CNAME) at your current DNS provider to point at the new server.
- Change the nameservers at your registrar so the new host's DNS answers for the whole domain. Recreate every record there first.
Which is better depends on your setup; pointing a domain to your hosting explains the trade-offs.
Step 8 - SSL, checks and clean-up
Once DNS points at the new server, issue an SSL certificate. Let's Encrypt certificates are domain-validated, so they can only be issued once the domain resolves to the new server. NewHost includes free Let's Encrypt SSL on its plans. Then:
- Load the site over
https://and check for mixed-content warnings. - Submit a contact form and confirm it arrives.
- Send and receive a test email if you moved mail.
- Re-create cron jobs on the new host.
- Check Google Search Console for crawl errors over the next week.
Keep the old hosting account running for at least a week before cancelling it. It costs little and means you can recover anything you missed.
Frequently asked questions
Will my website go offline during a migration?
Not if you follow the order above. The old host keeps serving visitors until DNS changes, and with a low TTL the switch completes quickly. The only real risk window is content added to the old site after your final copy, which is why you freeze changes during the cut-over.
How long does DNS propagation take?
It depends on the TTL that was cached before you made the change. If you lowered the TTL well in advance, most visitors move to the new server within minutes. Some ISPs and devices cache longer than they should, so allow a day before cancelling anything.
Do I need to transfer my domain to move my website?
No. Your domain registration and your hosting are separate. You can move your website and keep the domain where it is, only changing DNS records or nameservers. Transferring the domain is optional and can be done later.
Will I lose emails when I change hosts?
You shouldn't, if you keep the old mailboxes running for a while after changing the MX record and copy existing messages across with IMAP. Emails sent during the switch may land on either server, so check both for a few days.
Can my new host do the migration for me?
Many hosts help with migrations, so ask before you start. At NewHost, get in touch through the contact page with details of what you're moving and we'll talk you through the options.
Planning a move? Look at our plans and pricing, or contact us and tell us what you're migrating - we'll help you plan the switch.