Explore WaseerHost

Appearance

GuideWebsite Migration 10 min read

cPanel Migration: How to Move a Site to a New Account

Move a website between cPanel accounts with a Full Backup, WHM Transfer Tool or a manual copy. Test with a hosts file, switch DNS safely and roll back if needed.

Waqas Ahmed Waseer, authorWaqas Ahmed WaseerFounder & CEO
Updated
cPanel Migration: How to Move a Site to a New Account

Summarize with:

Share:

A cPanel migration moves a website from one cPanel account to another without losing files, databases or email. You can do it with a Full Backup that the new host restores, with WHM's Transfer Tool, or by copying each part yourself. This guide covers how to pick a method, back up, restore, test safely, switch DNS and fix the errors that show up most.

Key takeaways

  • A normal cPanel login can create a Full Backup but cannot restore one. That is a WHM job for the new host. Without WHM access, the manual route works and lets you move a single site.
  • Lower your DNS TTL about a week before the move, and test the new account with a hosts file entry before you change DNS.
  • Keep the old account running until its traffic reaches zero. That is your rollback.
  • Database names and users get a new prefix on the new account, so update your config file.

Pick a cPanel migration method

MethodWhat you needBest forLimit
Full Backup, restored by the new hostcPanel login on the old accountA whole accountcPanel cannot restore it
Transfer Tool in WHMroot or sudo accessMoving accounts between servers you runHosts can enable it for resellers
Manual copycPanel login on both accountsOne site, or no WHM accessMore steps, and email is rebuilt by hand

cPanel's documentation says you "cannot automatically restore a full backup file in cPanel. This function is only available in WHM." So most people on shared hosting hand the backup to the new host or go manual. Transfer Tool is built for administrators, and cPanel calls its "Transfer or Restore a cPanel Account" interface a last resort.

If the new account is with WaseerHost, free website migration lets the host do the restore for you. You still prepare, test and cut over either way.

Pre-flight checklist

  1. Note the PHP version of each domain in MultiPHP Manager, and list every addon domain and subdomain.
  2. Open Cron Jobs and copy every command into a text file.
  3. In Zone Editor, click Manage and copy every record (A, AAAA, MX, TXT, CNAME) into a text file. A public DNS lookup is a good cross-check.
  4. List your mailboxes in Email Accounts and your Forwarders.
  5. Find out where your DNS is hosted (registrar, old host or DNS provider). That decides how you switch in Step 5.
  6. Pick a quiet time, and pause orders and comments while you copy.

Lower the DNS TTL first

The TTL tells resolvers how long to cache a record. Google's site move guidance says to consider lowering it "to a conservative low value (for example, a few hours)" about a week ahead, so the change spreads faster when you flip it. Zone Editor shows a TTL column under Manage. Lower the TTL on your A and AAAA records wherever your DNS is hosted, then leave them alone until the cutover.

Step 1: Create the backup

For a Full Backup, open Backup in cPanel, click Download a Full Account Backup, then fill in the Generate a Full Backup section:

  1. Choose a Backup Destination: Home Directory, Remote FTP Server, passive mode FTP, or Secure Copy (SCP).
  2. Enter an email address for the completion notice, or select Do not send email notification of backup completion.
  3. Leave Include integration links unchecked, because it may include external account credentials.
  4. Click Generate Backup.

The result is a .tar.gz file. Per cPanel's tarball contents reference, it holds your home directory, MySQL dumps, DNS zone files, cron table data and SSL files. Send it to the new host, or push it with SCP. Accounts near their quota can fail to back up.

For the manual route, take partial backups on the same page instead: Home Directory, each database, Forwarders and Email Filters download as .gz files, and cPanel can restore them through Restore.

Step 2: Restore files and databases

If the host restores your Full Backup, skip to Step 4. For a manual move, rebuild the account in this order.

Files

Upload your home directory backup with Restore, or use File Manager to compress public_html on the old account, download the archive, upload it to the new account and extract it. Hidden files such as .htaccess are easy to miss, so enable Show Hidden Files (dotfiles) under Settings in File Manager.

Databases

cPanel adds the account username and an underscore as a prefix to database users (and to database names when prefixing is on), so the new names will differ. Create them again in MySQL Databases:

  1. Enter a name under New Database and click Create Database.
  2. Under Username, create the user and set a strong password with Create User.
  3. In Add User To Database, pick the user and the database, click Add, then select ALL PRIVILEGES and Make Changes.

Then open phpMyAdmin, select the new database, choose the Import tab and upload your .sql file. If a large import times out, use the mysql client over SSH.

Update the config file

Your site still points at the old database details. In WordPress, wp-config.php holds them. Change DB_NAME, DB_USER and DB_PASSWORD, and keep $table_prefix as it was, because your imported tables already use it. DB_HOST is usually localhost on cPanel hosting. A Laravel site keeps the same values in .env as DB_DATABASE, DB_USERNAME and DB_PASSWORD.

Now set the PHP version. In MultiPHP Manager, tick the domain, choose the version from the PHP Version menu and click Apply. Match the old account first and upgrade later. See PHP hosting for WaseerHost's versions.

Step 3: Rebuild email

In a manual migration mail does not move by itself:

  1. Create each mailbox in Email Accounts with the same address, then recreate forwarders and filters.
  2. Copy old messages by adding both mailboxes to an email app and dragging folders across, or restore your Home Directory backup, which cPanel says includes email for the account's domains.
  3. Check Email Routing for each domain. Automatically Detect Configuration reads only your local zone file, not live DNS. If mail is rejected after the switch, set Local Mail Exchanger when your MX records point at this server.

Watch for stale hostnames. If your MX record points to mail.example.com and that name still has the old A record, mail keeps going to the old server. Update any SPF record that lists the old server's IP, and remember the new account has its own DKIM key. The SPF, DKIM and DMARC guide covers the records, and business email covers mailboxes.

Step 4: Test with a hosts file entry

Your computer reads its hosts file before asking DNS, so you can point only your machine at the new server. Add the new server's IP (this one is a documentation example):

text
203.0.113.10    example.com
203.0.113.10    www.example.com

On Windows, the file is C:\Windows\System32\drivers\etc\hosts. Open Notepad as administrator, then open the file from that folder (Microsoft Support). On macOS, Apple's steps use Terminal (Apple Support):

bash
sudo nano /private/etc/hosts

Then flush your DNS cache, and test logins, forms, uploads and checkout. A certificate warning is normal here, because the new account may not have issued one yet. Remove the hosts lines afterwards, or you will keep seeing the new server.

Step 5: Cut over DNS

  1. Take a final database export from the old site and import it on the new one, so recent orders and comments are not lost.
  2. Change the A (and AAAA) records to the new server's IP wherever your DNS is hosted. In Zone Editor, click Manage, click Edit next to the record, update Address and click Save Record.
  3. If you are also changing nameservers, confirm the new zone already holds every MX and TXT record first. The nameservers guide explains the difference.
  4. Check the result with a public DNS lookup, and watch the access logs on both servers.

Google advises shutting down the old hosting only "once the traffic to the old provider reaches zero." With the same URLs you need no redirects and no Search Console change of address.

Roll back if something breaks

Do not cancel the old account on cutover day. If the new site fails in a way you cannot fix quickly, point the A record back at the old IP. Because you lowered the TTL, resolvers should pick it up within hours. Copy back any orders taken on the new server.

Post-move checks

  • Load the home page, a deep page, the login page and a form over HTTPS.
  • Check SSL/TLS Status for a certificate on every domain.
  • Send and receive a test email on each mailbox.
  • Confirm each cron job runs, make a fresh backup of the new account, and reset your TTL to a normal value.

Common errors and fixes

SymptomLikely causeFix
"Error establishing a database connection"Wrong database name, user or password, or user not added to the databaseFix wp-config.php or .env, and repeat Add User To Database with ALL PRIVILEGES
White page, 500 error or deprecation warningsPHP version differs from the old accountSet the old version in MultiPHP Manager, click Apply, then upgrade later
Scheduled jobs never runCron jobs were not copied, or they use /home/olduser/ pathsRecreate them in Cron Jobs with absolute paths for the new account
Browser warns about the certificateSSL not yet issuedSee below
Mail goes to the old serverMX host still has the old A record, or Email Routing is wrongUpdate the mail hostname and set Local Mail Exchanger if needed

Let's Encrypt's HTTP-01 check requests a file from http://<YOUR_DOMAIN>/.well-known/acme-challenge/, so it can only succeed once the domain points at the new server (Let's Encrypt). Cut over first, then check SSL/TLS Status, which flags domains that do not resolve and shows when AutoSSL last ran. WaseerHost plans include free SSL certificates; see shared hosting. For a plan that covers any host move, use the website migration checklist.

Frequently asked questions

It depends on the size of the account and the speed of the transfer, so there is no fixed answer. The DNS part is set by the TTL you chose, which is why lowering it early helps.

Waqas Ahmed Waseer

Written by

Waqas Ahmed Waseer

Founder & CEO

Founder and CEO of Wasevo LLC, the company that runs WaseerHost. He works on cPanel/WHM servers, WHMCS billing and the Next.js storefront.

Related Guides

Get new guides by email

One short email when we publish something useful. No spam; unsubscribe at any time.

Free SSL · Free migration · 24/7 support

Free website migration

Request a migration
30-day money-back guarantee

Renews at the same price for the term you choose