Skip to content
Products
AI Website Builder New VPS Hosting Cloud Servers Web Hosting Dedicated Servers Domains
Company
About Documentation Support Center Contact Get Started Login Client Area
ALL SYSTEMS OPERATIONAL
VPS

Moving From Shared cPanel Hosting to a VPS: A Practical Guide

Getwebup 7 min read

Your shared hosting account keeps throttling you at peak traffic, or WHM support keeps mentioning "resource limits" whenever the site slows down. The usual next step is a VPS — but a VPS isn't just a bigger shared account. There's no cPanel automation waiting for you on the other side unless you set it up yourself, and that trips up a lot of people mid-move. Here's how to do it without losing mail or taking the site down.

Why This Move Is Different From a Normal Migration

If you've ever moved a WordPress site between two shared hosting accounts, you know the drill: zip the files, export the database, import both, update the domain, done. Moving off shared cPanel hosting onto a VPS breaks that pattern in three ways:

  • No source-side root access. You can't SSH into your old shared account and run a clean pkgacct export the way WHM's Transfer Tool would between two cPanel servers — you're stuck with cPanel's own backup and File Manager tools.
  • No destination-side automation. A bare VPS has no web server, no PHP, no mail server, and no control panel installed unless you put one there. You're either installing a panel (like our managed cPanel VPS images) or hand-rolling a LEMP/LAMP stack.
  • Email doesn't come along for free. On shared hosting, cPanel quietly runs Exim and Dovecot for you. On a fresh VPS, there's nothing listening on port 25 until you build it — or decide not to and route mail elsewhere.

Step 1: Get a Clean Export From cPanel

In your current cPanel account, go to Files > Backup (or Backup Wizard) and generate a full account backup. If cPanel lets you, download it in pieces — homedir.tar.gz, the MySQL dumps, and the email accounts separately — rather than one giant archive. It's easier to work with on the other end and easier to retry if one piece fails partway through a slow download.

If your host caps backup size or disables full backups on shared plans, fall back to:

  • File Manager → select public_html → Compress → download the zip.
  • phpMyAdmin → Export → SQL format, one file per database.
  • Email Accounts → note down every mailbox and its size; large mailboxes need a proper IMAP-to-IMAP sync later, not a file copy.

Step 2: Build the VPS Environment First

Don't restore anything until the server can actually run your site. At minimum you need a web server, PHP with the right extensions, and a database engine matching the version your site was built against — an old WordPress install exported from PHP 7.4 will throw fatal errors on a VPS running PHP 8.3 with strict defaults.

PieceShared cPanel had itYou now need to provision
Web serverApache (managed)Apache/Nginx, vhost per domain
PHP + extensionsMultiPHP ManagerMatch version, install mysqli, gd, curl, zip, imagick as needed
MySQL/MariaDBPre-installedInstall, create matching DB + user, set sql_mode compatibility
SSLAutoSSLCertbot + Let's Encrypt, or your panel's own AutoSSL equivalent
Cron jobscPanel Cron UIRecreate manually in crontab -e

If you'd rather not manage any of that by hand, a cPanel-licensed VPS gets you the same interface you're used to, just with dedicated resources behind it — the migration steps below are the same either way.

Step 3: Move the Database and Files

Upload the archive to the VPS with scp or rsync, then extract:

scp public_html.tar.gz user@your-vps-ip:/home/user/
ssh user@your-vps-ip
tar -xzf public_html.tar.gz -C /var/www/yoursite/

Create the database and import the dump:

mysql -u root -p -e "CREATE DATABASE sitedb; CREATE USER 'siteuser'@'localhost' IDENTIFIED BY 'strong-password'; GRANT ALL ON sitedb.* TO 'siteuser'@'localhost';"
mysql -u root -p sitedb < sitedb.sql

Update wp-config.php (or your app's config file) with the new database name, user, and password. If the old host used a table prefix other than wp_, double-check it matches — a mismatched prefix is the single most common cause of a blank homepage after this kind of move.

Fix file ownership before testing anything, or PHP will throw permission errors on uploads and cache writes:

chown -R www-data:www-data /var/www/yoursite/
find /var/www/yoursite/ -type d -exec chmod 755 {} \;
find /var/www/yoursite/ -type f -exec chmod 644 {} \;

Step 4: Decide Where Email Lives Now

This is the step people skip and regret. On shared cPanel hosting, mailboxes and the website share one server. On a VPS you have three real options:

  1. Self-host mail on the VPS (Postfix + Dovecot) — full control, but you own spam filtering, blacklist monitoring, and PTR records. Only worth it if you already run other mail infrastructure.
  2. Move mail to Google Workspace or Zoho Mail — the most common choice. Decouples mail from your web server entirely, so a future server migration never touches email again.
  3. Keep mail on the old shared account temporarily by pointing only the A record to the VPS and leaving MX records untouched — buys you time to migrate mailboxes properly later.

Whichever you pick, do it before the DNS cutover in Step 5, not after — changing MX records is what actually controls where new mail lands, and doing it in a rush after the website is already live is how messages get lost mid-transition.

Step 5: Cut Over DNS Without Downtime

A few days before the move, lower the TTL on your A record (and MX, if it's changing) to 300 seconds so the eventual switch propagates fast instead of sitting cached for 24+ hours.

Test the site on the new VPS before touching DNS at all, by editing your local hosts file:

# /etc/hosts (Mac/Linux) or C:\Windows\System32\drivers\etc\hosts (Windows)
203.0.113.10   yourdomain.com www.yourdomain.com

Browse the site with that override in place — check forms, logins, and the checkout flow if it's a store. Once it's clean, update the A record at your DNS provider (or in Getwebup's DNS Zone Editor) and remove the hosts file entry. Keep the old shared hosting account active for 24-48 hours after the switch as a safety net; don't cancel it the same day.

Common Pitfalls That Break Sites Mid-Move

  • Hardcoded URLs in the database. If the old site used http:// or a subdomain path, run a search-replace on the database before going live: wp search-replace 'http://olddomain.com' 'https://yourdomain.com' --all-tables for WordPress, or the equivalent for your CMS.
  • .htaccess rules that don't translate. If you're moving to Nginx, Apache's .htaccess rewrite rules do nothing — they need to be rewritten as Nginx location blocks, or you keep Apache on the VPS to avoid the conversion entirely.
  • Missing PHP extensions. A blank white screen after import is almost always a missing extension, not a code bug. Check php -m against what the plugin/theme docs require.
  • Forgotten cron jobs. WP-Cron workarounds, report generators, and backup scripts that ran quietly under cPanel's Cron UI need to be re-added by hand — they don't come across in a files-and-database backup.

Prevention: Make the Next Move Easier

Once you're settled on the VPS, a few habits pay off the next time you need to move (new server, disaster recovery, or scaling to a second box):

  • Keep infrastructure-as-code notes — even a plain text file listing installed PHP extensions, cron entries, and vhost configs saves hours later.
  • Automate off-site backups with mysqldump and rclone on a schedule, rather than relying on manual exports.
  • If you self-host mail, monitor your IP's blacklist status regularly — a fresh VPS IP can occasionally start out flagged.
  • Document your DNS records somewhere outside the DNS provider itself, so a future migration doesn't start with "what MX records did we have again?"

Frequently asked questions

Can I keep using cPanel after moving to a VPS?

Yes, if you choose a VPS plan with cPanel/WHM licensed on it. You'll still manage the box like shared hosting, just with dedicated CPU, RAM, and root access underneath. If you go with a bare, unmanaged VPS instead, you lose the cPanel interface and manage everything through the command line.

Will my site go down during the migration?

Not if you test on the new VPS via a hosts file override before touching DNS, and lower your DNS TTL a few days in advance. The old site keeps serving visitors right up until the A record change propagates, and a short TTL means that happens in minutes rather than a day.

What happens to my email during the move?

Nothing changes until you update the MX records. Decide where mail will live going forward — self-hosted on the VPS, moved to Google Workspace/Zoho, or left on the old account temporarily — and set that up before you touch MX, not after.

Why does my site show a blank white screen after restoring it on the VPS?

This is almost always a missing PHP extension or a PHP version mismatch, not corrupted files. Compare the PHP version and loaded modules (php -m) on the VPS against what your CMS or plugins require, and check the PHP error log for the specific fatal error.

Do I need to redo my SSL certificate after migrating?

Yes. AutoSSL or Let's Encrypt certificates are issued per server and don't transfer with a files-and-database backup. Reissue the certificate on the VPS as soon as DNS is pointing there — most panels and Certbot handle this automatically once the domain resolves correctly.

#vps migration #shared hosting #cpanel #dns cutover #email migration

Keep reading

Chat with Support