Move websites to a new server without downtime
Copy websites, databases and email to a new server first, test them there, and switch DNS last, so visitors never see the move. Whole accounts or one site.
Published
A move without downtime follows one rule: copy everything to the new server first, test it there, and switch DNS last. Until the switch, visitors and email keep going to the old server, which you leave untouched. This guide explains the order of the steps; the documentation has every click.
A day before: lower the DNS TTL
The TTL of a DNS record is how long other servers keep their copy of it. At each domain's DNS provider, set the TTL
of the A, www and MX records to 300 seconds a day before the move. When you switch, the change then reaches
everyone within minutes instead of hours.
Whole accounts or one website
Moving your own server's accounts? Make a full account backup of each account on the old server (a .tar.gz,
.tgz, .tar or .tar.zst file) and import it in Server Admin. Websites, databases, mailboxes with all their
messages, forwarders, DNS records and cron jobs come across, and customers keep their passwords.
See Move accounts in from another host.
Moving one website from a hosting company? The customer can do it alone from the Control Panel: copy the website's files over SFTP or FTP with TLS, copy the database, and copy each mailbox with its messages.
See Move a website from another host and Migrating.
Check what the import tells you
When an import is done it can list things to check, such as a database user that got a new password (the website's configuration file then needs it) or a domain whose email stays elsewhere. Fix each one before you go on.
Test before you switch
Look at the copy the way visitors will see it: add a line to your own computer's hosts file that points the domain at the new server's IP address, open the website, sign in to it and send a test email. Remove the line when you are done.
Switch DNS
Either change the domain's nameservers to your own, or point its A, www and MX records at the new server. Free
SSL is issued within minutes once the domain points at the new server.
See Point a domain bought elsewhere.
A day later: bring over late email
Some email can still reach the old server while the change spreads. A day after the switch, import the mail that arrived there; messages already copied are skipped. Then cancel the old hosting.
Tidy up
With many accounts in, change them together rather than one by one: the PHP version, the package or free SSL for a whole list of accounts, with a preview of what will change first.
See Bulk changes.
Try it on your own server
Install Hfog Panel and try every feature free for 30 days.