How do I migrate my sites and data to a new dedicated server?

Moving servers is a lot like moving house: the boxes are easy, labelling them is the hard part. This checklist keeps both servers running until you're sure.

Before you start

Order the new server first and keep the old one running until the move is finished. Make sure you have a fresh backup of everything important. Have both servers' Main IP handy.

Steps

  1. Ask about help. If your server is managed, tell us in a ticket (set Department to Technical Support) that you're migrating. Managed plans include moving hosting accounts from your current provider during control panel setup.
  2. List what lives on the old server. Websites, databases, mail, cron jobs, SSL certificates, and custom services all need a home.
  3. Lower your DNS TTL. At least a day ahead, set the TTL on your DNS records to 300 seconds, so the switch takes minutes rather than hours.
  4. Install matching software on the new server. Match web server, PHP, and database versions where you can.
  5. Copy the files. From the old server, run rsync -avz --progress /var/www/ -e "ssh -l root" NEW.MAIN.IP:/var/www/.
  6. Copy the databases. Run mysqldump --all-databases > all.sql, copy it across, and import it with mysql < all.sql.
  7. Test before you switch. Add the new server's Main IP to your own computer's hosts file and browse your sites. Check forms, logins, and email.
  8. Do a final sync, then switch DNS. Repeat steps 5 and 6 to catch changes, then point your DNS records at the new Main IP.
  9. Keep the old server for a few days, then cancel it once nothing is hitting it.

If it didn't work

  • Sites loading from the old server mean DNS hasn't caught up; check with dig +short yourdomain.com.
  • Mail missing? Check MX records and mailbox sync.
  • Stuck? Open a ticket with both Main IPs and what failed. Please reply on the same ticket, not new ones.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 0