How to Migrate a Full VPS to a New Provider

Moving your entire VPS to a new hosting provider — whether for cost, performance, or feature reasons — requires careful planning to minimize downtime and avoid data loss. This guide covers the complete migration process.

Before You Start: Create a Migration Checklist

Document everything running on the current server:

  • All installed software and versions
  • Databases and their sizes
  • Cron jobs
  • SSL certificates and domains
  • Firewall rules
  • Any custom configuration

Step 1 — Provision the New VPS

Match or exceed the current server's specifications, and install the same OS version for maximum compatibility.

Step 2 — Harden the New Server

Follow How to Harden a Fresh Linux VPS in 15 Minutes before migrating anything of value onto it.

Step 3 — Install Required Software

Install the same web server, database engine, runtime versions, and any other software the old server had — use your infrastructure documentation from How to Back Up Configuration Files and Server State if you maintained one.

Step 4 — Transfer Databases

mysqldump -u root -p --all-databases | gzip > full-db-backup.sql.gz
scp full-db-backup.sql.gz user@NEW_SERVER_IP:/tmp/
gunzip -c /tmp/full-db-backup.sql.gz | mysql -u root -p

See How to Migrate a Database to a New VPS for engine-specific detail.

Step 5 — Transfer Application Files

rsync -avz --progress /var/www/ user@NEW_SERVER_IP:/var/www/

Step 6 — Transfer Configuration

Copy over web server virtual host configs, cron jobs, and any custom scripts — adjusting paths/usernames as needed if they differ from the old server.

Step 7 — Test on the New Server BEFORE Switching DNS

Access the new server directly by IP, or temporarily edit your local machine's /etc/hosts file to point the domain at the new IP for testing purposes without affecting other visitors:

NEW_SERVER_IP  yourdomain.com

Thoroughly test the application on the new server this way before any public DNS change.

Step 8 — Set Up SSL on the New Server

sudo certbot --nginx -d yourdomain.com

This won't succeed until DNS actually points to the new server, so this step typically happens right after cutover, or via DNS challenge beforehand for zero-downtime SSL readiness — see How to Install a Wildcard SSL Certificate with Certbot DNS Challenge for the DNS challenge approach.

Step 9 — Lower DNS TTL in Advance

At least 24 hours before cutover, lower your DNS TTL to speed up propagation once you do switch — see How to Migrate DNS to a New Provider Without Downtime for the full technique (the same TTL principle applies to any DNS record change, not just provider migrations).

Step 10 — Cut Over DNS

Update your A record to point to the new server's IP.

Step 11 — Monitor Closely During Propagation

Watch both old and new servers' logs during the transition window, since some traffic will still reach the old server until propagation fully completes.

Step 12 — Keep the Old Server Running as a Fallback

Don't decommission the old VPS immediately — keep it running (but not actively serving traffic) for at least a week in case you need to quickly revert.

Step 13 — Final Verification and Decommission

Once confident the new server is stable, cancel the old VPS — see How to Cancel or Request a Refund for Your VPS Hosting.

Common Errors

Application works differently on the new server — check for software version mismatches (PHP, database engine) between old and new.

Some visitors briefly see the old site after cutover — expected during DNS propagation if TTL wasn't lowered sufficiently in advance.

Related Articles

  • How to Migrate a Database to a New VPS
  • How to Migrate DNS to a New Provider Without Downtime
  • How to Harden a Fresh Linux VPS in 15 Minutes
  • vps migration, server migration, provider migration, zero downtime migration
  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

Backup Strategy 101: The 3-2-1 Rule Explained

Before diving into specific backup tools, it's worth understanding the industry-standard...

How to Back Up to Object Storage (S3-Compatible)

S3-compatible object storage provides durable, cost-effective off-site backup storage —...

How to Test and Verify Your Backups Actually Work

A backup that has never been restored is not a verified backup — it's an assumption. This...

How to Create a Disaster Recovery Plan for Your VPS

A disaster recovery (DR) plan is a documented, tested procedure for restoring service after a...

How to Use VPS Provider Snapshots Effectively

Most VPS providers offer a snapshot feature — a point-in-time image of your entire server....