How Do I Move My Website to a New Host? (Zero-Downtime Migration Guide)
· 7 min read
The decision to switch hosts usually starts with the search for a faster server, better support or a more practical control panel. What actually worries site owners is the site going offline or emails getting lost during the move. Done in the right order, a migration is something your visitors won't even notice. In this guide we walk you through moving your files, database, email and DNS records to a new host without downtime, step by step.
The 4 Components That Move During a Migration
A website is more than a single folder. Before you start, think about these four parts separately:
- Files: The site's code, theme, plugins and uploaded images. On cPanel they usually live in
public_html, on Plesk inhttpdocs. - Database: The content, orders and user data of WordPress, Laravel or e-commerce sites (MySQL / MariaDB).
- Email accounts: Addresses such as
[email protected]and the messages stored on the server. - DNS records: The records that decide which server your domain points to:
Afor the website,MXfor email, andTXTfor domain verification and sender security (SPF, DKIM).
Moving your hosting is not the same as moving your domain. Your domain can stay with its registrar; to switch to the new server, you only need to point its DNS records there. If you'd like to manage your domain in the same place as your hosting, you can start a domain transfer separately.
Comparing Migration Methods
| Method | What you need | Best suited for | |
|---|---|---|---|
| Manual migration (SFTP + phpMyAdmin) | Basic knowledge of file transfer, databases and DNS | Must be moved separately | Owners of a single site who want to handle the process themselves |
| WordPress migration plugin | WordPress admin access | Not moved | WordPress sites only; free versions may limit file size |
| zuwinasa cloud free migration | Access to your old host; our expert team does the work | Moved together with the site | Owners of several sites and email accounts, anyone switching from cPanel to Plesk |
Moving Your Website to a New Host in 6 Steps
1. Take Inventory of Your Old Host and Make a Full Backup
The step most often skipped is making a complete list of what's on the old server. Write down:
- Domains, subdomains (such as
blog.yourdomain.com) and redirects - Database names and the PHP version your site uses
- Email accounts, email forwarders and auto-replies
- Scheduled tasks (cron jobs) and a complete list of your current DNS records
Then download a full backup of the files and the database to your own computer. If anything goes wrong during the move, this backup is your safe point to return to.
2. Lower the TTL of Your DNS Records
TTL (Time To Live) determines how long a DNS record stays cached on servers across the internet. At least one day before the switch, lower the TTL of your domain's A and MX records to 300 seconds (5 minutes). The new value only takes effect once the old TTL has expired, so allow for that. As a result, most visitors will reach the new server within minutes on the day you change DNS.
3. Prepare the New Host and Transfer Your Files
In the new panel, add your domain, set the same PHP version as on the old server, and create your email accounts with the same names. Then transfer the files:
- Compress the site folder as a
.zipwith the old panel's file manager and download it, or copy it via SFTP. - In Plesk, upload the archive to the
httpdocsfolder with the File Manager and extract it. - Don't forget hidden files (
.htaccess,.env); make sure your SFTP client shows hidden files. - Recreate your cron jobs under Scheduled Tasks in Plesk.
4. Move the Database and Update the Connection Settings
Export the database as a .sql file from the Export tab in the old panel's phpMyAdmin. If you have SSH access, the command line is more reliable for large databases: mysqldump -u username -p database_name > backup.sql
In the new panel, create an empty database and user under Databases, then import the .sql file. Next, update the connection details in your site's configuration file with the new values: DB_NAME, DB_USER, DB_PASSWORD and DB_HOST in wp-config.php for WordPress, or the lines starting with DB_ in the .env file for Laravel. If your domain stays the same, you don't need to touch the site URLs stored in the database.
5. Test the Site Without Changing DNS
While your visitors are still on the old server, you can open the new server on your own computer only. To do this, add the new server's IP address to your computer's hosts file:
- macOS / Linux:
/etc/hosts - Windows:
C:\Windows\System32\drivers\etc\hosts
Add a line like 203.0.113.10 yourdomain.com www.yourdomain.com at the end of the file, replacing the IP with your new server's address. Your browser will now load your domain from the new server. Try the home page, the contact form, the admin login and, if you have one, the checkout. Remember to remove the line once you've finished testing.
6. Point Your DNS and Finish Email and SSL
If everything works, make the switch in one of two ways:
- Change only the
Arecord: DNS management stays where it is; you point the records for the domain and thewwwsubdomain to the new IP. If you lowered the TTL beforehand, this is the fastest method. - Change the nameservers (NS): DNS management moves to the new provider. First make sure every record, including
MXandTXT, exists in the new DNS zone. With a nameserver change, the timings of the domain extension's registry apply, so propagation can take longer.
For email, once you've pointed the MX record to the new server, move the messages from the old mailboxes: open the old and new accounts side by side over IMAP in your email client and drag the folders across, or use a sync tool such as imapsync.
As soon as DNS points to the new server, get a free Let's Encrypt certificate under SSL/TLS Certificates in Plesk; it is issued by verifying that the domain points to the new server. If you have a paid certificate, upload the certificate and its private key to the new server before the switch to avoid any HTTPS interruption.
Note: The most common mistake is shutting down the old host right after changing DNS. Some networks keep the old record cached for a while. Keep the old hosting running for at least a few days, until you see no more visits or emails arriving there, and take one last backup before you cancel it.
Leaving the Migration to Our Team
If you'd rather not deal with these steps yourself, migration is free with zuwinasa cloud's web hosting, WordPress hosting and developer hosting plans. Our expert team moves your files, databases and email without data loss and adapts the .htaccess rules from cPanel to the Plesk setup; for Node.js or Laravel projects, we also configure your environment variables, scheduled tasks and Git connection.