You've finally decided to move your website to a new host, but the thought of the site going down for hours, or of customer orders and emails getting lost along the way, keeps you putting the decision off month after month. That fear is understandable. Plenty of site owners have been through a bad migration because it was rushed and done without a plan.

The good news is that migrating your website to a new host without downtime is entirely possible if you follow the right order: take inventory of everything, make a full backup, move the files and data, test the site on the new server before anyone else sees it, and then switch DNS at the right moment. This guide walks you through each of these steps in plain language, with a ready-made timeline you can apply to your own site.

When is moving to a new host the right call?

Not every annoyance with your hosting is a good enough reason to move, but some signs make it clear the time has come:

  • Persistent slowness: If your site is still slow after you've optimized images and plugins, the server itself may be overcrowded or running on old disks.
  • Poor technical support: Tickets that sit for days without a reply, canned answers that don't solve the problem, or support that doesn't speak your language.
  • Pricing that doesn't add up: Renewals at a much higher price than your first term, or extra fees for basics such as an SSL certificate.
  • Technical limitations: An outdated PHP version you can't upgrade, no clear control panel, or resource limits that don't fit your site's growth.

If you're still comparing options, read our guide on how to choose the right web hosting before you start the move, so you don't trade one problem for another.

Take inventory before you move: know exactly what you have

The most common migration mistake isn't technical. It's forgetting something. Before you touch a single file, write down everything that runs on your current hosting account.

The essential inventory checklist

  1. Files: Everything in your site's folder (usually public_html), including uploaded images and hidden files such as .htaccess.
  2. Databases: Their names, their users, and any subsite that uses a separate database.
  3. Email accounts: Addresses, the messages stored in them, forwarders, and autoresponders.
  4. Cron jobs: Commands that run automatically, such as sending reports or cleaning up temporary files.
  5. SSL certificate: Is it a free, automatic certificate, or a paid one that needs to be moved or reissued?
  6. DNS records: Copy all current records, especially MX records for email and TXT verification records such as SPF and DKIM.
  7. PHP version and extensions: Note the PHP version number and any custom settings so you can match them on the new server.
  8. Subdomains and addon domains: Such as shop.example.com, or other domains attached to the same account.

Tip: Take screenshots of the DNS records page and the PHP settings page in your old hosting account. You'll need them later for comparison, and you may lose access to the old account before you remember some small detail.

Always make a full backup first

Before any migration step, take a full backup and store it somewhere other than the old host, on your own computer or in cloud storage. This backup is your safety net if anything goes wrong during the move.

If your host uses cPanel, you'll find a Backup tool that lets you download a full backup of the account, or partial backups of files and databases separately. Don't stop at creating the backup: download it, check that its size makes sense, and make sure the file opens. To go deeper on this topic, see our article on the 3-2-1 backup strategy.

Migration methods: full transfer or manual?

There are two main approaches, and which one you choose depends on the control panels at both hosts and how comfortable you are with technical tasks.

Method 1: Transfer the entire cPanel account

If both your old and new hosts use cPanel, the easiest option is a Full Account Transfer. You take a full backup of the old account as a compressed archive, and it's restored on the new server exactly as it was: files, databases, email accounts and their messages, cron jobs, and domain settings.

Restoring a full backup usually requires server administrator (WHM) access, so it's typically handled by the new host's support team. This is the least error-prone method because everything moves in one go.

Method 2: Manual migration

Use this if one of the hosts doesn't run cPanel, or if you only want to move one site out of an account that hosts several. The steps are:

  1. Move the files: Compress the site folder in File Manager and download it, then upload it to the matching folder on the new host and extract it. You can also use FTP, but compressing is much faster when you have thousands of small files.
  2. Export the database: In phpMyAdmin, select the database, then choose Export in SQL format.
  3. Create a new database: On the new host, create a database and a user with a strong password, and grant that user all privileges on it.
  4. Import the data: In phpMyAdmin on the new host, open the new database, choose Import, and upload the SQL file.
  5. Update the configuration file: In WordPress, open wp-config.php and edit the connection details to match the new database.
define( 'DB_NAME', 'newuser_wpdb' );
define( 'DB_USER', 'newuser_wpuser' );
define( 'DB_PASSWORD', 'your-strong-password-here' );
define( 'DB_HOST', 'localhost' );

Other systems may use a differently named configuration file, such as .env or config.php, but the principle is the same: database name, username, password, and host.

If your database files are very large and phpMyAdmin rejects them because of its upload size limit, ask the support team to import them for you. It's a common and simple request.

Keyboard and computer screen during the transfer of website files and a database
Keyboard and computer screen during the transfer of website files and a database

Move your email without losing a single message

Email is the part that's most often forgotten. If you transfer the whole account through cPanel, the messages move with it. With a manual migration, you first need to create the same email accounts, with exactly the same names, on the new host.

After that, the messages are moved with IMAP Sync: a tool that connects to both the old and new servers at once and copies folders and messages from the first to the second. Some hosts provide this tool, and you can also use a desktop email client such as Thunderbird: add both the old and new accounts using IMAP, then drag the folders from one to the other.

After you switch DNS, run the sync one last time to catch any messages that arrived at the old server during propagation. For more on email setup, see our guide to setting up business email.

Test the site on the new server before switching DNS

This is the step that separates a zero-downtime migration from one full of surprises. The idea is to open your site from the new server on your own computer only, while every other visitor keeps seeing the old site.

The hosts file method

The hosts file on your computer lets you tell your browser, "When I ask for example.com, go to this address," bypassing public DNS. Add a line with the new server's IP address (you'll find it in your control panel or welcome email):

203.0.113.10    example.com
203.0.113.10    www.example.com

On Windows: Open Notepad as administrator, then open the file:

C:\Windows\System32\drivers\etc\hosts

On macOS: Open Terminal and run:

sudo nano /etc/hosts

Add the two lines at the end of the file and save. You may need to close and reopen your browser, or flush your DNS cache. On macOS you can run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Now browse your site thoroughly: the home page, product pages, login, forms, and the shopping cart. When you're done, delete the two lines from the hosts file so you don't stay stuck on the new server without realizing it.

Temporary URL

Some hosts provide a temporary URL so you can preview the site before connecting the domain. That's useful for simple sites, but WordPress sites may show broken links through it because WordPress stores the domain name inside the database, so the hosts file method remains more accurate.

Switching DNS without downtime

Once you've confirmed the site works on the new server, the only thing left is to send visitors there. This stage needs a little preparation in advance, and then one decision: exactly what you're going to change.

Lower the TTL a day or two before the move

TTL (Time To Live) is a number attached to every DNS record that tells servers around the world how many seconds to keep the answer cached before asking again. If the value is 86400 seconds, some networks may keep pointing to your old server for a full day after the switch.

So, 24 to 48 hours before the move, lower the TTL on your A and MX records to a small value such as 300 seconds (five minutes). When you change the address later, networks will pick up the change quickly. Once the migration has settled, you can raise the TTL back to a higher value.

Note that this only works if you'll be changing records within the same DNS provider. Changing the nameservers entirely is a different matter, as you'll see below.

Network map representing DNS records propagating across internet servers worldwide
Network map representing DNS records propagating across internet servers worldwide

Nameservers or A records?

You have two options for pointing your domain to the new host:

  • Change the nameservers: This makes the new host responsible for all of the domain's DNS records. It's simpler if you want to manage everything from one panel, but first make sure every old record (especially MX and TXT) has been recreated in the new zone. A nameserver change goes through the domain registry, can take longer to propagate, and isn't helped by the TTL reduction you made.
  • Edit only the A records: You keep DNS management where it is and change the IP address in the example.com and www records to the new server's address. This option benefits directly from the lowered TTL and is usually the fastest.

How long does propagation take?

DNS propagation is the time networks need to refresh their caches. It can take up to 24–48 hours, but it's often much shorter than that, especially with a low TTL. During this window some visitors may see the old site and others the new one, which is why it's important not to change content on the old site once the migration has started.

If your site is a store or takes orders, pause new content or orders on the old site shortly before the switch, or pick a time when traffic is at its lowest.

A suggested migration timeline

Day Task
D-7 (one week before) Full inventory, choose the new host, take a full backup and download it
D-2 (two days before) Lower TTL to 300 seconds, move files and databases, create email accounts, test the site via the hosts file
D (migration day) Freeze changes on the old site, run a final database and email sync, switch the A records or nameservers
D+3 (three days after) Go through the post-migration checklist, run a last email sync, raise TTL back to a higher value, then consider canceling the old hosting

Post-migration checklist

Once visitors start reaching the new server, go through these points one by one:

  • Forms: Send a test message through your contact form and confirm it arrives.
  • SSL certificate: Open the site over https and make sure the padlock appears with no warnings. If you need more detail, read our guide to SSL certificates.
  • Email: Send and receive from every important account, and confirm that your MX and SPF records point to the right place.
  • Redirects: Make sure your .htaccess rules work and that old URLs don't return a 404 error.
  • Cron jobs: Confirm they've been recreated and are running on the new server.
  • Google Search Console: Watch the coverage and error reports over the following days to make sure search engines are reaching the site normally.

Keep the old hosting for a few days

Don't cancel your old hosting on migration day. Keep it for at least a few days after propagation completes, because you may need a file you forgot, emails that arrived late, or a setting to compare. Cancel it only once you're sure everything works and you have a backup stored somewhere else.

Frequently asked questions

Will my site go down during the migration?

Not if you follow the right order. The old site keeps running right up until the DNS switch, and the new site is already set up and tested. During propagation, every visitor sees a working version of the site, whether it's the old one or the new one.

Will moving my site affect my search engine rankings?

Moving to a new host while keeping the same domain and the same URL structure usually doesn't affect rankings. What matters is that the site stays available without errors and that your URLs don't change. Watch Google Search Console over the following days to make sure no crawl errors appear.

Do I need to transfer my domain to the new company too?

No. Moving your hosting and transferring your domain registration are two separate processes. You can keep the domain with its current registrar and simply point it to the new host. If you later want everything in one place, you can transfer the domain calmly at another time.

What if my site is very large?

Large sites are migrated the same way, but compressing, uploading, and importing take longer. In that case, a full cPanel transfer is the better option, or ask the new host's support team for help, since they can move files directly between servers without routing them through your computer.

Do I need technical experience to migrate my site myself?

Anyone who knows how to log in to a control panel can follow the steps in this guide. But if you're not comfortable doing it, many hosting companies offer a migration service. At NetNexus, for example, we migrate your existing site for free: just open a support ticket.

Conclusion

Migrating your website to a new host without downtime isn't a matter of luck. It's a matter of order: a thorough inventory, a backup stored off the server, moving your files, data, and email, testing the site through the hosts file, lowering TTL in advance, then switching DNS and checking everything afterward, while keeping the old hosting for a few days as a fallback. If you're looking for a new home for your site with cPanel, NVMe storage, and Arabic-speaking support, take a look at NetNexus hosting plans and let us handle the migration for you.