What is downtime?
Downtime is the time when your website is not available. During a move, it can happen if the old site is switched off before the new one is ready. The trick is to keep both running for a while.
Key idea: DNS
DNS is like a phone book for the internet. It turns your website name into a number (an IP address) that points to a server. When you move, you change this number. The change takes time to spread around the world. This delay is called propagation. It can take from a few minutes to a day or more.
Steps
- Make a full backup. Save your files, databases and emails on your own computer.
- Lower the TTL. TTL means "time to live". It tells the world how long to remember your DNS number. About a day before the move, set it to a low value, such as 300 seconds. You do this where your DNS records are managed.
- Do not cancel the old hosting. Keep it running until the very end.
- Copy everything to the new host. Upload the files and import the database. Create the email accounts again.
- Fix the settings. Update the database name, user and password in your site's config file. If you are not sure, ask the new host.
- Test the new site before the switch. Edit the
hostsfile on your computer. This file lets your computer visit the new server while everyone else still sees the old one. Add a line with the new server number and your domain name. - Check the pages. Click links, test forms, log in and try the shop checkout.
- Freeze changes. For shops and blogs with comments, avoid new orders or posts while you do the last copy. Then copy the latest data once more.
- Change DNS. Update the nameservers or the A record to point to the new host.
- Wait and watch. Keep the old host live for at least 48 hours. Visitors who still see the old number reach the old site, which still works.
- Remove the hosts file line.
- Cancel the old hosting only when everything is stable.
Tip: Pick a quiet time, such as night or a weekend, for the DNS change.
Do not forget
- SSL certificates on the new host.
- Email: new mail may land on the old server while DNS spreads. Check both mailboxes.
- Cron jobs (scheduled tasks) and redirects.
If you are moving to Hostvento, open a support ticket to ask what help is possible.
Quick recap
- Back up first.
- Lower the TTL a day before.
- Test the new site with the hosts file.
- Switch DNS and keep the old host running for a few days.