Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
Devnix Blog

Tech Trends, Software Engineering & Cloud Insights

Devnix Blog

Tech Trends, Software Engineering & Cloud Insights

  • Home
  • Privacy Policy
  • Home
  • Privacy Policy
Close

Search

Subscribe
WordPress Migration

Step‑by‑Step Guide to Migrate a WordPress Site to a New Host with Zero Downtime

By Devnix
May 26, 2026 3 Min Read
0


Step‑by‑Step Guide to Migrate a WordPress Site to a New Host with Zero Downtime

Moving a live WordPress site to a new server can feel risky—any misstep may lead to broken pages, lost SEO juice, or angry visitors. This guide walks you through a reliable, zero‑downtime migration process that keeps your site online, preserves rankings, and avoids data loss.

1. Prepare Your New Environment

Choose a Suitable Hosting Plan

Before you start, make sure the destination server meets the requirements of your WordPress installation (PHP 8+, MySQL 5.7+, sufficient RAM). A lightweight Cloud VPS provides the flexibility you need while keeping costs low.

Set Up the Server Stack

On your new VPS, install a LAMP (or LEMP) stack:

  • Update packages: sudo apt update && sudo apt upgrade -y
  • Install Nginx or Apache, PHP, and MariaDB.
  • Create a dedicated MySQL database and user for WordPress.

Quick‑Tip: Enable the php-fpm service and configure Nginx to use it for better performance.

2. Back Up the Existing Site

Export the Database

Log into phpMyAdmin or use WP‑CLI:

wp db export ~/site-backup.sql --add-drop-table

Store the file in a secure location outside the web root.

Copy the Files

Use rsync or an FTP client to download the entire wp‑content folder and the root wp‑config.php file.

Warning: Never skip the wp‑content/uploads directory—media files are often the biggest source of data loss.

3. Import to the New Server

Create the Database

On the new VPS, run:

mysql -u root -p
CREATE DATABASE new_wp_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'new_wp_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON new_wp_db.* TO 'new_wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Import the Dump

Transfer the site-backup.sql file to the VPS and import it:

mysql -u new_wp_user -p new_wp_db < site-backup.sql

Upload WordPress Files

Place the copied wp‑content folder and wp‑config.php into the web root (e.g., /var/www/html). Edit wp‑config.php to reflect the new DB credentials.

4. Test the Migration on a Staging Subdomain

Modify Hosts File

On your local machine, add an entry to point a temporary domain (e.g., staging.example.com) to the new server’s IP. This lets you preview the site without changing public DNS.

Check Permalinks & Plugins

Log into the WordPress admin on the staging URL, go to Settings → Permalinks, and click “Save Changes” to flush rewrite rules. Verify that essential plugins (caching, security) load correctly.

Quick‑Tip: Disable any caching plugins temporarily during testing to avoid stale content.

5. Switch DNS with Zero Downtime

Lower the TTL

One day before the cutover, edit your DNS records and set the TTL (Time‑to‑Live) to a low value, such as 300 seconds. This ensures that DNS changes propagate quickly.

Update the A Record

When you’re confident the new server works, replace the old A record with the IP address of the new VPS. Because the TTL is low, most visitors will resolve to the new server within minutes.

Monitor the Transition

Use tools like WhatsMyDNS to track propagation. Keep the old server running for at least 24 hours as a safety net.

6. Post‑Migration Clean‑Up

Enable Caching & Security

Re‑activate any caching plugins and configure a security plugin (e.g., Wordfence) on the new host. Set up a free Let’s Encrypt SSL certificate to encrypt traffic.

Remove Temporary DNS Entries

After the TTL has expired worldwide and traffic is stable, you can delete the temporary hosts file entry and any staging subdomains.

Warning: Do not delete the old server until you have verified that all backups are intact and the new site functions flawlessly for a full 48‑hour window.

Conclusion

By following these steps—preparing a compatible VPS, backing up meticulously, testing on a staging subdomain, and switching DNS with a low TTL—you can migrate any WordPress site without downtime or data loss. The result is a smoother user experience, preserved SEO rankings, and a fresh hosting environment ready for future growth.

Tags:

move WordPress siteWordPress migrationzero downtime migration
Author

Devnix

Follow Me
Other Articles
Previous

Step‑by‑Step Guide to Deploy Multi‑Container Applications with Docker Compose on a Linux VPS

Next

Step‑by‑Step Guide to Configure Automated Email Reminders for Overdue Invoices in Odoo 16

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • WordPress Image Optimization: Native Settings vs Plugins vs CDN vs Server‑Side Solutions
  • Understanding Database Connection Pooling in Cloud Deployments
  • Odoo User Access Rights Audit Checklist – Secure Your ERP Without Over‑Privileging
  • WordPress Caching Showdown: Built‑In, Plugins, Server‑Side, or CDN?
  • Cloud VPS vs Managed WordPress Hosting vs Static Site Hosting: Which Platform Delivers the Best Uptime and Security for Small‑Business Websites?

Archives

  • June 2026
  • May 2026

Categories

  • Backup Strategies
  • Cloud VPS Performance
  • Docker Compose Deployment
  • Odoo Email Configuration
  • Odoo Inventory
  • Odoo Invoicing
  • Odoo Multi-Company Configuration
  • Odoo Subscriptions
  • Odoo User Management
  • Server Security
  • WordPress Migration
  • WordPress Performance Optimization

About Devnix Blog

A forward-thinking tech publication covering software engineering, cloud infrastructure, and modern digital transformation. Built for developers and tech enthusiasts.

Our Services

  • Cloud VPS Hosting
  • Managed ERP Solutions
  • DevOps Automation
  • Server Security & Optimization

Partners

  • Odoo Stack
  • Odoo Backup
  • Devnix Solutions
Copyright 2026 — Devnix Blog. All rights reserved. Devnix Solutions