FeaturesDocs Pricing
Contact us →
Tutorials • • 7 min read

How to Move a WordPress Site from Shared Hosting to a VPS

A step-by-step plan for moving WordPress off shared hosting and onto your own VPS, without losing email, search rankings or a single order.

Shared hosting is a fine place to start a WordPress site. Sooner or later, though, many sites outgrow it: pages slow down at busy times, the host suspends the account for using “too many resources”, or the renewal price quietly doubles. A virtual private server (VPS) gives you a machine of your own, with resources nobody else can borrow, often for less money.

The move itself worries people more than it should. With a little planning, visitors never notice it happened. Here is the plan.

Before you start: make a list

Write down what the old host does for you today, because some of it is easy to forget:

  • The website: WordPress files and the database.
  • Email: many shared plans include mailboxes like [email protected]. Moving the website does not have to move your email, but you must not break it by accident.
  • DNS: who controls your domain’s records? The registrar, the old host, or a service like Cloudflare?
  • Cron jobs, redirects and extras: scheduled tasks, custom .htaccess rules, other sites or subdomains on the same account.

Step 1: Lower your DNS TTL a day early

Every DNS record has a TTL (time to live) that tells the rest of the internet how long to remember it. If yours is set to 24 hours, some visitors will keep seeing the old server for a full day after you switch.

A day before the move, set the TTL on your domain’s A record (and www) to something short, like 300 seconds. When you switch later, the change spreads in minutes instead of hours.

Step 2: Take a complete backup

Before touching anything, take a full backup of the site: the files, especially wp-content, plus wp-config.php and a database export. Download it somewhere safe. Our guide on backing up a WordPress site covers exactly what to include.

This backup is both your migration package and your safety net.

Step 3: Prepare the new server

On the VPS you need a web server, PHP, a database server and an SSL certificate. You can install and tune these by hand, or use a control panel that does it for you. Either way, check that:

  • the PHP version is the same as on the old host, or newer and supported by your theme and plugins,
  • the PHP extensions WordPress needs are installed,
  • the server has enough memory for the site and its database.

Step 4: Copy the files and import the database

Upload the files to the new server, create an empty database and user, and import the database export. Then edit wp-config.php so DB_NAME, DB_USER, DB_PASSWORD and DB_HOST match the new database.

If the domain is staying the same, you do not need to change any URLs inside the database. That is one of the reasons a straight move is simpler than people expect.

Step 5: Test before anyone else sees it

You can preview the site on the new server before changing DNS by pointing only your own computer at it. Add a line to your computer’s hosts file with the new server’s IP address and your domain, then open the site in a browser.

Click around properly:

  • the home page and a few posts and pages,
  • images in the media library,
  • the admin dashboard and login,
  • contact forms,
  • on a store, the cart, checkout and a test order.

Remove the hosts line when you are done.

Step 6: Freeze changes, sync, and switch DNS

Between your backup and the DNS switch, the old site may have received new comments, orders or form entries. For a quiet blog this rarely matters. For a store, it does:

  1. Pause anything that writes data, or put the store in maintenance mode for a few minutes.
  2. Export the database one last time and import it on the new server.
  3. Update the A records to the new server’s IP address.

Thanks to the short TTL, traffic moves over within minutes.

Step 7: Do not break your email

This is the step that catches people out. If your email lives on the old host, its MX records point there. When you change the website’s A record, leave the MX records alone unless you are deliberately moving email too.

If you plan to cancel the old hosting plan, move your mailboxes to a dedicated email provider first, update the MX records, and only then cancel.

Step 8: Finish up

After the switch:

  • check that the SSL certificate is active and the padlock shows,
  • confirm scheduled tasks run, such as WooCommerce emails and scheduled posts,
  • set up automatic backups on the new server straight away,
  • raise the DNS TTL back to a normal value after a few days,
  • keep the old hosting account for a week or two, just in case, before you cancel it.

Where Rubuz fits

Rubuz sets up the server side of this move for you: it installs a tuned web server, PHP and database on your VPS, issues free SSL, and runs backups to storage you own, all from a browser. You still choose the VPS and pay the provider directly. The docs show how to connect a server and add your first site.

Published on January 14, 2026 • Rubuz Architecture
← Back to all articles

Deploy with git push on your own servers

Connect your VPS in one step. Deploy Next.js, Astro, Go and databases with sub-50ms performance and automatic SSL.