Get started

How to move a cPanel or WordPress site to a new host without downtime

Move a WordPress or cPanel site without a long outage: lower the DNS TTL, copy the site, test it on the new server, then change nameservers. Keep the old account live until DNS settles.

30 November 2026 · 7 min read

A site move does not have to mean a morning of “this page cannot be reached.” The reliable method is to copy the site to the new host, test it there while the old server is still live, and only then change DNS. Most of the work happens before anyone else sees the new address.

This is a practical checklist for a cPanel or WordPress move, including cPanel-to-cPanel transfers. It does not invent transfer times or downtime figures: how long DNS takes to settle depends on the previous TTL and on each resolver. If you would rather not run the cutover yourself, HosterOcean will move the site for you — open a ticket, or start from the migration page. The move is free.

The four phases

Four-phase zero-downtime migration: prepare by lowering DNS TTL, copy files and databases, test on the new server with a local hosts file, then cut over nameservers and keep the old account running until DNS settles.
Prepare, copy, test, then cut over. The old server stays live until DNS has settled on the new one.
  1. Prepare — Lower the DNS TTL at least a day before you plan to switch, so the later change can spread faster.
  2. Copy — Move files, databases and mail to the new account, matching PHP and extensions.
  3. Test — Point your own computer at the new IP with a hosts file, and check the site before public DNS changes.
  4. Cut over — Change nameservers or A and MX records. Keep the old account running until lookups have moved, then raise the TTL again.

1. Prepare: lower the DNS TTL

TTL is how long a resolver is asked to remember your DNS records. If the current TTL is 24 hours, some visitors can keep hitting the old server for a day after you change nameservers. Lower it to something short — often 5 or 15 minutes — at least a day before the cutover, and wait for the old TTL to expire once so the short value is in use.

You change TTL at the DNS host that currently answers for the domain. That might be the old cPanel Zone Editor, a registrar, or a DNS service. If the domain is a .pk name, you can also review nameservers later on our .pk domains page; transfers of the domain itself are a separate step from hosting, covered under domain transfer.

Write down the current A, AAAA, MX, CNAME, TXT (including SPF and DKIM) and any NS records. You will want that list when you check the new zone, and if mail must stay on the old server for a while.

2. Copy the site to the new host

Create the account on the new host first. For WordPress, a WordPress hosting or shared hosting plan with cPanel is the usual destination; a VPS is the path if you need root access. Then choose a copy method:

  • cPanel to cPanel — If both hosts give you (or the receiving host) a Transfer Tool or “Copy an Account” style move, that can bring files, databases, email and cron jobs in one pass. The receiving host often runs this for you if you open a migration ticket.
  • Full account backup — In cPanel, generate a full backup and restore it on the new account, or ask the new host to restore it.
  • Files and database — Copy the document root (for WordPress, usually public_html including wp-content and wp-config.php), export the MySQL database, import it on the new account, and update the database name, user and password in wp-config.php if they changed.

Match the PHP version and extensions on the new account to the old site, or to a newer supported version you have already tested. If you are leaving PHP 8.2, follow the same staging-and-rollback approach as in our guide to moving WordPress off PHP 8.2. If you are building a fresh WordPress install rather than moving one, see how to install WordPress on cPanel.

Copy email too if the domain’s mailboxes live on the same cPanel account: mailbox data, plus the MX and authentication records you noted earlier.

3. Test on the new server before you change DNS

Do not change nameservers until you have looked at the new copy yourself. The usual method is a local hosts file on your computer: add a line that maps the domain (and www, and any shop or mail hostname you need to test) to the new server IP. Then flush your local DNS cache and open the site in a browser.

On Windows the file is typically C:\Windows\System32\drivers\etc\hosts. On macOS and Linux it is /etc/hosts. The line looks like:

203.0.113.10 example.com www.example.com

Use the real new IP, not that example address. Check, at least:

  • The home page, a post or product, and a form or checkout if you have one.
  • A login to /wp-admin.
  • HTTPS. AutoSSL may not issue for the live hostname until public DNS points at the new server. Some hosts give you a temporary URL, or you can wait to confirm AutoSSL immediately after cutover. Do not ignore mixed-content or certificate warnings on the tested copy.
  • Outgoing and incoming mail, if mail is moving. Confirm the new zone’s MX, SPF and DKIM values match the plan you wrote down.

Remove the hosts-file line when you have finished testing, so your own computer follows public DNS again after the cutover.

4. Cut over DNS, then keep the old server up

When the tested copy looks right, change DNS:

  • Switch nameservers at the registrar to the new host’s nameservers, if the new host will run DNS; or
  • Leave nameservers where they are and update the A (and AAAA) records to the new IP, and MX if mail is moving.

Because you already lowered the TTL, the change should be visible sooner than a day-long TTL would allow. It is still not instant everywhere. Leave the old account running — site, databases and mail — until you are satisfied that public lookups, including from a second network or a DNS checker, resolve to the new IP. Only then raise the TTL back to a normal value, and only then cancel the old hosting.

A working checklist

Pre-cutover and post-cutover verification checklist for a website migration, covering TTL, files and database, PHP, hosts-file testing, AutoSSL, mail records, and keeping the old server up until DNS has settled.
Use this as a working list, not a guarantee. Fix issues on the tested copy before you change public DNS.

Before cutover: TTL has been lowered and has had time to expire; files, database and email are on the new account; PHP and extensions match; the site loads via a hosts-file test, including forms and checkout; HTTPS works on a temporary URL or the new hostname; MX and SPF/DKIM are written down if mail moves.

After cutover: the domain resolves to the new IP from more than one network; the homepage, wp-admin and a form work over HTTPS; AutoSSL or the certificate has issued for the live domain; test mail arrives, and SPF/DKIM still pass if you send from the domain; the old server stays up until straggling resolvers have moved; TTL is raised again once you are happy with the new host.

Frequently asked questions

Will the site be down while you copy it?

It should not be, if you copy first and change DNS last. Visitors keep using the old server until you point the domain at the new one.

How long after I change nameservers until everyone sees the new site?

There is no single worldwide switch-over time. It depends on the TTL that was in place and on each resolver. That is why you lower TTL in advance and keep the old account online until lookups have moved.

Do I have to move the domain and the hosting at the same time?

No. You can point an existing domain at the new host by changing nameservers or A records, and transfer the domain later if you want it in the same account. See domain transfer when you are ready.

Can you move the site for me?

Yes. HosterOcean includes free website migration. Open a support ticket with the old host details and the domain, or start from the migration page.

What about email during the move?

If mailboxes live on the cPanel account, copy them with the account and keep MX pointing at the correct place at each step. If mail stays on Google Workspace, Microsoft 365 or another provider, do not overwrite those MX records when you change web A records.

Free website migration at HosterOcean

New WordPress, shared or VPS accounts can be populated from your old host by our team. Send a ticket with the source login (or a full cPanel backup) and the domain you are moving. We will copy the site, help you test it, and leave DNS in your hands until you are ready to cut over — or walk through that step with you.

Tags:

WordPress migration

cPanel to cPanel

zero downtime

change nameservers

free website migration

Technical Guide

PHP 8.2 support ends on 31 December 2026: how to move WordPress to PHP 8.4 or 8.5 in cPanel

Move a WordPress site off PHP 8.2 in cPanel, with a backup, a staging check and an instant rollback.

Read More →

WordPress Guide

How to Install WordPress on cPanel

Two ways to install WordPress on a cPanel account: Softaculous, or a manual install with a database you create yourself.

Read More →