
Keep the old site live, copy the files and database to the VPS, test that copy privately, and only then point your domain at the new server. Visitors see the old site until DNS changes, then an identical site on the VPS. Cancel shared hosting last, after traffic to it has stopped.
Downtime usually happens when people cancel the old host first, change DNS before the new site works, or discover afterwards that email, SSL or a form was left behind.
What a $5 VPS actually gives you
A typical $5-a-month VPS in 2026 is 1 vCPU, 1 GB of RAM and about 25 GB of SSD storage. Vultr, for example, advertises Cloud Compute starting at $5 a month on its Cloud Compute page. That is enough for a small blog or brochure site with caching, but it is not generous.
Be honest about the fit before you move. A site with WooCommerce, a heavy page builder, several admin users and no caching will feel tight on 1 GB. A mostly static site, a blog, or a small business site with a cache plugin is the realistic case for this budget. If your current site already uses more than about 15 GB of disk, the maths does not work either — leave room for the operating system, backups and updates.
Leaving shared hosting also means updates, firewall rules and backups become your job. The saving is real, but so is the responsibility.
A week before: lower the TTL and write down your DNS
TTL, or time to live, is how long other servers remember your domain's address before asking again. If your A record has a TTL of 24 hours, some visitors can keep being sent to the old host for up to a day after you change it.
Google's guide to changing your web hosting suggests lowering the TTL to a conservative low value, such as a few hours, at least a week in advance of the move. A common choice is 300 seconds, which is five minutes. Lower it early, because the new, shorter TTL only helps once the old, longer one has expired from caches.
While you are in the DNS panel, export or screenshot every record, not just the website ones:
| Record | What it does | What happens if you forget it |
|---|---|---|
| A / AAAA | Points the domain at a server | The website does not load, or loads the old copy |
| CNAME | Points www and subdomains somewhere | www or a subdomain breaks |
| MX | Delivers email | Email stops arriving |
| TXT | SPF, DKIM, DMARC and verification | Email lands in spam, or a service disconnects |
If your DNS is managed by the shared host you are leaving, move DNS management to your registrar or a DNS provider first, copying every record exactly. Do that as a separate step, days before the website move, so you are only changing one thing at a time.
Prepare the VPS before copying anything
Install a current Linux release, then a web server (Nginx or Apache), PHP and MariaDB or MySQL. WordPress.org currently recommends PHP 8.3 or greater, MariaDB 10.11 or greater or MySQL 8.4 or greater, and HTTPS support. Match or beat those versions on the new server, even if the old host runs something older.
Then do the boring safety work while nothing depends on the server yet:
- Create a non-root user with sudo, and log in with an SSH key instead of a password.
- Turn on the firewall and allow only SSH, HTTP and HTTPS.
- Turn on automatic security updates for the operating system.
- Add a swap file. On a 1 GB server, swap is the difference between a slow minute and a crashed database.
- Create the database and database user for WordPress, with a new password you store in a password manager.
Do not point the domain at the VPS yet.
Copy the site: files plus database
A WordPress site is two things. The files are WordPress itself, your theme, plugins and uploaded media. The database holds posts, pages, settings and users. You need both, taken at roughly the same moment, or the copy will be inconsistent.
WordPress.org's backup guide makes the same point: a complete backup means the database and the files, and downloading your WordPress folder alone does not include the database. Take a full backup first and download it to your own computer. That copy is your way back if anything goes wrong.
For the copy itself, you have three reasonable options. A migration plugin packs the site into one archive and unpacks it on the new server, which suits most small sites. A manual copy — download the files over SFTP, export the database from phpMyAdmin, then upload and import on the VPS — gives you full control and works at any size. A server panel with a WordPress installer can also help, but check that it does not overwrite your imported database with a fresh, empty site.
Because the domain is not changing, you do not need to rewrite URLs in the database. You only edit wp-config.php on the VPS so it uses the new database name, user and password. Keep the same table prefix as the old site.
Anything created on the old site after you copy the database — a post, comment, order or form entry — will not exist on the VPS. For a site that changes daily, copy once to test, then do a final database copy immediately before the DNS switch.
Test the new copy while visitors still see the old site
This is the step that makes the move safe, and the one people skip. Your domain still points at shared hosting, so you need a private way to view the VPS copy.
The reliable method is your computer's hosts file. Add a line with the VPS IP address followed by your domain, and your computer — and only your computer — will load the site from the VPS. Everyone else still gets the old host. Remove the line when you finish testing.
Check more than the homepage:
- Open several pages, a blog post, and an image-heavy page.
- Log in to wp-admin and open Settings, Plugins and Media.
- Submit every form and confirm the message arrives.
- Check that permalinks work — a 404 on inner pages usually means rewrite rules are missing on the new server.
- Look for mixed-content warnings and broken images, which often mean old URLs are still hiding in the database or theme settings.
HTTPS needs a plan here. A certificate for your domain normally can only be issued once the domain points at the server that asks for it, using the common HTTP check. So either issue the certificate with a DNS-based check before the switch, or be ready to issue it immediately after DNS changes and accept a short window where the new server has no valid certificate. Decide which one you are doing before switch day, not during it.
Switch DNS, then watch both servers
When the VPS copy passes your tests, change the A record (and AAAA record, if you use one) to the VPS address. Change nothing else in the same edit — leave MX and TXT records exactly as they are unless email is moving too.
With a 300-second TTL, most visitors should reach the new server within minutes, but treat the next few hours as a mixed period. Some people will still see the old site. That is normal, and it is exactly why the old host must stay up and unchanged. Do not post new content on either copy during this window if you can avoid it, or the two copies will drift apart.
Issue or confirm the SSL certificate on the VPS as soon as DNS points there, then test the site again from a phone on mobile data, which bypasses your home network and hosts file. Send yourself an email at the domain and reply to it. Place a test order or enquiry if the site takes them.
Keep the old host for at least a week
Do not cancel shared hosting on switch day. Keep it for at least a week, and check its access logs or statistics before cancelling. When traffic to the old server has fallen to zero and stayed there, and you have a fresh backup of the site running on the VPS, then cancel.
Finally, set up the things shared hosting used to do for you: automatic off-server backups of files and database, uptime monitoring so you hear about a crash from a tool rather than a customer, and a monthly reminder to check that updates and certificate renewal are still working. A $5 VPS can run a small WordPress site well. It just will not look after itself.
Checked on 4 December 2026.
评论 暂无评论