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.
Which route should you take for moving from shared hosting to a VPS?
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.
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.
Decide where email goes first, build and secure the server, copy sites, test, then switch DNS.
- Inventory: sites, databases, email, cron jobs and DNSShared hosts bundle services that a VPS does not provide by default.
- Email decisionRunning mail on a VPS takes ongoing work; moving it to a hosted service changes MX records.
- Server build and hardeningUpdates, firewall and SSH keys before anything goes live.
- Copy sites and databasesRestore a cPanel backup, or copy files and import databases.
- Test with a hosts fileSee the site on the new server before DNS changes.
- Lower TTL, switch DNS, issue certificatesShort TTL makes the switch quick to apply and to undo.
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 AccountHow 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 WordPressHow 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 CertbotHow 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
- 1
Inventory and decide
Week 1Watch 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
Build the server
Week 1Show the detailed steps (2) →Watch out: Ubuntu does not reboot automatically after updates.
Ways around it
- Plan regular reboots.
- 3
Copy and test
Week 2Show the detailed steps (3) →Watch out: cPanel restores need double the archive size free.
Ways around it
- Size the disk before restoring.
- 4
Switch
Cutover dayWatch 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) →
- 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.
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.
1What do you need before you move from shared hosting to a VPS?
| Need | Details | Where to get it |
|---|---|---|
| Full backup from the shared host | cPanel full backup, or files and database exports. | Shared host control panel |
| VPS with root access | Enough disk for sites, databases and backups. | Your VPS provider |
| DNS access | To lower TTL and change records. | Your DNS host |
| Inventory | Sites, databases, email, cron jobs and DNS records. | The DNS change worksheet |
2Build and secure the VPS2 steps
- 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-upgradesYou should see: The service shows active. - 2
Install Certbot
Where: VPS shellInstall Certbot with snap, as recommended.
sudo snap install --classic certbotYou should see: certbot --version prints a version.
3Copy sites and databases3 steps
- 1
With cPanel and WHM
Where: WHM > Transfers > Transfer or Restore a cPanel AccountUpload 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
On a plain VPS
Where: VPS shellCopy 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
Test before DNS
Where: Your computerPoint 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
Switch DNS
Where: Your DNS hostAfter 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
Issue certificates
Where: VPS shellRun Certbot for your web server, then test renewal.
sudo certbot renew --dry-runYou should see: The dry run succeeds.
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 effortBest 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 effortBest for: A few sites and Linux skills in-house
- Full control
- Lean
- Manual setup
- Email is extra work
Managed VPS
Low effortBest for: No in-house Linux skills
- Provider patches and often migrates
- Less control
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.
Plan reboots and check updates monthly.
Restores skip two-factor settingsUser impact
Transfer or Restore a cPanel Account does not transfer two-factor authentication settings.
Ask users to set up two-factor again after the move.
Disk space for restoresCost lever
The server needs at least double the archive size free.
Size the disk for the largest account plus growth.
Certificates need port 80Reduces risk
Certbot requires port 80 open for HTTP validation.
Allow port 80 in the firewall, even if you redirect to HTTPS.
Use the Transfer Tool where you canSaves time
cPanel calls account restore a last resort when you have root on both servers.
Use WHM Transfer Tool for server-to-server moves.
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.
| Check | How to check | What 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
Point DNS back
Where: DNS hostRestore the old A records.
You should see: Sites load from shared hosting. - 2
Copy back new data
Where: Both serversCopy 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 spaceCause: Less than double the archive size free.
Fix: Free space or grow the disk.
Certbot challenge failedCause: Port 80 blocked or DNS not yet pointing at the VPS.
Fix: Open port 80 and wait for DNS.
Error establishing a database connectionCause: Wrong details in wp-config.php.
Fix: Update database name, user and password.
Scheduled tasks stoppedCause: Cron jobs not recreated.
Fix: Recreate them on the VPS.
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.
Official sources for moving from shared hosting to a VPS
5 official pages this guide is based on
Vendors change limits and features, so confirm details on the source before you rely on them. Last checked .

