The Ultimate Guide: How to Migrate Your WordPress Website in 5 Easy Steps (Zero Downtime)

The ultimate guide to migrate your wordpress website manually with zero downtime

Migrating a blog or business site to a new server can feel intimidating, but taking direct control of the process gives you full authority over your data. When you decide to migrate your wordpress website without relying on automated plugins, you eliminate common failure points such as server timeout errors, memory exhaustion, file truncation, and hidden database corruption. Automated tools often crash when dealing with large media libraries or custom database configurations, leaving your site partially broken. Understanding how to migrate your wordpress website manually ensures that every single database table, configuration setting, and media file moves smoothly from the source host to the destination host.

A manual migration provides a clean, predictable transfer pipeline. By working directly with raw files and database exports, you retain total visibility into what is happening under the hood. Whether you are changing web hosting providers to improve performance, scaling up to a dedicated virtual private server (VPS), or moving away from restrictive shared hosting limits, mastering the process to migrate your wordpress website manually is an essential technical skill for site administrators, developers, and serious publishers alike. Mastering the technical pipeline required to migrate your wordpress website ensures complete data sovereignty without plugin limitations.

Understanding the Core Components of a WordPress Installation

Before touching server files or database tables, you must understand the structural components that make up a functional WordPress site. WordPress does not operate as a single static entity; rather, it functions via a dynamic architecture split into two main core parts: static files and a MySQL/MariaDB database.

1. The File System (public_html)

Your hosting directory contains the core application files and user content:

  • WordPress Core Files: Files like index.php, wp-login.php, and administrative directories (wp-admin, wp-includes).

  • The wp-content Directory: This folder holds all your essential site assets, including themes (wp-content/themes), plugins (wp-content/plugins), and uploaded media files (wp-content/uploads).

  • Configuration Files: Critical setup files such as .htaccess (which controls rewrite rules and server security) and wp-config.php (which stores your database name, user, password, and host parameters).

2. The Database System (MySQL / MariaDB)

While files store images and core application logic, your database contains all site data. When you migrate your wordpress website, the database carries your written posts, pages, user accounts, comments, widget settings, theme customizer values, and plugin configurations. If you move the files without the database, you lose all your content. Conversely, if you move the database without the wp-content folder, your site loses its visual design and media assets. This strict separation of assets dictates how you extract data when you migrate your wordpress website.

3. The Bridge (wp-config.php)

The wp-config.php file acts as the communication link between your server files and the relational database. It stores the exact access credentials required for WordPress to query site content. When you migrate your wordpress website to a new hosting environment, updating wp-config.php with the new server’s database credentials is what establishes connection and brings your site back online.

Essential Pre-Migration Safety Protocol

Executing a manual site transfer without a structured preparation plan increases the risk of unexpected downtime, broken links, or data loss. Following a strict pre-migration checklist guarantees that your operational environment remains protected throughout the move.

Step 1: Create a Full Redundant Backup

Never alter files or database records on a live site without having a secure fallback point. Before beginning any manual server migration:

  1. Generate a complete backup of your existing database via phpMyAdmin or your hosting control panel.

  2. Download a full copy of your site directory to a local hard drive or secure cloud storage location.

  3. Verify that your downloaded backup files are intact and uncorrupted.

Step 2: Audit Plugin Operations and Cache Engines

To prevent conflicts on the new server environment:

  • Deactivate Caching Plugins: Clear and temporarily turn off page caching, object caching, and minification plugins (e.g., WP Rocket, W3 Total Cache, Litespeed Cache). Stored cache files contain hardcoded directory paths that will break on a new host.

  • Audit Database Size: Clean out transient options, post revisions, spam comments, and deleted items from the database. A lean database exports faster and imports with a significantly lower risk of running into memory execution limits.

  • Review PHP Compatibility: Check the active PHP version on your source server. Ensure that your new host supports the same PHP version (or higher) to prevent fatal syntax errors post-transfer.

Step 3: Reduce DNS TTL (Time To Live) Values

DNS records instruct internet traffic where to locate your web server. By default, domain registrar DNS records carry a Time To Live (TTL) value ranging from 4 hours to 24 hours (86,400 seconds).

To ensure zero downtime when you migrate your wordpress website:

  1. Log into your domain registrar or DNS management service (such as Cloudflare).

  2. Locate the TTL setting for your main domain A Record.

  3. Reduce the TTL value to 300 seconds (5 minutes) at least 24 to 48 hours prior to the migration.

Lowering the TTL forces internet service providers (ISPs) and local caches to check for updated IP addresses every 5 minutes rather than caching the old IP for a full day. This preparation ensures that when you point your domain to the new hosting IP, the switch happens almost instantly worldwide.

Step 4: Keep the Source Host Active

A common operational mistake is terminating the old hosting subscription before the new site is fully verified. To successfully migrate your wordpress website with zero downtime, keep your original hosting plan active throughout the entire process. Your source server must continue serving pages to real visitors while you upload, configure, and test the site on the new destination server. Only terminate the old hosting service after DNS propagation has completely finished and traffic logs confirm zero incoming requests on the old machine.

Section 2: File Transfer & Database Export

Database and file export process for WordPress website migration
Exporting SQL database and website files before server transfer.

Once your pre-migration protocol is in place, you can move to the core data extraction phase. When you migrate your wordpress website, precision during file download and database export prevents missing assets, broken permalinks, or missing user data on the new host.

Step 1: Exporting Your WordPress Database via phpMyAdmin

The database contains your entire editorial history, user accounts, taxonomy tables, and site settings. Exporting it accurately ensures a seamless structural transition.

1. Locating phpMyAdmin in Your Hosting Panel

  1. Log into your source hosting control panel (cPanel, DirectAdmin, Plesk, or custom panel).

  2. Navigate to the Databases section and click on phpMyAdmin.

  3. In the left-hand sidebar, locate and select the database assigned to your WordPress installation.

    • Pro Tip: If you manage multiple sites and do not know your database name, open your wp-config.php file on the source server and look for the DB_NAME line.

Locating the exact database assigned to your domain is mandatory when you migrate your wordpress website manually.

2. Choosing the Right Export Settings

Once inside your site’s database view, select the Export tab from the top menu bar.

For smaller sites under 50MB, the Quick export method works fine. However, when you migrate your wordpress website with a large collection of posts or comments, selecting the Custom method gives you superior control:

  • Tables Selection: Ensure all tables with your prefix (e.g., wp_ or custom prefix) are checked.

  • Compression: Select gzipped or zipped output. Compressing the SQL file drastically reduces export time and prevents connection timeouts during the download process.

  • Object Creation Options: Ensure Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement is checked. This ensures clean overwrite capabilities if you ever need to re-import data.

Click Go to generate and save the .sql or .sql.gz database dump file to your local computer.

Step 2: Downloading Site Files via FTP or File Manager

With the database securely saved, the next phase is extracting all physical site assets. To migrate your wordpress website without losing media, custom styling, or plugin configurations, you must download the entire contents of your root site folder (public_html or domain root).

Method A: Using an FTP Client (FileZilla)

An FTP client provides a stable connection for transferring thousands of individual site files.

  1. Launch FileZilla (or your preferred FTP/SFTP client) and enter your host name, username, password, and port (usually 21 for FTP or 22 for SFTP).

  2. On the Remote Site panel, navigate to your site’s root directory (public_html or /www/[domain.com/root](https://domain.com/root)).

  3. On the Local Site panel, create a dedicated folder on your computer named WP_Backup_Migration.

  4. Select all folders and files in the remote directory, right-click, and select Download.

Note: Plain FTP transfers individual files sequentially, which can take a long time for large sites with high file counts. If speed is a priority, use Method B below.

FTP provides a direct byte-for-byte fallback method to migrate your wordpress website if server zip tools are disabled.

Method B: Compressing Files via cPanel File Manager (Recommended)

Compressing your entire site directory into a single archive file on the server is significantly faster than downloading individual files over FTP.

  1. Open your source host’s File Manager and enter public_html.

  2. Click Select All to highlight all files and directories inside the root folder.

  3. Click the Compress button in the top toolbar.

  4. Choose Zip Archive as the compression type and name the file site-backup.zip.

  5. Click Compress File(s) and wait for the process to finish.

  6. Once created, select site-backup.zip and click Download to save it locally.

Extracting a compressed archive drastically reduces transfer time when you migrate your wordpress website.

Step 3: Verifying File Integrity and Critical Directories

Before uploading anything to your new server, verify that all critical components are included in your download. Skipping this check can cause site failures after you migrate your wordpress website.

Key Folders & Files Audit Table

Directory / File Description Verification Check
wp-content/uploads/ Stores all blog images, PDFs, media files, and attachments. Verify total file size matches source server media directory.
wp-content/plugins/ Contains all installed active and inactive plugin folders. Ensure no plugin folders are empty or partially downloaded.
wp-content/themes/ Holds parent and child theme directories. Confirm active child theme and parent theme directories are intact.
wp-config.php Main configuration file holding security keys and DB details. Open locally in a text editor to confirm code structure is preserved.
.htaccess Apache web server rewrite rules and security directives. Ensure hidden files are visible in your file manager/FTP client.

When you migrate your wordpress website, omitting temporary files, system cache directories (e.g., wp-content/cache), and large server error log files (such as error_log) will significantly clean up your archive without impacting site functionality.

Step 4: Storing Your Extraction Securely

At this stage of the manual migration, you should have two primary files ready on your local machine:

  1. Database File: yourdatabase.sql.gz (or .sql)

  2. Files Archive: site-backup.zip (or the extracted folder structure)

Keep these original files in a dedicated local folder. Do not alter or edit the original SQL export file directly unless necessary. Having an untouched reference copy ensures that if anything goes wrong while you migrate your wordpress website to the new host, you can easily retry without needing to re-download files from your source server. Storing duplicate offline copies keeps your raw assets safe while you migrate your wordpress website.

📌 Pro Tip for Content Creators:

👉 Explore Free AI Tools for Video Editing to Upgrade Your Content

Section 3: Host Configuration & Data Import

With your database export and site files securely saved on your computer, the next phase is setting up the destination server. When you migrate your wordpress website, configuring the receiving environment accurately ensures that your database connects without permission errors and your site files execute cleanly.

Configuring new host server and importing database for WordPress site
Setting up database parameters and uploading files on the new host.

Step 1: Creating a New MySQL Database and User on the Destination Server

Before uploading your exported SQL data, you must provision a fresh, empty MySQL database and assign a database user with full privileges on the new web host.

1. Provisioning the Database via MySQL Database Wizard

  1. Log into your new hosting account’s control panel (cPanel, Plesk, or custom dashboard).

  2. Locate the Databases section and open MySQL Database Wizard (or MySQL Databases).

  3. Enter a new database name (e.g., db_wpnew)and click Next Step.

  4. Create a new database username (e.g., usr_wpnew).

  5. Generate a strong, secure password using the built-in password generator.

    • Critical Note: Save the database name, database username, and database password in a temporary text file on your local machine. You will need these credentials in a later step.

SQL:

-- Conceptual MySQL setup on destination host
CREATE DATABASE db_wpnew CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'usr_wpnew'@'localhost' IDENTIFIED BY 'Strong_Generated_Password';
GRANT ALL PRIVILEGES ON db_wpnew.* TO 'usr_wpnew'@'localhost';
FLUSH PRIVILEGES;

2. Assigning User Privileges

In the privilege assignment screen, check the box for ALL PRIVILEGES to grant your new user full access to read, write, and alter tables in the database. Complete the wizard to save the database structure. Assigning full database privileges ensures your connection strings work immediately after you migrate your wordpress website.

Step 2: Importing the Database File via phpMyAdmin

Now that your destination database is active and empty, you can populate it with your original site data. Importing your SQL dump restores all your published content, user profiles, and site settings when you migrate your wordpress website.

1. Uploading the SQL Export

  1. Return to your hosting panel and open phpMyAdmin.

  2. Select your newly created database (db_wpnew) from the left-hand menu.

  3. Click on the Import tab in the top navigation bar.

  4. Under File to Import, click Choose File and select your saved .sql or compressed .sql.gz file from your local computer.

  5. Leave the format dropdown set to SQL and keep default settings intact.

  6. Scroll down and click Import (or Go).

Depending on your database size, the upload process may take a few seconds to a few minutes. Once complete, phpMyAdmin will display a green success banner indicating that all tables were imported successfully. A successful SQL import completely restores your post hierarchy when you migrate your wordpress website.

Step 3: Uploading and Extracting Site Files to public_html

With the database populated, the next step is placing your physical site assets into the root folder of your new host. To migrate your wordpress website efficiently, uploading a single compressed .zip archive via File Manager is much faster than uploading loose files over FTP.

1. Uploading the Zip Archive via File Manager

  1. Open File Manager in your new host’s panel and navigate to the domain root directory (usually public_html).

  2. If any default host files exist (such as index.html or default.php), delete them to keep the directory clean.

  3. Click Upload in the top bar, choose your site-backup.zip file, and wait for the upload progress bar to hit 100% and turn green.

2. Extracting Files on the Server

  1. Select site-backup.zip inside public_html.

  2. Click Extract in the top toolbar and confirm the target path as /public_html.

  3. Once extraction finishes, verify that core folders (wp-content, wp-admin, wp-includes) are located directly inside public_html and not nested inside a subfolder.

  4. Delete the remaining site-backup.zip file to save server disk space.

Verifying root directory alignment is critical after uploading files to migrate your wordpress website.

Step 4: Reconfiguring wp-config.php Credentials

At this point, your new server holds your database and site files, but they are not connected to each other yet. Your imported wp-config.php file still contains the old host’s database credentials. Updating this configuration is a vital step when you migrate your wordpress website manually.

1. Editing Database Credentials

  1. In public_html, locate wp-config.php, right-click it, and select Edit.

  2. Locate the MySQL settings section and replace the old values with your new destination server database details:

PHP:

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'db_wpnew' );

/** MySQL database username */
define( 'DB_USER', 'usr_wpnew' );

/** MySQL database password */
define( 'DB_PASSWORD', 'Strong_Generated_Password' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

Note: On most hosting providers (cPanel, SiteGround, Bluehost, Namecheap), DB_HOST remains 'localhost'. However, if you are using specialized hosts or third-party cloud databases (like AWS RDS), replace 'localhost' with the specific database server IP or hostname provided by your host.

2. Updating Security Salt Keys (Optional Best Practice)

To enhance site security after you migrate your wordpress website, you can update your security authentication keys inside wp-config.php. This automatically invalidates existing active sessions and forces all users (including potential unauthorized sessions) to log in freshly on the new host. Invaliding old login sessions protects your admin dashboard right after you migrate your wordpress website.

Step 5: Handling Domain or URL Changes (Database Search and Replace)

If you are transferring your site to a new hosting provider while keeping the exact same domain name, you do not need to alter database URL references. However, if you migrate your wordpress website to a new domain name or staging URL, you must update serialized URL strings across your database tables.

Why SQL Queries Break Serialized Data

Running a basic SQL UPDATE statement directly on serialized WordPress data (such as widget configurations or theme customizer values) will break serialized strings because character counts will no longer match the string length declarations.

Using WP-CLI or Search-Replace Scripts

To safely handle domain updates:

  • Option A (WP-CLI): If SSH access is available on your new server, run:

    wp search-replace '[http://olddomain.com](http://olddomain.com)' '[https://newdomain.com](https://newdomain.com)' --skip-columns=guid

  • Option B (Better Search Replace Plugin): If you prefer a visual interface, wait until DNS points to the new host, install the Better Search Replace plugin, and execute a safe database search and replace. Updating serialized database strings properly guarantees smooth navigation when you migrate your wordpress website to a new domain.

Step 6: Verifying File Permissions on the Destination Server

Incorrect file permissions after extraction can cause 500 Internal Server Errors or prevent image uploads. Ensure your server applies standard WordPress permissions:

  • Directories / Folders: Set to 755 or 750.

  • Files: Set to 644 or 640.

  • wp-config.php: Set to 600 or 640 for elevated security protection.

Checking these permission flags completes your host setup phase. You now have a fully assembled duplicate of your site residing on the destination server, ready for testing before turning live traffic toward it. Setting standard 755 and 644 file permissions prevents 500 internal server errors when you migrate your wordpress website.

Section 4: Testing & Zero-Downtime Cutover

Zero downtime DNS A-record update during WordPress migration
Directing DNS traffic smoothly to the new server for seamless migration.

Before pointing your live traffic to the new server, comprehensive testing and a seamless cutover plan are essential. When you migrate your wordpress website, skipping the validation phase can lead to broken links, database mismatches, or unexpected downtime. Follow this structured approach to test your staging site thoroughly and execute a zero-downtime cutover.

1. Testing the Staging Environment via Hosts File or Temporary URL

Before updating your public DNS, you must inspect the migrated site on the new server without affecting live visitors.

  • Option A: Edit Your Local Hosts File: Map your domain name directly to the new server’s IP address on your local computer (/etc/hosts on Linux/macOS or C:\Windows\System32\drivers\etc\hosts on Windows). This lets your browser load the new site while the rest of the world continues to see the old host.

  • Option B: Temporary URL / Staging Link: Some hosting providers supply a temporary staging URL. If you choose this method to migrate your wordpress website, remember to update your database URLs back to the primary domain before public launch.

Key Elements to Verify During Testing:

  • Navigation & Permalinks: Click through key pages, blog posts, and category archives to verify that internal linking works seamlessly without 404 errors.

  • Forms & eCommerce Functionality: Test contact forms, user logins, and checkout processes to ensure mail servers and payment gateways connect properly.

  • Media & Uploads: Confirm that all images, PDF attachments, and custom assets render correctly from the new server’s upload directory.

Verifying form connectivity on a local host mapping ensures total reliability before you migrate your wordpress website live.

2. Lowering TTL (Time To Live) Before DNS Cutover

To prepare for a smooth cutover when you migrate your wordpress website, lower the Time To Live (TTL) value of your domain’s A record (or CNAME) at your DNS provider (e.g., Cloudflare, Namecheap, or GoDaddy).

  • Reduce TTL to 300 seconds (5 minutes) at least 24 to 48 hours prior to the migration.

  • This ensures that when you update your IP address, internet service providers (ISPs) worldwide refresh their DNS cache almost instantly, drastically reducing propagation lag.

3. Executing the Zero-Downtime DNS Cutover

Achieving true zero-downtime requires keeping both the source and destination environments active during DNS propagation.

  1. Put the Old Site in Read-Only Mode (Optional): If your site accepts user comments, orders, or data submissions, briefly enable maintenance mode or restrict database writes on the old server right before updating DNS.

  2. Update DNS Records: Point your domain’s A Record to your new server’s IP address (or update the Nameservers if you are using your new host’s DNS infrastructure).

  3. Dual-Server Monitoring: As DNS propagates globally, traffic will gradually shift from the old server to the new one. Because both servers host identical files and database structures, visitors will experience zero interruption regardless of which server their ISP routes them to.

4. Final Post-Cutover Auditing & Cleanup

Once DNS propagation is complete across major global resolvers, perform a final round of checks to finalize the process.

  • Clear All Caching Layers: Flush server-side caches (Redis/Memcached), CDN caches (Cloudflare), and WordPress caching plugins (e.g., WP Rocket, LiteSpeed) so updated files serve properly.

  • Re-verify SSL/TLS Certificates: Ensure your HTTPS certificate is active on the new server and that force-HTTPS redirects are active without mixed-content warnings.

  • Decommission the Old Hosting Account: Keep the old server running for 48–72 hours as a backup. Once you are 100% confident that traffic has shifted completely, cancel the old subscription to finalize the decision to migrate your wordpress website.

By following these steps carefully whenever you plan to migrate your wordpress website, you guarantee a reliable transition that preserves user experience, SEO standings, and backend integrity. Knowing how to migrate your wordpress website without dropping a single visitor is the ultimate benchmark of a successful migration strategy.

Section 5: Post-Migration Audit & FAQs

Completing the technical transfer and DNS cutover is a major milestone, but a thorough post-migration audit guarantees that your site maintains peak performance and search visibility. Taking time to verify indexability, clean up temporary configurations, and monitor error logs after you migrate your wordpress website protects your search engine rankings and ensures a smooth user experience.

Post-Migration Optimization and Maintenance Audit

After DNS propagation settles and traffic flows to the new host, complete these essential maintenance tasks to optimize your environment:

  • Flush and Re-arm Caching Systems: Re-enable your preferred caching plugins (e.g., LiteSpeed Cache, WP Rocket, or W3 Total Cache). Purge all server-level object caches (Redis or Memcached) and clear your CDN edge cache to ensure visitors receive fresh assets.

  • Resave Permalink Structures: In your WordPress dashboard, navigate to Settings > Permalinks and click Save Changes without making any edits. This action flushes and rewrites your .htaccess rules, resolving potential 404 errors on internal pages.

  • Audit Broken Links and Media Paths: Run a crawl using tools like Screaming Frog or a link-checker plugin to verify that internal images, canonical tags, and hyperlinked resources load correctly over HTTPS.

  • Inspect Google Search Console (GSC): Monitor your Google Search Console coverage report over the first 48 to 72 hours. Check for spikes in 5xx server errors or 404 response codes to verify that search engine bots crawl your new host without friction.

Performing these post-transfer checks ensures that when you migrate your wordpress website, your site remains fully indexable and structurally sound. Executing a post-transfer Search Console crawl confirms search engine indexability immediately after you migrate your wordpress website.

Frequently Asked Questions (FAQs)

Q. How long does a manual WordPress site migration take?

A manual migration typically takes between 30 to 60 minutes for small to medium-sized sites. The exact duration depends on your media library size, internet connection speed, and database file size. Allowance for full global DNS propagation (which can take 1 to 24 hours depending on your TTL settings) should also be factored in.

Q. Will executing a manual migration affect my SEO rankings or traffic?

If performed using a zero-downtime strategy with proper 301 redirects, identical URL structures, and valid SSL setup, manual migration will not negatively impact your SEO rankings or organic traffic. Maintaining server response speeds and resolving any post-migration crawl errors quickly protects your existing search engine index.

Q. What should I do if I see an “Error Establishing a Database Connection”?

This error indicates that WordPress cannot connect to MySQL using the parameters stored in wp-config.php. To fix it:

  1. Open wp-config.php and verify that DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST match your destination server credentials.

  2. Ensure your database user is assigned to the database with ALL PRIVILEGES.

  3. Verify that the MySQL database service is running on your destination web host.

Q. Why is a manual migration better than using a migration plugin?

While plugins work well for small, simple sites, manual migration gives you complete control over raw files and database exports. It eliminates server execution timeouts, memory limit crashes, and incomplete file transfers making it the safest method to migrate your wordpress website when dealing with large databases or high-traffic blogs.