Home › Tech Hub › Web Hosting › Website Migration Guide
Website Migration Guide
Moving a website to a new host sounds risky, but it is a routine job when done in order: back up, copy, test, then switch the DNS. Follow the steps below and your site can move with no visible downtime.
Migration checklist — 10 steps
- Back up everything. Download a full backup of your files and a copy (export) of your database, and keep a copy on your own computer. Do not start a migration without a backup you have actually downloaded.
- Set up the new hosting account. Create the account, add your domain as an add-on or parked domain, and note the new nameservers and the temporary preview address.
- Copy the files. Upload your website files to the new host, either with FTP/SFTP or by restoring a backup through the control panel.
- Copy the database. Create a new database on the new host, import your database export, and create a database user with full permissions on it.
- Update the configuration. Edit the site's configuration file (for WordPress, wp-config.php) with the new database name, username, password and host. Check any hard-coded paths or URLs.
- Test on a preview address. Before changing DNS, test the site using the host's temporary URL or by editing your computer's hosts file. Click through the main pages, log in, and test forms and checkout.
- Lower the DNS TTL. At least 24 hours before the move, set your domain's TTL (time to live) to a low value such as 300 seconds, so the DNS change spreads quickly.
- Point the domain at the new host. Change the nameservers (or A record) at your domain registrar to the new host's values.
- Wait and watch. DNS changes usually spread within a few hours, but can take up to 48 hours. During this time some visitors see the old host and some see the new one — that is normal.
- Check everything, then cancel the old plan. Once the site works on the new host and email still works, wait a few days, then cancel the old hosting. Keep your backups.
WordPress migration, step by step
For a WordPress site, the simplest path is a migration plugin (such as Duplicator, UpdraftPlus or All-in-One WP Migration): install it on the old site, create a package, install the same plugin on the new site, and import the package. The plugin handles the files, the database and the URL changes.
If you prefer the manual route: download the files by FTP, export the database from phpMyAdmin, create a new database on the new host, import the export, upload the files, and edit wp-config.php with the new database details. Then run a search-and-replace on the database if the domain or folder path changed — use a proper tool for this, because a plain text replace can break serialised data.
After the move, log in to WordPress, save the permalink settings twice (this rebuilds the rewrite rules), and check the site's main pages, contact forms and any online store checkout.
Common migration mistakes
- No backup. The single biggest mistake. If the move goes wrong and there is no backup, the site may be unrecoverable.
- Changing DNS before testing. Always test the copy on the new host first, using a preview address or your hosts file.
- Forgetting email. If your email is hosted with your old host, moving the domain's DNS can break email. Move the mailboxes first, or keep email with a separate provider.
- Leaving the TTL high. A TTL of 24 hours means a DNS change can take a day to spread. Lower it to 300 seconds a day before the move.
- Not updating the configuration. A site that still points at the old database shows an error page. Check wp-config.php (or the equivalent) after the copy.
- Cancelling the old host too soon. Wait until the new site has worked for several days and email is confirmed working.
How long does a website migration take?
Copying the files and database usually takes under an hour for a small site. DNS changes then take a few hours to spread, and up to 48 hours in the worst case. Plan the move for a quiet time, such as a weekend evening.
Will my site go down during migration?
Not if you follow the order in this guide: the old site keeps serving visitors until DNS switches, and the new site is tested before that happens. There may be a short period where some visitors see the old copy and some see the new one.
Do hosts migrate websites for free?
Many do — most shared and managed hosts offer at least one free migration, and some offer unlimited free migrations. Ask the new host before you sign up, and check whether there are limits on site size.
What if my site is large?
Very large sites (many gigabytes of files or a huge database) can time out in migration plugins. In that case, copy the files by FTP or SSH and import the database in parts, or ask the new host's support team to do the migration for you.
Related hosting tools & guides
Compare three hosting plans side by side.
Best Shared HostingAffordable shared plans compared for beginners.
Best Managed HostingHands-off hosting with expert support.
Hosting Uptime CheckerCheck whether a website responds right now.
Domain Name CheckerCheck whether a domain name resolves.
SSL Certificate CheckerCheck a site's SSL certificate details.