How do you migrate a website to a new VPS with almost no downtime?
Short answer
To migrate a website to a new VPS with only minutes offline, shorten the DNS TTL early, mirror files over rsync, carry the database as a dump, test via a hosts-file line, sync once more, then repoint DNS. VPSRomania also offers an assisted migration for $35 once, on plans paid in crypto from $4.82 a month.
In brief
- 48 hours before: drop the DNS TTL to 300 seconds so the switch spreads in minutes.
- Copy twice: a first rsync while the site runs, a short final one during a maintenance window.
- Database: mysqldump --single-transaction or pg_dump, imported on the new server.
- Test before DNS: a hosts-file line sends only your browser to the new IP.
- Old machine: leave it running some days past the DNS change before cancelling.
What does a low-downtime migration timeline look like?
Most of the work happens while the old site keeps serving visitors. Only the last two rows touch production.
| When | Action | Site online? |
|---|---|---|
| T minus 48 h | Cut the A and AAAA record TTL down to 300 s | Yes |
| T minus 24 h | Order the new server, install the same stack (nginx, PHP or Node, database) | Yes |
| T minus 24 h | First rsync of files, first database dump and import | Yes |
| T minus 2 h | Test the copy through a hosts-file entry; fix paths and permissions | Yes |
| T 0 | Maintenance mode, final rsync and final dump (a few minutes) | Read-only |
| T 0 | Point DNS at the new IP; watch the access log fill on the new server | Yes, on the new server |
| T plus 3 to 7 days | Cancel the old server once no request reaches it | Yes |
With a TTL of 300 s, most visitors follow the change within minutes; a few resolvers keep old answers longer.
How to move a website from one VPS to another, step by step?
Shorten the TTL
Two days ahead, edit the site's A and AAAA records at the DNS host so their TTL reads 300 seconds.
Mirror the software
On the new machine, install matching major versions of the web server, the language runtime and the database engine, and create an empty database plus its account.
Pull the web root
Working on the new machine, pull the web root from the old one with rsync over SSH, keeping owners, permissions and hard links.
Move the data
Export it where it lives now with mysqldump --single-transaction (MariaDB, MySQL) or pg_dump (PostgreSQL), then import it on the new one.
Test with a hosts entry
On your computer, map the domain to the new IP in the hosts file and browse the site, logins and forms included. Remove the line afterwards.
Final sync and switch
Put the site in maintenance mode, rerun rsync and the dump, update the DNS records, then issue the TLS certificate on the new server with Certbot.
# files: run once now, again at the final sync (only changes travel the second time)
rsync -aHAX --numeric-ids --delete --info=progress2 -e ssh [email protected]:/var/www/example.com/ /var/www/example.com/
# MariaDB or MySQL
ssh [email protected] 'mysqldump --single-transaction --routines --triggers shopdb' | mysql shopdb
# PostgreSQL
ssh [email protected] 'sudo -u postgres pg_dump -Fc shopdb' > /tmp/shopdb.dump
sudo -u postgres pg_restore -d shopdb --clean --if-exists /tmp/shopdb.dump203.0.113.10 example.com www.example.comWhy lower the DNS TTL before a migration?
The TTL tells resolvers how long to keep the old address; at 86,400 seconds, some visitors would reach the old server for a whole day after the switch. Lowering it to 300 seconds two days ahead lets the long value expire everywhere first. After the move, raise it again to an hour or more. If your DNS is hosted by the old provider, move the zone separately and first, so the migration does not depend on an account you are about to close.
What usually breaks after a website migration?
File ownership, hard-coded paths, missing PHP extensions and cron jobs cause most post-move bugs. rsync with --numeric-ids keeps user IDs, so create the same users on the new server, or fix ownership with chown afterwards. Search the configuration for the old IP or absolute paths. Compare the list of PHP modules or Node versions on both machines. Copy the crontab and any systemd timers. Mail is the other trap: outgoing port 25 is closed on every VPSRomania server, so a site that sent mail directly must switch to an SMTP relay on port 587, and a mailbox server should stay with a mail provider.
Should you copy the TLS certificate or issue a new one?
Issuing a new Let's Encrypt certificate on the new server is simpler and avoids copying private keys between machines. Certbot can only validate once DNS points to the new IP, so for a few minutes after the switch the new server answers on HTTP or with a copied certificate. If that gap matters, copy /etc/letsencrypt from the old server for the first hours, then run certbot --nginx to take over renewal. The nginx https vps guide shows the commands.
When is the assisted migration worth $35?
When the site has a database, several moving parts and no one on hand who has done a move before. For $35, charged once, someone from VPSRomania carries one site or app across to the new machine for you. A static site or a single WordPress install is often a short job to do yourself with the commands above. Take a backup first either way, as backup vps explains. According to VPSRomania's survey of 30 November 2026, Romanian hosts asked a median $15.00 a month for two vCPU and 4 GB paid in crypto; VR 4 is $9.08, falling to $7.08 on a yearly term. All terms are on romania vps price, and rental length and discounts covers the longer rentals and the top-up bonus.
Website migration questions
How much time does a website migration to a new VPS take?
For an ordinary site, one to three hours of hands-on work, stretched over two days by the TTL wait. Visitors notice only the last sync, normally a few minutes.
What is the best tool to copy a website between servers?
rsync over SSH: it resumes, copies only changes on the second run and keeps permissions. scp works for small sites but starts over each time.
Can I migrate a WordPress site without a plugin?
Yes: copy the folder with rsync, carry the database over as a dump, and leave the site URL unchanged. Migration plugins help mainly on shared hosting without SSH.
Will a migration hurt my search rankings?
Not if URLs, content and HTTPS stay the same and the downtime is short. Search engines follow the DNS change like any visitor.
Can VPSRomania move my site from another host?
Yes, as the assisted migration option, $35 once per website or application, added at checkout.
Verdict
- Short TTL, two copy passes, a hosts-file test, then the DNS switch: the outage lasts minutes.
- Plan for mail separately, since port 25 is closed, and keep the old server a few days.
Move your site to Bucharest
VR 4 in Bucharest: two vCPU, 4 GB of memory and 80 GB of NVMe at $9.08 a month; tick the assisted migration at checkout for a hand.
Sources (4)
- rsync manual — rsync project (read 30 Nov 2026)
- mariadb-dump — MariaDB Knowledge Base (read 30 Nov 2026)
- pg_dump — PostgreSQL Global Development Group (read 30 Nov 2026)
- RFC 1035, where DNS TTL is defined — IETF (read 30 Nov 2026)