How to move your website to a new host
Switching hosts sounds scary, but with the right order of steps you can move most sites in an afternoon with zero downtime. The key is building everything at the new host before you touch your domain settings.
Before you start
- Sign up at the new host first โ don't cancel the old one yet.
- Check your domain's TTL in your current DNS. Lowering it to 300 seconds (5 min) a day before the switch means propagation happens faster. Most registrars let you edit this in the DNS zone.
- Note what PHP version your site needs. Check at the new host before migrating.
- Identify whether you're migrating a static site, WordPress/CMS, or a custom app โ the steps differ slightly.
A small WordPress site: 1โ2 hours. A large WooCommerce store with thousands of products: 3โ5 hours. DNS propagation adds up to 24 hours on top, but most visitors switch within an hour.
Step 1 โ Back up and transfer your files
- Download a full backup from your current host's control panel (cPanel โ Backup Wizard, or Plesk โ Backup Manager). If that's not available, connect via FTP/SFTP and download your
public_htmlfolder. - Upload those files to the new host using FTP, SFTP, or the new host's File Manager. Match the same directory structure.
- If your site is large, ask the new host if they can pull the backup directly โ many offer free migration assistance.
Step 2 โ Export and import your database
This step applies to WordPress, Joomla, Magento, and most other CMSs.
- At your current host, open phpMyAdmin, select your database, click Export โ Quick โ SQL โ Go. Save the
.sqlfile. - At the new host, create a new MySQL database and user (note the database name, username and password).
- Open phpMyAdmin at the new host, select the new database, click Import, upload your
.sqlfile. - Update your site's config file with the new database credentials:
- WordPress:
wp-config.phpโ updateDB_NAME,DB_USER,DB_PASSWORD,DB_HOST - Joomla:
configuration.php - Custom apps: wherever your
.envor config file lives
- WordPress:
Step 3 โ Set up email at the new host
If you use email on the same domain, recreate the mailboxes at the new host before changing DNS, then use your email client to copy messages across (IMAP drag-and-drop works fine for most people). If you use Google Workspace or Microsoft 365 for email, your MX records stay the same and this step is irrelevant.
Step 4 โ Test before switching
You can preview your site at the new host without touching DNS by editing your local hosts file. Add a line like:
123.45.67.89 yourdomain.co.uk www.yourdomain.co.uk
(Replace the IP with your new host's server IP.) Your browser will now load the new host's version of your site while everyone else still sees the old one. Check every page, form, checkout flow and login.
Undo the hosts file change once you're satisfied.
Step 5 โ Update your DNS
- Log in to your domain registrar (the company you bought the domain from โ not necessarily your old host).
- Either update the nameservers to point at the new host, or update just the A record to the new host's IP โ whichever the new host instructs.
- Wait. Most visitors switch within 1โ2 hours; a small number can take up to 24 hours due to caching at their ISP.
Once DNS propagates, trigger a Let's Encrypt certificate at the new host (one click in cPanel under "SSL/TLS" or "Let's Encrypt"). Don't cancel the old host until the cert is live and HTTPS works.
Step 6 โ After the switch
- Monitor your site for 48 hours before cancelling the old hosting.
- Check Google Search Console for any crawl errors.
- Confirm emails are sending and receiving correctly.
- Cancel the old plan before its next billing date.