Migration playbook · Websites and ecommerce

How to move from shared hosting to a VPS

If the VPS runs cPanel and WHM, restore a full cPanel backup and most of the work is done. On a plain Linux VPS you rebuild the web server, copy files and databases yourself, add TLS with Certbot and decide where email will live. Test with a hosts file, then switch DNS.

Updated 4 phases7 detailed steps5 official sources
Start here

Which route should you take for moving from shared hosting to a VPS?

Short answer

This moves your websites from a shared hosting plan to a virtual private server (VPS) that is yours alone. You set up the new server, copy each site's files and database across, and check everything works using a test address on your own computer.

  • Recommended route: VPS with cPanel and WHM: restore full backups. Plain VPS: rebuild and copy
  • Order: Decide where email goes first, build and secure the server, copy sites, test, then switch DNS.
  • 4 phases: Inventory and decide, Build the server, Copy and test and Switch.
  • You're done when: Every site loads from the VPS over HTTPS.

Then you point your domain at the new server. Because the VPS is yours to look after, you also set up security updates, certificates, backups and decide what happens to email.

Recommended routeVPS with cPanel and WHM: restore full backups. Plain VPS: rebuild and copy

A cPanel restore brings files, databases, email accounts and settings in one archive; a plain VPS gives full control at the cost of setup.

Other options and when to use them
  • Managed VPS where the provider migrates for you: You want the server looked after and do not have Linux skills in-house.
  • Managed WordPress or cloud hosting instead of a VPS: You only run WordPress and do not need root access.
Order to migrate in, and why

Decide where email goes first, build and secure the server, copy sites, test, then switch DNS.

  1. Inventory: sites, databases, email, cron jobs and DNSShared hosts bundle services that a VPS does not provide by default.
  2. Email decisionRunning mail on a VPS takes ongoing work; moving it to a hosted service changes MX records.
  3. Server build and hardeningUpdates, firewall and SSH keys before anything goes live.
  4. Copy sites and databasesRestore a cPanel backup, or copy files and import databases.
  5. Test with a hosts fileSee the site on the new server before DNS changes.
  6. Lower TTL, switch DNS, issue certificatesShort TTL makes the switch quick to apply and to undo.
Settings checklist: decide these before you copy

Built-in and third-party tools treat these differently. Tick each one off once you have decided.

Download this checklist (Excel)
  • How each tool handles it
    Built-in methodcPanel and WHM: Transfer or Restore a cPanel Account accepts cpmove archives from /home and other listed folders, or a direct transfer from a remote cPanel account. It needs free disk space of at least double the archive size, and does not transfer two-factor settings.

    Tip: If you have root on both servers, cPanel recommends the Transfer Tool instead.

    cPanel Docs: Transfer or Restore a cPanel Account
  • How each tool handles it
    Built-in methodWordPress: copy files and database; if the database name or user changes, edit wp-config.php. To test before switching, change siteurl and home in wp_options temporarily.

    Tip: Testing with a hosts file avoids editing siteurl at all.

    WordPress Developer Resources: Migrating WordPress
  • How each tool handles it
    Built-in methodCertbot: the snap package is recommended and has automated renewal preconfigured. It needs port 80 open and root access.

    Tip: Issue certificates after DNS points at the VPS, or use a DNS challenge to issue them first.

    Certbot documentation: Get Certbot
  • How each tool handles it
    Built-in methodUbuntu Server: unattended-upgrades is installed by default and applies security updates; automatic reboot is off by default.

    Tip: Schedule a monthly reboot window for kernel updates.

    Ubuntu Server docs: Automatic updates
The plan, phase by phase
  1. 1

    Inventory and decide

    Week 1

    Watch out: Shared hosts often bundle email.

    Ways around it

    • Move email to a hosted email service, or set up mail on the VPS.

    Check your DNS records before and after the change

    Show the detailed steps (2) →
  2. 2

    Build the server

    Week 1

    Watch out: Ubuntu does not reboot automatically after updates.

    Ways around it

    • Plan regular reboots.
    Show the detailed steps (2) →
  3. 3

    Copy and test

    Week 2

    Watch out: cPanel restores need double the archive size free.

    Ways around it

    • Size the disk before restoring.
    Show the detailed steps (3) →
  4. 4

    Switch

    Cutover day

    Watch out: Certbot HTTP validation needs DNS pointing at the VPS.

    Ways around it

    • Issue right after the DNS switch, or use a DNS challenge.

    Turn this phase into dated tasks with the cutover planner

    Show the detailed steps (2) →
You are finished when
  • Every site loads from the VPS over HTTPS.
  • Email works where you decided it would live.
  • Updates, backups and certificate renewal are running.
  • The shared hosting plan is cancelled after a fallback period.
SiteGround web hosting
Click by click

What does each step of moving from shared hosting to a VPS involve?

Open a part when you reach it in the plan. Each step says where to go, what to do and what you should see.

About this migrationWhat it covers, limits at a glance

A VPS gives you your own server resources and root access, but it also hands you jobs the shared host did for you: patching, TLS renewal, backups, firewalls and often email. The migration itself depends on whether the VPS has a control panel. With cPanel and WHM you restore an account backup. Without one, you rebuild the stack and copy each site across.

This playbook covers both paths. Moving between two cPanel hosts? See cPanel hosting migration. Just moving WordPress? See WordPress migration.

VPS with cPanel and WHMRestore the cpmove full backup, or use the Transfer Tool
Plain Linux VPSCopy files and databases, set up web server, PHP and TLS yourself
TLS certificatesCertbot, with automatic renewal in the snap package
EmailDecide: run it on the VPS or move it to a hosted email service
Security updatesUbuntu installs security updates automatically by default
CutoverLower DNS TTL, test with a hosts file, then switch
1What do you need before you move from shared hosting to a VPS?
NeedDetailsWhere to get it
Full backup from the shared hostcPanel full backup, or files and database exports.Shared host control panel
VPS with root accessEnough disk for sites, databases and backups.Your VPS provider
DNS accessTo lower TTL and change records.Your DNS host
InventorySites, databases, email, cron jobs and DNS records.The DNS change worksheet
2Build and secure the VPS2 steps
  1. 1

    Check automatic security updates

    Where: VPS shell (Ubuntu)

    Confirm unattended-upgrades is installed and running, then set up SSH keys and a firewall.

    systemctl status unattended-upgrades
    You should see: The service shows active.
  2. 2

    Install Certbot

    Where: VPS shell

    Install Certbot with snap, as recommended.

    sudo snap install --classic certbot
    You should see: certbot --version prints a version.
3Copy sites and databases3 steps
  1. 1

    With cPanel and WHM

    Where: WHM > Transfers > Transfer or Restore a cPanel Account

    Upload the cpmove file, or put it in /home and restore it, or use Transfer from Remote cPanel Account.

    You should see: The account, its sites and databases appear in WHM.
  2. 2

    On a plain VPS

    Where: VPS shell

    Copy site files, import each database, and update wp-config.php or the app's config with the new database details. See export and import a MySQL database.

    You should see: Sites load from the VPS when tested with a hosts file.
  3. 3

    Test before DNS

    Where: Your computer

    Point the domain at the VPS in your hosts file and test every site. See test a site with a hosts file.

    You should see: Pages, logins and forms work.
4Switch DNS and issue certificates2 steps
  1. 1

    Switch DNS

    Where: Your DNS host

    After lowering TTL, copy the latest database changes and change the A records to the VPS.

    You should see: The domain resolves to the VPS.
  2. 2

    Issue certificates

    Where: VPS shell

    Run Certbot for your web server, then test renewal.

    sudo certbot renew --dry-run
    You should see: The dry run succeeds.
Worth knowing

What can go wrong when moving from shared hosting to a VPS, and how do you avoid it?

The detail behind the plan: options compared, and what experienced engineers check first. Tap any item.

Compare all the ways to do this3 options

VPS with cPanel and WHM

Low effort

Best for: Many sites and email accounts from a cPanel host

  • Restore whole accounts
  • Familiar panel
  • Panel licence
  • Still your server to maintain

Plain Linux VPS

High effort

Best for: A few sites and Linux skills in-house

  • Full control
  • Lean
  • Manual setup
  • Email is extra work

Managed VPS

Low effort

Best for: No in-house Linux skills

  • Provider patches and often migrates
  • Less control
Our advice

Choose cPanel and WHM on the VPS if you are moving many accounts from a cPanel host. Choose a plain VPS only if someone can look after it every month.

You now patch the serverReduces risk

Ubuntu applies security updates automatically by default but does not reboot automatically.

What to do

Plan reboots and check updates monthly.

Ubuntu Server docs: Automatic updates
Restores skip two-factor settingsUser impact

Transfer or Restore a cPanel Account does not transfer two-factor authentication settings.

What to do

Ask users to set up two-factor again after the move.

cPanel Docs: Transfer or Restore a cPanel Account
Disk space for restoresCost lever

The server needs at least double the archive size free.

What to do

Size the disk for the largest account plus growth.

cPanel Docs: Transfer or Restore a cPanel Account
Certificates need port 80Reduces risk

Certbot requires port 80 open for HTTP validation.

What to do

Allow port 80 in the firewall, even if you redirect to HTTPS.

Certbot documentation: Get Certbot
Use the Transfer Tool where you canSaves time

cPanel calls account restore a last resort when you have root on both servers.

What to do

Use WHM Transfer Tool for server-to-server moves.

cPanel Docs: Transfer Tool
Finish safely

How do you check it worked after moving from shared hosting to a VPS, or roll back?

Full validation checklist4 checks

Run these before you declare the migration complete. Record the results in the data validation report.

CheckHow to checkWhat good looks like
Sites

Test each site over HTTPS after DNS switch.

All load.
Forms and email sending

Submit contact forms.

Messages arrive.
Cron jobs

Check logs after the first scheduled run.

Jobs ran.
Renewal

Run certbot renew --dry-run.

Succeeds.
Rollback planIf it goes wrong

Roll back if

  • Sites fail on the VPS after DNS switch
  • Performance is worse than shared hosting

Point of no return

Keep the shared plan active until stable. Until it is cancelled, rollback is pointing DNS back.

  1. 1

    Point DNS back

    Where: DNS host

    Restore the old A records.

    You should see: Sites load from shared hosting.
  2. 2

    Copy back new data

    Where: Both servers

    Copy database changes made on the VPS back to the shared host.

    You should see: No orders or posts lost.

Agree the triggers and who decides before the go / no-go meeting. Use the rollback plan template.

Common problems and fixes4 errors
Restore fails with not enough space

Cause: Less than double the archive size free.

Fix: Free space or grow the disk.

Certbot challenge failed

Cause: Port 80 blocked or DNS not yet pointing at the VPS.

Fix: Open port 80 and wait for DNS.

Error establishing a database connection

Cause: Wrong details in wp-config.php.

Fix: Update database name, user and password.

Scheduled tasks stopped

Cause: Cron jobs not recreated.

Fix: Recreate them on the VPS.

Search the full error library →

FAQ

Questions about moving from shared hosting to a VPS

Do I need cPanel on the VPS?

No, but restoring cPanel backups is simplest if you have it.

What happens to email?

Decide before the move: run it on the VPS or move it to a hosted email service.

Will there be downtime?

Little, if you test with a hosts file and lower DNS TTL first.

How do certificates renew?

The Certbot snap package has automatic renewal preconfigured.

Sources

Official sources for moving from shared hosting to a VPS

5 official pages this guide is based on

Get one practical migration tip a day

Follow Cloud-Migrations.au on LinkedIn or X for deadlines, error fixes, free templates and outage briefs as they happen.