Web hosting · Guide

How to Move a Website to a New Host

Updated October 11, 2026 5 min read

On this page
  1. The checklist at a glance
  2. Step 1: Take stock and lower the TTL
  3. Step 2: Back up files and databases
  4. Step 3: Restore on the new host
  5. Step 4: Test before switching
  6. Step 5: Move email without losing messages
  7. Step 6: Switch DNS
  8. Free migration to HytHost
  9. FAQ

Moving a website to a new host sounds risky, but it is a routine job when you do it in the right order. The rule is simple: copy everything first, test it on the new host, and only then point your domain at it. Visitors keep seeing the old site until the new one is ready.

This guide is a step-by-step checklist for any website, with notes for WordPress and cPanel, and for moving email without losing messages.

The checklist at a glance

  1. Take stock of what the site uses: files, databases, email, DNS records, scheduled tasks.
  2. Lower the DNS TTL a day before the switch.
  3. Back up files and databases on the old host.
  4. Restore them on the new host.
  5. Test the site on the new host before anyone else sees it.
  6. Recreate email accounts and copy the mail.
  7. Switch DNS, then keep the old hosting for a few more days.

Rather not do it yourself? Every HytHost web hosting plan includes one free website migration, from €0.99/mo.

See web hosting plans

Step 1: Take stock and lower the TTL

Write down everything the site depends on, so nothing is left behind:

  • the website files, usually in public_html;
  • every database, with its name and user;
  • email accounts, forwarders and filters;
  • DNS records beyond the website: MX for email, TXT records for SPF, DKIM and site verification;
  • cron jobs, the PHP version and any special settings.

Then lower the TTL of your domain's records, for example to 300 seconds, a day before the move. TTL is how long the internet caches your DNS records; a short TTL means the switch reaches visitors in minutes instead of hours. And do not cancel the old hosting yet.

Step 2: Back up files and databases

  • From cPanel: in Backup, download the home directory and each MySQL database separately. These partial backups are files you can restore yourself on any cPanel host. A full account backup also exists, but only the host can restore it, from WHM; send it to them if they offer migrations.
  • By hand: download the files over FTP or SFTP, and export each database as a .sql file from phpMyAdmin.
  • WordPress: a migration plugin such as Duplicator or All-in-One WP Migration packs files and database into one archive. Check the upload limit on the new host: the plugin's import is limited by it.

Step 3: Restore on the new host

  1. Add the domain to your new hosting account.
  2. Upload the files to the new public_html, or restore the home directory backup.
  3. Create a database and user, then import the .sql file in phpMyAdmin.
  4. Update the site's configuration with the new database name, user and password. For WordPress, that is wp-config.php.

If the domain stays the same, that is all. If it changes, the old address is stored throughout the database. In WordPress, never replace it with a plain text search in the SQL file: it breaks serialized data. Use WP-CLI, which handles it correctly:

wp search-replace 'https://old-domain.com' 'https://new-domain.com' --skip-columns=guid --dry-run

Remove --dry-run once the preview looks right.

Step 4: Test before switching

You can see the site on the new host before the world does, by telling only your own computer where the domain lives. Add a line to your hosts file with the new server's IP address:

203.0.113.10  example.com www.example.com

The file is C:\Windows\System32\drivers\etc\hosts on Windows (edit it as administrator) and /etc/hosts on macOS and Linux. Now open the site and check pages, images, forms, logins and the shop checkout. Remove the line when you are done.

Step 5: Move email without losing messages

  1. Create the same email accounts, forwarders and filters on the new host.
  2. Copy the existing mail. For a few mailboxes, add both the old and new account to an email client over IMAP and drag the folders across. For many mailboxes, a tool such as imapsync copies them server to server and can be rerun without duplicates.
  3. After the DNS switch, run the copy once more to catch messages that arrived in the meantime.

Remember the MX and TXT records: if they are not recreated on the new DNS, email stops arriving or lands in spam.

Step 6: Switch DNS

Point the domain at the new host, either by changing the nameservers at your registrar or by changing the A record to the new IP address. With a short TTL, most visitors reach the new host within minutes; some networks cache longer, so allow up to a day.

Once the site loads from the new host, check that the SSL certificate was issued (see free SSL certificates) and keep the old hosting for a few more days before you cancel it.

Moving hosting does not mean moving the domain. A domain transfer to another registrar is a separate step you can do later, or never; registrars may also refuse a transfer within 60 days of registration or of a previous transfer.

Free migration to HytHost

Every HytHost web hosting plan includes one free website migration:

  1. Order the plan that fits your site.
  2. Open a ticket with access to your old hosting, or a cPanel backup file.
  3. We copy the files, databases and email accounts. You switch the DNS when you are ready.

Every plan comes with cPanel, free SSL and daily backups kept for 10 days. New to cPanel? Start with what is cPanel.

FAQ

Frequently asked questions

Not if you follow the order: the old site keeps running while you copy and test the new one, and visitors move over gradually when DNS changes. Avoid editing content during the move, or redo those edits on the new host.

It depends on the TTL. With a TTL of a few minutes set a day in advance, most visitors see the new host within minutes; with the usual longer TTLs it can take hours, and some networks cache for up to a day.

No. Your domain can stay with your current registrar; you only point it at the new hosting through its DNS. Transferring the domain is a separate step you can do later if you want everything in one place.

Not if you copy them. Create the accounts on the new host, copy existing mail over IMAP, and run the copy again after the DNS switch to catch anything that arrived in between.

Yes. One website migration is free with every web hosting plan: open a ticket after ordering with access to your old hosting or a cPanel backup, and we copy the files, databases and email accounts.

Move your site the easy way

HytHost web hosting includes one free website migration, cPanel, free SSL and daily backups, from €0.99/mo.

Live chat 8 AM – 11 PM (Chișinău time) · tickets answered during business hours

Was this guide helpful?