Most growing websites start life on cPanel shared hosting — and for good reason. It's cheap, it's familiar, and everything from email to SSL is a click away. But sooner or later the limits start to show: slow page loads during traffic spikes, "resource limit reached" errors, a PHP version you can't change, or a neighbouring site on the same server dragging yours down. That's usually when the question comes up: should we move to a VPS or a cloud server?
Moving off cPanel is not hard, but it is easy to get wrong. The files and database are the simple part. What breaks sites after a migration is everything cPanel was quietly doing for you — email, DNS, cron jobs, PHP settings, SSL renewals, and .htaccess rules. This guide walks through the Linux migration process we use to move sites from cPanel to a VPS or cloud server without downtime, step by step.
cPanel vs VPS vs Cloud Server: What Are You Actually Moving To?
Before touching a single file, be clear about the destination, because it changes the whole plan:
- Another cPanel/WHM server: The easiest path. WHM's built-in Transfer Tool can move whole accounts — files, databases, email, and DNS zones — in one go. You get more resources without changing how you work.
- A VPS with a lighter control panel (such as CloudPanel, Plesk, or aaPanel): A middle ground. You get root access and better performance, but some features — especially email — may not be included.
- A bare Linux VPS or cloud server (DigitalOcean, AWS Lightsail or EC2, Google Cloud, Azure, Hostinger VPS): Full control over the stack — Nginx or Apache, PHP-FPM, MySQL or MariaDB — and the best performance per rupee. It also means you now own the server's security, updates, and backups.
This checklist focuses on the last two, since that's where most migration surprises happen. If you're planning a larger move to AWS, Azure, or Google Cloud — multiple applications, managed databases, auto-scaling — our cloud migration guide covers that bigger picture.
The Zero-Downtime Migration Flow
The principle is simple: the old cPanel server keeps serving visitors until the new server has been fully built and tested. DNS is the very last thing that changes — never the first.
Step 1: Take a Full Inventory of the cPanel Account
cPanel bundles a lot of services into one account, and anything you forget to list is something that will silently stop working after the move. Go through the account and write down:
- All domains, addon domains, subdomains, and redirects
- Every database and its user (cPanel prefixes names, for example
account_dbname) - The PHP version, loaded extensions, and custom settings such as
memory_limitandupload_max_filesize - All cron jobs, with their exact commands and schedules
- Email accounts, forwarders, and autoresponders
- The complete DNS zone — especially MX, SPF, DKIM, and DMARC records
.htaccessrewrite and redirect rules- SSL certificates and any FTP accounts that external tools or clients rely on
Step 2: Lower the DNS TTL 24–48 Hours in Advance
TTL (time to live) controls how long resolvers around the world cache your DNS records. If it's set to several hours, some visitors will keep reaching the old server long after you switch. Lower the TTL on your A and AAAA records to around 300 seconds a day or two before the migration. When you cut over, the change then spreads in minutes rather than hours — and if something goes wrong, rolling back is just as fast.
Step 3: Build and Secure the New Server First
Set up the destination completely before copying anything to it:
- Install the web server (Nginx or Apache), PHP-FPM, and MySQL or MariaDB — matching the PHP version and extensions from your inventory
- Create a non-root user, set up SSH key login, and disable password-based SSH login
- Enable a firewall (for example UFW) that allows only SSH, HTTP, and HTTPS
- Install Fail2ban to block brute-force login attempts
- Turn on automatic security updates
Doing this first means the site lands on a server that's already hardened, instead of going live on an open box and "securing it later" — which, in practice, often never happens.
Step 4: Copy the Website Files
If your cPanel account has SSH access, rsync is the best tool. It preserves permissions and timestamps, and a second run copies only what changed — which is exactly what makes the final sync fast. From the new server, run something like rsync -avz -e ssh user@old-server:~/public_html/ /var/www/example.com/.
If SSH is disabled on the shared plan, download a Full Account Backup from cPanel's Backup Wizard, or mirror the files over SFTP. Either way, exclude cache and log folders — they're large and get rebuilt anyway.
After copying, fix ownership and permissions for the new web server user. A common baseline is 755 for directories and 644 for files, with config files that contain passwords locked down further.
Step 5: Export and Import the Databases
Use mysqldump with --single-transaction, which takes a consistent snapshot of InnoDB tables without locking the live site. Add --routines --triggers if your application uses stored procedures or triggers. Compress the dump, transfer it, create the database and user on the new server, and import it.
Then update the application's database settings — wp-config.php for WordPress, .env for Laravel, and so on. Remember that cPanel's prefixed names (account_dbname) usually won't match your new names, and the database host may change as well. For large databases, engine changes, or major MySQL version jumps, see our database migration guide — those deserve their own plan.
Step 6: Re-create What cPanel Was Doing for You
This is the step most DIY migrations skip, and it's where most post-migration problems come from.
.htaccess Rules on Nginx
If you move from Apache on cPanel to Nginx, your .htaccess file stops working entirely — Nginx doesn't read it. Every redirect, rewrite, and access rule has to be converted into the Nginx server block. Miss one and you'll get broken pretty URLs, lost 301 redirects, and SEO damage that's hard to trace back.
Cron Jobs
Re-create each cron job in the new server's crontab. Paths almost always change — for example /home/account/public_html becomes /var/www/example.com — and so might the PHP binary path. Test each job manually once before relying on the schedule.
SSL Certificates
Let's Encrypt's usual HTTP validation only works once the domain points to the new server — which is too late if you want HTTPS working before cutover. Either use DNS-based validation to issue the certificate in advance, or temporarily install your existing certificate on the new server. Also confirm that automatic renewal is set up; cPanel's AutoSSL handled that for you, and a bare VPS won't.
Email: The Biggest Gotcha
On cPanel, email lives on the same server as the website. A bare VPS usually has no mail server at all — and running your own is rarely worth the deliverability headaches. The cleaner options are:
- Move mailboxes to a dedicated provider such as Google Workspace, Microsoft 365, or Zoho Mail, copying existing mail with a tool like
imapsync - Or keep email where it is for now, by leaving the MX records pointed at the old host
Also check how the website itself sends mail — contact forms, order emails, password resets. These should go through an authenticated SMTP service, with SPF, DKIM, and DMARC records updated to match. Otherwise they'll quietly land in spam. Our email migration service handles exactly this part.
Step 7: Test Everything Before Changing DNS
You can browse the site on the new server before the world sees it by adding an entry to your computer's hosts file that points the domain to the new server's IP. Visitors keep going to the old server; only your machine goes to the new one. Then check:
- Home page, inner pages, and images load, with no mixed-content warnings
- Logins, forms, search, cart, and checkout work end to end
- Emails actually arrive — from forms, orders, and password resets
- Old URLs still redirect correctly (test a few important 301s)
- PHP error logs are clean while you click through the site
Step 8: Final Sync and DNS Cutover
Between your first copy and cutover day, the live site kept changing — new orders, comments, form entries, uploads. So the final step is a short, controlled sync:
- Briefly pause writes on the old site (maintenance mode) if it takes orders or user submissions
- Run
rsyncagain — it only copies what changed, so it's quick - Take a fresh database dump and import it on the new server
- Update the A (and AAAA) records to the new server's IP
- Watch traffic move over — with a low TTL, most of it arrives within minutes
Realistically, "zero downtime" means zero for visitors browsing the site, and at most a few minutes of paused writes for sites that take orders or submissions. That's a planned pause you schedule for a quiet hour — not an outage you discover from customers.
Step 9: Keep the Old Server as Your Rollback Plan
Don't cancel the old cPanel hosting on cutover day. Keep it running, untouched, for at least a week. If something serious shows up — a missed cron job, a broken integration — you can point DNS back within minutes while you fix it. Once everything has been stable for a week, take a final backup of the old account and then cancel it.
After the Move: You Now Own the Server
This is the part people underestimate. On shared cPanel hosting, the provider patched the operating system, watched the disks, and ran backups. On a VPS or cloud server, that's now your job. At a minimum you need:
- Automated off-server backups — files and databases, stored somewhere other than the server itself, and tested by actually restoring them. See our backup and disaster recovery service.
- Monitoring for uptime, disk space, CPU, and memory, so you hear about problems before your customers do — our server monitoring covers this.
- Regular security updates and a periodic review of the firewall and SSH configuration — part of our Linux server administration plans.
Quick Checklist
- Inventory every domain, database, cron job, email account, and DNS record before you start
- Lower the DNS TTL to about 300 seconds 24–48 hours ahead
- Build and harden the new server before copying anything to it
- Copy files with rsync and databases with
mysqldump --single-transaction - Convert
.htaccessrules if you're moving to Nginx - Plan email separately — and fix SMTP, SPF, DKIM, and DMARC for website mail
- Test through your hosts file before touching DNS
- Do a final sync, switch DNS, and keep the old server for a week as a rollback
- Set up backups, monitoring, and updates on day one
A cPanel to VPS or cloud migration is one of the best upgrades a growing website can make — faster pages, more control, and room to grow. It just needs to be done in the right order. If you'd rather not spend a weekend on it, our Linux server migration team handles the whole move — inventory, build, sync, testing, and cutover — with the old server kept as a safety net throughout. For multi-server or VM workloads, see our server migration services. And if you run a busy online store, our WooCommerce VPS migration guide covers the extra care that ecommerce needs.