No KYC · seven Linux VPS plans, one price in six cities · Pay in BTC, USDT, USDC, ETH, SOL, LTC, XMR
Language: English
Configure a VPS

Guide · migration · checked 16 November 2026

How do I migrate a website to a new VPS?

Last updated: · 5 min read

Quick answer

How do I migrate a website to a new VPS?

To migrate a website to a new VPS, lower the DNS TTL a day ahead, set up the same stack on the new server, copy files with rsync, export and import the database, test through your hosts file, then switch DNS and run a final sync. A SaltVPS server is usually ready within minutes, 1 hour at most.

In brief
  • Plan ahead: a short TTL, set 24 hours before, makes the DNS switch quick.
  • Copy twice: a first full rsync, then a short final one at switch time.
  • Database: dump on the old server, import on the new one, with the same user and password.
  • Test before DNS: point your own computer at the new IP with the hosts file.
  • Keep the old server running until traffic has fully moved.

How do you migrate a website to a new VPS step by step?

Example: an nginx site with a MySQL or MariaDB database. OLD and NEW stand for the two servers' addresses.

  1. Lower the DNS TTL

    At your DNS provider, set the TTL of the A and AAAA records to 300 seconds, at least a day before the move.

  2. Prepare the new server

    Install the same web server, PHP or runtime and database versions. Recreate the database and its user.

  3. Copy the files

    From the new server, run rsync -aAX --info=progress2 root@OLD:/var/www/ /var/www/. Copy the nginx site files from /etc/nginx too.

  4. Export the database

    On the old server, run mysqldump --single-transaction --routines dbname > /root/dbname.sql, then copy it over with scp or rsync.

  5. Import the database

    On the new server, run mysql dbname < /root/dbname.sql. Check that the app's config file still points at the right database user.

  6. Test with the hosts file

    On your computer, add a line with the NEW IPv4 and your domain to the hosts file. Browse the site and check forms, logins and uploads.

  7. Switch DNS

    Change the A and AAAA records to the new server's addresses. Put the site in maintenance mode on the old server, or stop writes.

  8. Final sync and certificate

    Rerun the rsync with --delete and a fresh database dump, then request a certificate with certbot on the new server.

What needs to move, and how?

Most sites have four parts; each moves with a different tool.

Parts of a website to migrate to a new VPS, with the tool used for each
PartWhere it usually livesHow to move it
Site files and uploads/var/www/rsync over SSH
DatabaseMySQL, MariaDB or PostgreSQLmysqldump or pg_dump, then import
Web server config/etc/nginx/sites-available/Copy, then adjust paths and run nginx -t
TLS certificate/etc/letsencrypt/Request a new one with certbot after DNS moves
Scheduled jobscrontab -l, systemd timersRecreate on the new server
Mail sendingApp SMTP settingsPoint at a mail provider on port 465 or 587

How do you avoid downtime during the move?

Keep both servers serving the same site until DNS has settled. With a 300-second TTL, most visitors reach the new server within minutes; a few resolvers hold old answers longer. For sites with logins or orders, stop writes on the old server during the final sync, so no comment or order is lost.

Watch the old server's access log with tail -f /var/log/nginx/access.log. When it goes quiet, the migration is done. Then raise the TTL again.

Which VPS should you move the website to?

Size the new server on the old one's real use: free -h, df -h and the monthly traffic. SaltVPS checked its plan list on 16 November 2026: the 7 plans run from 1 vCPU / 2 GB / 40 GB to 12 vCPU / 32 GB / 640 GB, at one price in each of the 6 cities. Crystal (2 vCPU / 6 GB / 120 GB) suits a busy site with a database, at $6.75 a month on 12 months.

The pricing page lists all plans. To set up the stack from scratch, follow hosting a website on a VPS.

What should you check after you migrate a website to a new VPS?

HTTPS, mail, scheduled jobs and backups, in that order.

  • Request a certificate once DNS points at the new IP; the Let's Encrypt guide has the commands.
  • Outbound port 25 is closed on SaltVPS servers, so set the app's mail to a provider on port 465 or 587.
  • Recreate cron jobs and timers.
  • Set up off-server copies with the backup guide; no SaltVPS plan includes backups.

Website migration questions

How long does it take to migrate a website to a new VPS?

The copy takes as long as the data needs to transfer. The DNS switch takes about the TTL you set, often 5 minutes.

Can I migrate a WordPress site the same way?

Yes. Copy wp-content and the database, then check wp-config.php. If the domain stays the same, no search-and-replace is needed.

Do I need to change anything if the IP address changes?

Update the DNS records, any IP allow-lists at payment or API providers, and SPF records that name the old IP.

Should I copy the whole disk instead?

Usually not. Copying data and configs onto a fresh, updated system avoids carrying old problems along.

When can I cancel the old server?

After the old access log stays empty for a day or two and the new server has a working backup.

Verdict
  • Migrating a website to a new VPS comes down to a short TTL, two rsync runs and a database dump.
  • Test through the hosts file first, and keep the old server until traffic has moved.
Sources (3)
  1. rsync(1) manual — rsync project (2026-11-16)
  2. mysqldump reference — Oracle MySQL (2026-11-16)
  3. RFC 1035: Domain names, implementation and specification (TTL) — IETF (2026-11-16)

Move your site to a new server

Crystal gives 6 GB of RAM and 120 GB NVMe in any of 6 cities, paid in crypto.

From $2.25/mo on 12 months · no KYC

Configure