VPS Hosting

Your Complete VPS Migration Checklist: Step‑by‑Step Guide for Small Businesses

Moving a website to a new VPS doesn’t have to be stressful. Follow this practical VPS migration checklist to prepare, back up, transfer, test, and switch DNS with confidence.

Direct answer: Before you switch your site to a new VPS, follow this VPS migration checklist – a clear, ordered list of what to prepare, back up, move, test, and switch. Completing each step reduces downtime, protects data, and lets you roll back safely if something goes wrong.

1. Prepare Your New VPS Environment

Getting the destination server ready is the first critical step. Even if you have a managed VPS, you still need to verify a few basics.

  • Choose the right plan. Match CPU, RAM, and storage to your current traffic and future growth. For a small e‑commerce site in Pakistan, a 2 vCPU/4 GB RAM plan is often sufficient.
  • Select the operating system. Ubuntu LTS or Debian are popular for their stability and large community support. Record the OS version – you’ll need it when you reinstall software.
  • Confirm root or sudo access. You must be able to install packages, edit configuration files, and restart services.
  • Set up basic security. Enable the firewall (ufw or firewalld), create a non‑root admin user, and generate SSH keys for password‑less login.
  • Install required software. Web server (nginx or Apache), database (MySQL/MariaDB or PostgreSQL), PHP (if needed), and any language runtimes (Node.js, Python, etc.). Do not import data yet – just verify that each component starts without error.
  • Test the fresh server. Create a simple index.html page and access it via the temporary IP address. If you can see the page, the server is reachable.

These preparations give you a clean sandbox where you can safely copy data before the live switch.

2. Back Up Existing Data and Configurations

Even the most careful migration can hit an unexpected snag. A reliable backup is your safety net.

What to back up

  1. Website files. Use tar -czf to archive the public folder (e.g., /var/www/html).
  2. Databases. Export each database with mysqldump (or pg_dump for PostgreSQL). Include the --single-transaction flag for consistency.
  3. Configuration files. Copy nginx/apache virtual‑host files, .env files, and any custom scripts.
  4. SSL certificates. If you manage them yourself, download the .crt and .key files. If you use Let’s Encrypt, note the renewal command.
  5. Email data. For POP/IMAP accounts, back up /var/mail or the mailbox directory used by your provider.

Where to store backups

  • Local computer or external hard drive – good for quick restores.
  • Cloud storage (Google Drive, Dropbox, or an S3 bucket) – provides off‑site redundancy.
  • Remote server with SSH access – you can pull the backup directly to the new VPS.

Verify the integrity of each archive (e.g., tar -tzf backup.tar.gz) before proceeding.

3. Transfer Data and Verify on the New VPS

With the new server ready and a solid backup in hand, you can start moving the data.

Preferred transfer tools

  • rsync over SSH. Preserves permissions and can resume interrupted transfers.
  • SCP. Simple for one‑off file copies.
  • SFTP client. Useful if you prefer a graphical interface (FileZilla, WinSCP).

Example rsync command for website files:

rsync -avz -e "ssh -i ~/.ssh/id_rsa" /var/www/html/ user@new-vps-ip:/var/www/html/

After copying, import the database:

mysql -u dbuser -p newdb < /path/to/backup.sql

Then adjust configuration files to reflect the new server’s paths, database credentials, and any IP‑specific settings.

Testing before the DNS switch

  • Update your local /etc/hosts file (or use a DNS resolver tool) to point the domain name to the new VPS IP. This lets you browse the site as if it were live, without affecting real visitors.
  • Check all core functions: product pages, checkout flow, admin login, email sending, and any third‑party API calls.
  • Run performance checks (e.g., ab or curl -w "%{time_total}") to ensure response times are acceptable.

If any issue appears, fix it on the new VPS and retest. Do not proceed to the DNS change until the site works perfectly in the host‑file test.

4. Update DNS, Monitor, and Plan a Rollback

When you’re confident the new server is ready, the final step is to point the domain to the new IP address.

Reduce DNS propagation risk

  • Lower the TTL (Time‑to‑Live). A day before the migration, set the A record TTL to 300 seconds (5 minutes). This ensures most resolvers refresh quickly.
  • Change the A record. In your registrar’s DNS panel, replace the old IP with the new VPS IP.
  • Monitor traffic. Use server logs, Google Analytics real‑time view, or a monitoring service (UptimeRobot, Pingdom) to confirm visitors are reaching the new server.

Rollback plan

If something goes wrong after the DNS change, you need a quick way to revert:

  1. Keep the old VPS running for at least 24 hours after the switch. Do not shut it down immediately.
  2. If critical errors appear, change the A record back to the old IP.
  3. Because the TTL is low, most users will see the revert within minutes.

After a stable period (usually 48 hours), you can safely decommission the old server.

Common Mistakes and How to Fix Them

  • Skipping a full backup. Fix: Always create a dated archive before any file transfer. Store it off‑site.
  • Changing DNS before testing. Fix: Use the /etc/hosts method to test the new server with the real domain name first.
  • Forgetting to copy SSL certificates. Fix: Export the full certificate chain and private key, then reinstall on the new VPS. Verify with openssl s_client -connect domain:443.
  • Leaving default firewall rules. Fix: Open only required ports (80, 443, SSH) and block everything else.
  • Overlooking cron jobs. Fix: List all crontab entries (crontab -l) and recreate them on the new server.

Realistic Example: Migrating a Small Online Store from Shared Hosting to VPS

Ahmed runs a boutique clothing store in Karachi. His site currently lives on a shared hosting plan that limits CPU and cannot install a custom caching layer. He decides to move to a managed VPS.

  1. Preparation. Ahmed selects a 2 vCPU/4 GB RAM VPS with Ubuntu 22.04, creates an SSH key pair, and enables the provider’s firewall.
  2. Backup. He archives /home/ahmed/public_html, runs mysqldump -u shopuser -p shopdb > shopdb.sql, and downloads the Let’s Encrypt certificate files.
  3. Transfer. Using rsync, Ahmed copies the files to /var/www/html on the new VPS, imports the database, and updates wp-config.php with the new DB host and credentials.
  4. Testing. He edits his laptop’s /etc/hosts to map www.ahmedstore.com to the new IP, then checks product pages, checkout, and email notifications. All work; page load drops from 3.2 s to 1.8 s.
  5. DNS switch. He lowers the TTL to 300 s a day earlier, then updates the A record. Monitoring shows 99.9 % of visitors reaching the new VPS within an hour.
  6. Rollback. Ahmed keeps the old shared account active for 48 hours. No issues arise, so he cancels the old plan.

Following the checklist saved Ahmed from unexpected downtime and gave him a clear path to scale later.

Quick VPS Migration Checklist

  1. Choose VPS plan that matches current and future needs.
  2. Set up OS, firewall, admin user, and SSH keys.
  3. Install required web, database, and language packages.
  4. Create a full backup of files, databases, configs, SSL certs, and email data.
  5. Store backups in at least two locations (local + cloud).
  6. Transfer data with rsync, SCP, or SFTP.
  7. Import databases and adjust configuration files.
  8. Test the site using a local hosts file override.
  9. Lower DNS TTL to 300 seconds at least 24 hours before switch.
  10. Update DNS A record to new VPS IP.
  11. Monitor traffic and error logs for 48 hours.
  12. Keep old server running for rollback; decommission after stable period.

Conclusion

Moving to a VPS gives you more control, better performance, and room to grow, but the migration itself must be planned. By following this VPS migration checklist—preparing the new server, backing up everything, transferring and testing, then changing DNS with a rollback plan—you can minimize downtime and avoid data loss. If any step feels beyond your comfort zone, especially server security or database migration, consider hiring a managed‑VPS specialist.

FAQs

Do I need a managed VPS for migration?

Managed plans include support for OS updates, security patches, and sometimes migration assistance. If you lack Linux experience, a managed VPS can reduce risk, but the checklist still applies.

How long does a typical migration take?

For a small site (under 5 GB of data), the actual transfer may finish in under an hour. Planning, testing, and DNS propagation can add 1‑2 days, especially if you lower TTL ahead of time.

What if my DNS provider doesn’t allow low TTL?

Set the lowest possible value and be prepared for a longer propagation window (up to 24 hours). Keep the old server online for the full period to catch any visitors still routed to the old IP.

Ready to discuss your workload? Review our VPS plans and tell us about your current hosting, management needs, and any bottlenecks you’ve observed: /vps-hosting.