Skip to content
Tarisu Limited

Moving an existing website to your hosting

Updated: 29 October 202623 views

Moving a live site is three jobs (files, database, mail), and the order you do them in decides how much downtime there is. The order below keeps the old site serving until the new one is proven.

Tell us before you start. Open a ticket after ordering, say where the site lives now and what it is built with, and we will tell you what to watch out for on that particular stack.

1. Prepare

  • Lower the TTL on the domain's records to a few minutes, at least a day before the switch. This is the single thing that makes the cutover quick.
  • Take a full copy from the old host: the files, and a database dump.
  • Write down every mailbox on the old host, and its password if you know it.

2. Put the files in place

Upload the files into public_html on the new account. A single zip uploaded through File Manager and extracted there is faster and safer than thousands of small FTP transfers. Keep the directory structure exactly as it was.

3. Move the database

  1. Create a database and a database user in cPanel, and add the user to the database.
  2. Import the dump through phpMyAdmin.
  3. Update the application's configuration file with the new database name, user and password. The database host is usually localhost.

4. Test before switching anything

Add an entry to the hosts file on your own computer mapping the domain to the new account's IP address, which is on the service page. Your browser then sees the new site at the real domain name while the rest of the world still sees the old one. Click through the site properly: forms, logins, images, the checkout if there is one.

5. Create the mailboxes

Create each mailbox on the new account with the same addresses. If the mail has to come with them, copy it with an IMAP transfer tool while both servers are still running. Once the DNS changes, new mail starts arriving on the new server and anything left behind on the old one has to be fetched separately.

6. Switch the DNS

Change the nameservers, or the individual records, to point at the new account. Then leave the old hosting running for several days: visitors and mail servers with a cached answer will keep reaching it for a while.

7. Afterwards

  • Check the site over HTTPS the following day. A free certificate is issued once the domain resolves here.
  • Check that mail is both sending and arriving.
  • Remove the hosts entry from your own machine, or you will keep seeing an answer nobody else sees.