Moving Your Website to a New Host, Step by Step
A step-by-step guide to moving your website to a new hosting provider safely, from backups and DNS changes to testing, with a handy checklist.

Moving a website to a new host sounds risky, but with a little planning it is a routine task. The key idea is simple: copy everything to the new server first, test it, and only then point your domain at the new location. Done in that order, visitors should barely notice the change. This guide walks you through the process for a typical website with files and a database.
Before you start: plan the move
Good preparation prevents most migration problems. Spend a few minutes on these points before touching anything.
- Keep the old hosting active. Do not cancel it until the migration is fully finished and verified.
- Pick a quiet time. Moving during your lowest-traffic hours reduces the chance of lost orders or comments.
- Find out where your domain is registered. You will need access to the DNS settings, which may be at your registrar rather than your host.
- Check compatibility. Compare PHP versions, database versions and any required extensions between the old and new server.
Step 1: Make a full backup
Create a complete backup of your site before doing anything else. A typical site has two parts: the files (themes, images, uploads, code) and the database (posts, settings, user data). Download both to your own computer, not just to the server. If you use WordPress, a backup plugin can package files and database together, or you can export them separately through your control panel and phpMyAdmin.
Step 2: Set up the new hosting account
Create the account at the new host and add your domain to it. Most hosts let you do this before the domain points to them. Create an empty database and a database user, and write down the database name, username, password and host name. Make sure SSL can be issued for your domain; some hosts can only issue a certificate after DNS points to them, while others let you import one.
Step 3: Copy your files
You can upload files with SFTP or FTP, or use the file manager in your control panel. For large sites, compressing the files into one archive and extracting it on the new server is faster than transferring thousands of small files. Some hosts also offer a free migration service or an automatic transfer tool, which is worth asking about because it can save time.
Step 4: Move the database
- Export the database from the old server as an SQL file, using phpMyAdmin or your panel's export tool.
- Import that file into the empty database on the new server.
- Open your site's configuration file (for WordPress, wp-config.php) and update the database name, user, password and host to the new values.
If the import fails because of file size limits, ask the host to raise the limit or use the command line if you have access.
Step 5: Test before changing DNS
This is the step that protects you from downtime. You want to see the new copy of your site while the public still sees the old one. The common way is to edit the hosts file on your own computer so that your domain name points to the new server's IP address. Only your computer is affected. Some hosts also give you a temporary URL for testing.
While testing, check the following:
- The home page and several inner pages load correctly.
- Images, stylesheets and scripts appear, with no broken links.
- Contact forms, logins and search work.
- If you run a shop, test a checkout in test mode.
- No errors appear on screen or in the error log.
Remember to remove the hosts file entry afterwards.
Step 6: Lower the DNS TTL in advance
TTL (time to live) tells servers around the internet how long to cache your DNS records. If it is set to a long period, some visitors will keep reaching the old server for hours after you switch. A day or two before the move, lower the TTL on your main records to a few minutes if your DNS provider allows it. After the migration is stable, you can raise it again.
Step 7: Switch DNS
When the new site works well, update your DNS. You have two options:
- Change the A record (and any related records) to the new server's IP address. This is useful when your DNS is managed elsewhere.
- Change the nameservers to the ones provided by the new host. This hands DNS control to the new host.
Propagation can take from a few minutes to a day or more, depending on caching. During that time, some visitors see the old server and some see the new one. To avoid data being split between two places, put dynamic sites such as shops or forums in maintenance mode briefly, or avoid changes on the old site during the switch.
Step 8: Handle email carefully
Email is the most overlooked part of a migration. If your mailboxes are hosted with your old provider, changing the nameservers without recreating the MX records and mailboxes can interrupt your email. Decide in advance whether email will stay where it is, move to the new host or go to a separate email service, and copy the MX, SPF, DKIM and DMARC records accordingly.
Post-migration checklist
| Task | Why it matters |
|---|---|
| Confirm SSL is active | Avoids browser security warnings |
| Check redirects and permalinks | Preserves search engine rankings and links |
| Re-create scheduled tasks (cron jobs) | Keeps backups, emails and updates running |
| Set up backups on the new host | Protects you from day one |
| Test email sending and receiving | Catches problems before customers do |
| Review analytics and search console | Spots crawl errors or traffic drops early |
Common mistakes to avoid
- Cancelling the old host too soon.
- Forgetting that the database and the files must both be copied.
- Switching DNS before testing the new server.
- Ignoring email records, which causes lost messages.
- Leaving hard-coded old URLs or server paths in configuration files.
Final thoughts
A successful migration is mostly about order: back up, build the copy, test it privately, then switch DNS and keep the old host as a safety net for a while. Take your time, follow the checklist and do not rush the testing stage. If you feel unsure, ask your new host about assisted migration, since many providers will do the technical work for you.


