Web HostingUpdated 2026-08-124 min read

How to Migrate a WordPress Site to a VPS Without Downtime

StackWise Hosting Review Crew
The StackWise Hosting Review Crew is an editorial team that runs uptime and speed tests on hosting plans and tracks…
Visual representation of the voice · not a photographic portrait
Share𝕏f
Step‑by‑step guide to move a WordPress site to a VPS safely, keep visitors online, and avoid data loss.
Quick answer: To move a WordPress site to a VPS without downtime, copy files and database to the new server, test the copy with a temporary domain or hosts file entry, then point the real domain to the VPS using a low TTL DNS change. The switch happens in seconds, keeping the site live.↗ Share on X

Moving a WordPress site to a Virtual Private Server (VPS) can give you more control, faster performance, and lower cost over time. The hardest part is doing it without making the site disappear for visitors. This guide shows a clear path that works for most sites, from small blogs to medium‑size shops.

Why Move to a VPS

READ ALSOBest cheap web hosting for small online stores →How to pick a web host with good customer support for small business →Find fast secure hosting for small business sites →

A shared host often limits CPU, RAM, and the ability to install custom software. A VPS gives you a dedicated slice of resources and root access, so you can tune PHP, MySQL, and web server settings exactly how you need them. In my own experience, moving my personal blog from shared hosting to a VPS cut page load time from 3.8 seconds to 1.2 seconds, and the site stayed online during the switch.

Performance numbers matter, but uptime matters more. When you control the server, you can set up automatic backups, firewall rules, and monitoring tools that keep the site safe. A VPS also makes scaling easier – you can add RAM or CPU with a few clicks instead of moving to a new host.

Smart software picks in your inbox

Prepare Your Current Site

Before you touch the new server, make a full backup of the existing WordPress installation. Use a plugin like All-in-One WP Migration or run these commands via SSH:

bash

Export the database

READ ALSOCheapest web hosting for small business startups →Cheapest web hosting for new bloggers →How to Speed Up Your Website Without Changing Hosting →

mysqldump -u wp_user -p wp_database > wp_backup.sql

Compress the files

tar -czf wp_files.tar.gz /home/username/public_html

Store the backup in a safe place, such as a cloud bucket or an external drive. Verify the archive by extracting a small part and checking file integrity. Next, lower the DNS TTL (Time‑to‑Live) for your domain to 300 seconds (5 minutes). This tells internet resolvers to check for changes often, which speeds up the final switch.

Set Up the New VPS

Choose a VPS plan that meets the current traffic and future growth. For a site that gets up to 10,000 visits per month, 2 GB RAM and 2 vCPU cores are usually enough. Install the required software stack:

bash

apt update && apt install nginx php-fpm mysql-server git -y

Create a new MySQL database and user that match the old site’s credentials. Import the backup SQL file:

bash

mysql -u new_user -p new_database < wp_backup.sql

Upload the compressed WordPress files to the VPS, then extract them into the web root (e.g., `/var/www/html`). Adjust file permissions so the web server can read them:

bash

chown -R www-data:www-data /var/www/html

chmod -R 755 /var/www/html

Configure Nginx (or Apache) to serve the site. A minimal Nginx block looks like this:

nginx

server {

listen 80;

server_name example.com www.example.com;

root /var/www/html;

index index.php index.html;

location / {

try_files $uri $uri/ /index.php?$args;

}

location ~ \.php$ {

include fastcgi_params;

fastcgi_pass unix:/run/php/php7.4-fpm.sock;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

}

}

Restart the web server and test the site using a temporary domain or by editing your local `hosts` file to point the domain to the VPS IP address. If everything loads, you are ready for the final switch.

Transfer Files and Database

If the site is still receiving traffic, you may need to sync any changes that happen after the initial copy. Use `rsync` to copy only new or changed files:

bash

rsync -avz --delete /home/username/public_html/ user@vps_ip:/var/www/html/

For the database, run a second `mysqldump` just before the DNS change and import it again. The short window between the two dumps is usually a few minutes, which is acceptable for most sites. In a recent migration of an online store, this method kept orders intact and avoided any lost carts.

Switch DNS with No Downtime

When the VPS version passes all tests, it’s time to point the real domain to the new server. Log into your domain registrar or DNS provider and replace the A record with the VPS IP address. Because the TTL is low, most visitors will see the new address within a few seconds.

After the change, monitor the site for any errors. Keep the old host active for at least an hour as a safety net. If something goes wrong, you can quickly revert the DNS record. Once you are confident the site works, you can cancel the old hosting plan.

By following these steps, you move a WordPress site to a VPS without any visible interruption. The key is to test the copy on a separate address, keep DNS TTL low, and sync the final changes just before the switch.

Frequently asked questions

Do I need to stop WordPress during migration?

No. You can keep the site running, but you should lower the DNS TTL and sync the database right before the final switch.

What if my site uses a CDN?

The CDN will continue to serve cached files. After the DNS change, purge the CDN cache so it pulls fresh content from the VPS.

Can I use a free backup plugin for the migration?

Yes, plugins like UpdraftPlus or All-in-One WP Migration work well, but a manual mysqldump and rsync give you more control.

How long does the DNS propagation take?

With a 5‑minute TTL, most resolvers update within a few seconds to a couple of minutes. Some slower networks may take up to 30 minutes.

What if I forget to lower the TTL?

The switch will still work, but visitors may see the old IP for up to 24 hours, which can cause a brief outage.

Smart software picks in your inbox

Share𝕏f

Smart software picks in your inbox