How to Move a Website to a New Host Without Downtime
Moving a website to a new host sounds risky, but most problems come from doing steps in the wrong order. If you copy everything first, test the new copy before anyone sees it, and switch DNS only at the end, visitors usually notice nothing at all. This checklist works for most small and medium sites, including WordPress.
Before you start: make an inventory
Write down everything the current host does for you. People often forget items that are not the website itself.
- Website files, and where they live on the server.
- Databases, with their names and the user accounts that access them.
- Email: mailboxes, forwarders and autoresponders, if your host provides email.
- Scheduled tasks (cron jobs), such as backups or newsletter sends.
- SSL certificates and any special server settings, redirects or rewrite rules.
- All current DNS records, if the host also runs your DNS. Export or screenshot them.
- The PHP or other language version the site runs on.
Also check when the old plan renews. Leave yourself enough overlap that you are not rushing, and do not cancel the old account until the new one has run smoothly for a while.
Step 1: Take full backups
Download a complete copy of the files and an export of each database. Many control panels offer a full-account backup; download it to your own computer, not just to the server. If anything goes wrong later, this is your safety net. Verify the backup opens and contains what you expect.
Step 2: Lower the DNS TTL
A day or two before the move, find the DNS records for your site (usually the A record for the bare domain and the www record) and lower their TTL to about 300 seconds. This makes the final switch take effect within minutes instead of hours. Our DNS basics guide explains TTL in more detail.
Step 3: Set up the new hosting account
Create the account, add your domain to it, and match the environment: same PHP version or newer if your software supports it, required extensions, and similar memory limits. Create empty databases and database users.
Step 4: Copy the site
Upload the files using the new host's file manager, SFTP, or a migration tool. Import the database exports. Then update the site's configuration to use the new database name, user and password. In WordPress, those settings are in wp-config.php.
Some hosts offer free migrations, and WordPress migration plugins can package files and database together. Either is fine; just confirm the result in the next step.
Step 5: Test before switching
This is the step that prevents downtime. You want to see the site running on the new server while the public still sees the old one. Common ways to do this:
- Edit your computer's hosts file to point your domain at the new server's IP address. Only your computer sees the new server. Remember to remove the entry afterward.
- Use a temporary URL or preview domain provided by the new host.
Click through the important pages, submit forms, log in to the admin area, and check that images load. Look for errors in the browser's developer console and in the host's error log. Fix anything broken now.
Step 6: Plan email separately
If email stays at a separate provider, leave your MX records alone and it will keep working. If email is moving too, create the same mailboxes on the new host first. After the switch, some messages may still arrive at the old server until caches expire, so keep the old mailboxes available for a few days and check them, or use your email program to copy messages across.
Step 7: Freeze changes and do a final sync
For a site that changes often, such as a store or a busy blog with comments, pause changes briefly: put the old site in maintenance mode or avoid publishing. Then copy the latest database once more so nothing is lost between your first copy and the switch.
Step 8: Switch DNS
Update the A record (and AAAA or CNAME records, if used) to the new host. If you are moving DNS management too, recreate every record at the new DNS provider first, compare them against your saved list, and only then change nameservers at the registrar. With a low TTL, most visitors will reach the new server within minutes; nameserver changes can take longer.
Step 9: Secure and verify
Issue an SSL certificate on the new host as soon as DNS points there, and confirm HTTPS works on both the bare domain and www. See SSL certificates explained for common errors. Check that redirects still work, contact forms send email, scheduled tasks are recreated, and backups are configured on the new host.
Step 10: Clean up
Once the site has run on the new host for a week or two with no surprises, raise the TTL back to a normal value, take a final backup from the old host for your records, and then cancel the old account. Update any saved logins, monitoring tools and your own documentation with the new details.
Common mistakes to avoid
- Changing nameservers before copying DNS records, which breaks email.
- Cancelling the old host before testing the new one.
- Forgetting cron jobs, which silently stops backups or scheduled emails.
- Hard-coded old URLs or file paths in the site's settings.
- Not checking SSL on the www version.
The short version
Inventory everything, back it up, lower the TTL, build and test the new copy privately, then switch DNS last. Keep the old host until you are sure. Done in that order, a move is calm and usually invisible to visitors.