How to Migrate a WordPress Site Between Hosts Without Downtime
Step-by-step WordPress migration guide with backups, staging, DNS cutover, and rollback planning to avoid downtime.
Migrating a WordPress site should feel like a controlled release, not a leap of faith. If you plan the move correctly, you can shift files, move the database, test on staging, and cut over DNS with little to no user-visible interruption. The practical goal is not simply to “move a site”; it is to preserve content integrity, avoid data loss, and keep logins, forms, and checkout flows working during the transition. For teams that need a repeatable process, this guide functions like a runbook, similar to how you’d structure an operational workflow in our guide on support team triage or an internal change process inspired by enterprise automation for large directories.
This article focuses on a zero-downtime mindset: build a complete backup, export and import the database, validate the clone in staging, switch traffic with a DNS strategy that reduces propagation surprises, and keep a rollback plan ready. If you treat the migration like a production change, much of the risk disappears. That same discipline shows up in other technical playbooks like hosting workload architecture planning, where resource constraints are handled systematically instead of reactively. For teams managing multiple websites, this also becomes a documentation pattern you can reuse, much like the operational checklists found in implementation guides for repeatable deployments.
1) Define the Migration Scope Before You Touch Anything
Inventory what is actually moving
Start by listing every component of the WordPress environment: the WordPress core files, wp-content uploads, themes, plugins, database, cron jobs, object cache, SSL certificate, email routing, and any external services such as CDN, SMTP, or payment gateways. A migration is rarely just copying files from one server to another, especially if the site has forms, memberships, or custom post types. This inventory step reduces the chance that you forget one dependency and discover it after launch. Think of it like a change window checklist, similar to how project teams cost hidden dependencies in budget planning guides or metrics-driven operational planning.
Choose your migration method
You generally have three methods: manual migration using FTP and database export/import, plugin-assisted migration, or host-to-host cloning tools. Manual migration gives the most control and is the best choice when you need to understand exactly what is happening at each step. Plugin-based migration can be faster for smaller sites, but it may struggle with very large databases, serialized data, or environments with strict permissions. If you are deciding whether to repair an existing stack or replace it altogether, the same basic logic applies as in repair vs replace decision-making.
Establish a rollback threshold
Before the migration begins, define what “failure” means. Common rollback triggers include missing images, plugin conflicts, broken permalinks, failed logins, checkout errors, or any material increase in 5xx responses after cutover. A good rollback plan is not pessimistic; it is a sign that the migration is controlled. This is the same mindset used when planning a risky operational move in travel insurance planning or choosing safer paths in route selection under unstable conditions—you predefine contingencies before the event starts.
2) Build a Verified Backup You Can Actually Restore
Create both file and database backups
Your backup must include the full WordPress filesystem and the database. At minimum, the filesystem should contain wp-admin, wp-includes, wp-content, and root configuration files like .htaccess or nginx snippets if applicable. The database contains posts, pages, settings, users, menus, plugin data, and site URLs, so if it is incomplete the site may load but still be broken. For a high-confidence backup process, pair a file archive with a database dump, then verify file sizes and dump integrity before proceeding. This kind of operational discipline mirrors how teams think about forecasting and backup inventory: the asset is only useful if it is complete and available when needed.
Use a repeatable backup workflow
If your host offers snapshots, use them, but do not rely on snapshots alone. Host snapshots are useful for fast rollback, yet they may not capture application-level consistency if a database write is in progress. A safer approach is to place the site in maintenance mode briefly, flush caches, export the database, and then archive files. For small teams, documenting this as a standard operating procedure prevents the “we’ll remember next time” trap. That’s the same reason structured process documentation matters in large directory management and other repeatable ops workflows.
Test the backup before trusting it
A backup that has never been restored is an assumption, not a safety net. Spin up a temporary local environment or staging server and import both the files and database there. Confirm that the site loads, the admin login works, and the media library is intact. If you discover broken serialization, corrupt uploads, or a missing table, fix it before the migration window, not during it. This is the same trust-but-verify principle used in engineering validation workflows, where outputs are checked before they reach production.
3) Prepare the Destination Host Like a Production Environment
Match server requirements first
Before moving any data, confirm that the new host matches or exceeds the source environment for PHP version, MySQL/MariaDB version, memory limits, upload limits, and file permissions. Many WordPress migrations fail not because the files are wrong, but because the destination server is subtly incompatible. The safest approach is to compare settings line by line and resolve differences before the import. A host migration is easier when the infrastructure baseline is stable, much like the considerations in memory-constrained hosting strategy.
Set up SSL, caching, and email
Install SSL early so the staging and production environments behave like the final site. If the source site uses a caching plugin, server-side cache, Redis, or a CDN, configure the new host to mimic those behaviors as closely as possible. Email is often overlooked; a site can appear healthy while contact forms silently fail because SMTP credentials were not migrated. The safest pattern is to stage the mail setup before DNS cutover so forms can be tested with real message delivery. When teams standardize this kind of technical setup, they follow the same logic as professionals in practical implementation guides.
Build a staging clone with a separate URL
Never validate a migration directly on the production domain if you can avoid it. Use a staging domain, a subdomain, or host file overrides so you can test the destination site without public traffic. This allows you to log into WordPress, inspect links, review theme assets, and make edits without affecting visitors. Good staging is essentially a dress rehearsal, similar to the way teams rehearse live events in live event playbooks or preflight major launches with tight coordination.
4) Export the WordPress Database Correctly
Export using the right tool and options
For most migrations, use phpMyAdmin, the command line, or a host panel database tool to export the database as SQL. Command-line exports are often more reliable for larger sites because they avoid browser timeouts and give better control over compression and encoding. Include all tables, preserve structure and data, and make sure your export uses UTF-8 or the same character set as the original database. A clean export is the center of the entire WordPress migration process, because every page, setting, and user record depends on it.
Handle serialized data carefully
WordPress stores many values as serialized PHP arrays, especially in plugin and theme options. If you change the site URL in the database with an unsafe find-and-replace, you can corrupt serialized strings and break widgets, menus, or page builder layouts. Use a migration tool or script designed to update serialized data safely, or perform the URL replacement after import with a serialization-aware utility. This kind of precision is similar to the data integrity concerns in vetting generated metadata—the structure matters as much as the content.
Update URLs only when appropriate
If you are moving from one host to another but keeping the same domain, you may not need to replace URLs in the database at all. In that case, the site should continue to reference the same domain after DNS switches over. If you are also changing domains, you will need a careful search-and-replace strategy, plus additional updates to hardcoded links in theme files or plugin settings. For broader move planning, it helps to understand the mechanics of structured transitions between systems, where each dependency must be recertified.
5) Move the Files with FTP, SFTP, or Host-Level Tools
Transfer the full WordPress filesystem
Use SFTP, rsync, or a host migration tool to copy the WordPress files to the destination server. Make sure the wp-content folder is fully transferred because it contains themes, plugins, uploads, and caches that define the appearance and behavior of the site. If you are moving a larger installation, rsync is usually more efficient than dragging files through a browser-based FTP client, especially when repeated retries are likely. But if FTP is your only option, verify that hidden files such as .htaccess transfer correctly. For a practical view of why file handling matters in technical setups, see our guide on reliable accessories and connectors—small details often prevent bigger failures.
Preserve permissions and ownership
WordPress can fail in strange ways if file permissions are too restrictive or too open. Uploaded images may not show, plugin updates may fail, or the admin may be unable to write cache files. As a rule, directories usually need 755 and files 644, but the exact settings can vary by hosting stack. If your host requires a specific user/group ownership model, follow their documentation precisely so the app can write where it should and nowhere else.
Confirm configuration files and paths
Check wp-config.php and any server-level configuration to ensure database credentials, table prefixes, and salts are correct. If the destination server uses a different document root or PHP-FPM path, adjust server settings accordingly. A site that looks “copied” but still points at the old environment will fail in subtle ways, including wrong asset paths or caching references. The same attention to configuration detail appears in SDK selection and runtime setup, where a correct foundation determines whether the system works at all.
6) Import the Database and Reconnect the Site
Import in a clean target database
Create an empty database on the new host before importing. This avoids table collisions and makes troubleshooting much simpler if you need to retry the import. Once the SQL dump is loaded, confirm that all expected tables exist: wp_posts, wp_postmeta, wp_options, wp_users, wp_terms, and any plugin-specific tables. If the import stops halfway through, inspect server limits and import size before attempting again. In many migration runbooks, database import is where patience matters most.
Update wp-config.php and credentials
Once the database is imported, update the destination wp-config.php file with the new database name, username, password, and host. If your source site used custom security keys or table prefixes, preserve them unless you have a reason to rotate. Do not assume that a successful import means the site can connect cleanly; one typo in the credentials can keep the site down even though every file is present. This operational caution is analogous to how teams maintain reliability in leadership and process ownership—clarity in accountability prevents avoidable failures.
Repair URLs, permalinks, and site settings
After import, verify the WordPress Address and Site Address in General Settings. If needed, update them carefully so both the front end and admin resolve correctly in staging. Then visit Settings → Permalinks and save the structure again to flush rewrite rules. This simple step fixes a surprising number of 404 issues after migration because Apache or Nginx routing often needs a refresh. If you are handling repeated operational changes like this, a playbook mentality similar to support queue standardization is a major time saver.
7) Verify the Staging Copy Thoroughly Before Cutover
Test the front end and key templates
Do not limit testing to the homepage. Review the blog index, single posts, category archives, contact forms, search pages, and any custom templates. Media-heavy websites should inspect image resizing, lazy loading, and responsive layouts on multiple breakpoints. If the theme depends on JavaScript bundles or CDN assets, test them with cache disabled once and with cache enabled once. This is similar to evaluating products or systems in the real world, not just in a demo, as in value comparison analysis.
Test the admin and workflows
Log into wp-admin and confirm you can edit posts, upload images, install plugins if allowed, and save settings. Then test any business-critical workflow such as lead forms, WooCommerce checkout, membership login, password reset, or newsletter sign-up. If the site uses advanced plugins, verify that scheduled tasks and webhook callbacks work as expected. A migration is only successful if the business process survives the move, not just if the page HTML appears intact.
Benchmark performance and debug errors
Compare the new host to the old one on page load time, TTFB, and database responsiveness. A successful migration can still be a bad migration if the new environment is too slow or if caching is misconfigured. Inspect error logs, PHP warnings, and browser console output for plugin compatibility issues. If you want a more systematic way to track “good enough” migration quality, borrow the idea of measurable milestones from KPI-driven operations.
8) Plan DNS Cutover to Reduce Propagation Risk
Lower TTL well before the switch
DNS propagation is the main reason people think migrations require downtime. In reality, propagation is just cached resolution obeying TTL values, so the trick is to reduce those values early enough. Lower the TTL on the current DNS records at least 24 to 48 hours before cutover so resolvers expire the old record faster. This does not eliminate propagation, but it makes the transition significantly more predictable. Think of it as the digital equivalent of narrowing the handoff window in logistics planning for unstable regions: smaller uncertainty, fewer surprises.
Choose a cutover method
The best cutover method depends on your host and DNS provider. For most sites, update the A record or CNAME to point to the new host once staging checks are complete. If you need near-instant control, some teams use a temporary hosts-file override for final verification before making the public DNS change. For sites with heavy traffic or e-commerce, schedule the switch during the lowest-traffic window and monitor live traffic and errors closely for the first hour.
Use a migration window checklist
Your checklist should include cache purging, SSL verification, CDN refresh, database backup, DNS record update, and smoke tests from different networks. Keep the old host active for a few days if possible, so anyone still resolving the previous IP can continue to reach the site. The reason this matters is simple: DNS caching is inconsistent across ISPs and devices, which means users may not all see the new server at the same moment. This is why a no-downtime migration is really a staged transition, not a single event.
| Migration Task | Recommended Approach | Why It Matters | Common Failure Mode | Rollback Option |
|---|---|---|---|---|
| File backup | Archive wp-content and config files | Preserves themes, plugins, and uploads | Missing media or theme files | Restore archive from source host |
| Database export | Use SQL dump with UTF-8 | Captures posts, users, and settings | Corrupt serialized data | Re-import original dump |
| Staging verification | Clone to isolated URL | Tests real behavior before public launch | Broken permalinks or forms | Keep staging live, fix and retest |
| DNS cutover | Lower TTL then update records | Reduces propagation delay | Traffic split across hosts | Point DNS back to old host |
| Post-cutover monitoring | Watch logs and metrics for 24-72 hours | Catches hidden issues early | Timeouts, 404s, SSL errors | Revert DNS and restore backup |
9) Roll Out a Safe Rollback Plan
Keep the source host intact
Do not decommission the old host on migration day. Leave the original site running, with its code and database unchanged, until the new environment has proven stable. If something breaks after DNS changes, the old host becomes your fastest path back to service. This is one of the strongest principles in operational risk management: never remove the fallback before the replacement has survived real traffic. That principle shows up repeatedly in resilient systems design and in practical guides like job-security planning under uncertainty, where adaptability protects outcomes.
Decide when to rollback
Rollback should be automatic if certain core functions fail. For example, if logins fail, checkout is broken, database writes are missing, or analytics and forms stop working, reverting DNS may be safer than extended debugging on a live site. Document who can authorize rollback, who executes it, and what diagnostic evidence is required before and after the reversal. The goal is to make rollback boring and fast, not emotional and improvised.
Validate the rollback itself
After a rollback, verify that the old host is serving traffic cleanly and that DNS is pointing where expected. Clear caches at the origin, CDN, and browser level if necessary. Then capture the issue summary and update your migration notes so the next attempt is stronger. Teams that treat this as a learning loop improve quickly, much like those who build process memory into their documentation systems and avoid repeating the same mistakes.
10) Troubleshoot the Most Common WordPress Migration Problems
Database connection and white screen issues
If you see “Error establishing a database connection,” check credentials, database hostnames, and whether the user has privileges on the new database. A white screen of death often points to a PHP fatal error, plugin conflict, memory limit problem, or theme incompatibility. Enable WordPress debugging temporarily, inspect the error logs, and disable plugins if needed by renaming the plugin directory. Migration troubleshooting is faster when you isolate layers one by one instead of changing five variables at once.
Broken images, missing CSS, or mixed content
Missing images typically mean file transfer gaps or incorrect upload paths. If the site was moved between domains or protocols, mixed content errors may appear when some assets still load over HTTP instead of HTTPS. Search the database for old URLs carefully, but only with a serialization-safe tool. For visual debugging habits, it helps to adopt the same precision seen in app evaluation guides, where each component is checked against a clear standard.
Plugin conflicts and cache problems
After migration, disable caching and optimization plugins first if the site behaves strangely. Aggressive minification can hide the real issue and make debugging harder. Then re-enable plugins one at a time until you identify the conflict. If a plugin depends on host-specific settings, ensure the new environment supports the same PHP extensions, cron behavior, and file permissions. Many migrations succeed technically but fail operationally because caches were never purged.
11) Special Cases: Domain Transfer, Multisite, and E-Commerce
When the domain changes too
If the move includes a domain transfer, the hosting migration and domain transfer should be treated as separate projects, even if they happen close together. Update the database URLs, check redirects, and preserve canonical tags so search engines understand the new structure. You should also verify DNS for mail, SPF, DKIM, and DMARC, because email delivery often fails during domain changes before website traffic does. This is where a disciplined runbook matters just as much as the technical work.
WordPress multisite migration
Multisite adds complexity because uploads, site tables, and domain mapping can behave differently from a single-site install. Validate the network admin, subsites, and mapped domains individually. If the network is large, test a subset first to ensure the import and rewrite rules work correctly. A multisite move is more like a platform migration than a simple site copy, and it needs extra verification.
WooCommerce and transaction safety
For stores, pause order writes during the final cutover window if possible, or synchronize orders carefully after the move. Test cart, checkout, payment gateway callbacks, webhook endpoints, and order emails. Even a few minutes of inconsistency can matter if users place orders while the database is transitioning. In commerce-heavy setups, the migration has to protect state transitions as much as page rendering.
Pro tip: Keep a “migration freeze” note in your project doc that lists the exact time content updates stopped on the source host. That single timestamp makes database reconciliation, order tracking, and rollback decisions much easier.
12) Post-Migration Cleanup and Documentation
Run a final production audit
Once the new host is live, scan for broken links, verify SSL, check search visibility, and confirm analytics and tag manager scripts fire correctly. Review server logs for 404s and PHP warnings during the first 24 to 72 hours. If your site has structured data, test it again after cutover because URL changes can affect schema output. Production validation is where you turn a technical migration into a trustworthy release.
Document what changed
Record the source host, destination host, migration date, DNS TTL settings, backup locations, database export method, and any issues discovered. Include the exact steps that worked and the steps that failed. The next migration will be much faster if the team can reuse this knowledge. This kind of living documentation is valuable in the same way as operational handbooks for usage-data decision making or trust-validated engineering processes.
Retire the old environment safely
When you are sure the new site is stable, back up the old host one final time, export logs if needed, and then decommission it according to your retention policy. Verify that domain records, SSL certificates, cron jobs, and scheduled backups are now running only on the new environment. Clean retirement avoids hidden billing and reduces confusion later if someone tries to use the old server by accident. A neat handoff is part of operational maturity.
FAQ: WordPress migration without downtime
How long does DNS propagation take?
Propagation varies by TTL, ISP caching, and browser behavior. If you lower TTL in advance, most users will reach the new host faster, but some caches can still hold the old record for hours. That is why keeping the old host online temporarily remains a smart safeguard.
Can I migrate a WordPress site while it stays live?
Yes. The safest pattern is to copy files and database to a staging environment first, then freeze content changes briefly during the final sync and DNS cutover. That approach keeps downtime minimal and usually imperceptible to end users.
What is the biggest mistake during migration?
The biggest mistake is assuming a file copy equals a complete migration. Missing serialized data handling, failing to test forms, and neglecting rollback planning are more common problems than the actual transfer itself.
Should I use a plugin or do it manually?
Small sites can often use a plugin successfully, but manual migration gives more control and is easier to troubleshoot when something goes wrong. If the site is large, complex, or business-critical, manual or host-assisted migration is usually safer.
What if the new host is slower than the old one?
Check caching, PHP version, database performance, image optimization, and CDN behavior. A successful migration should preserve or improve performance; if it does not, you may need to tune the new stack before fully committing.
How do I know it is safe to delete the old host?
Wait until the site has been stable through at least one traffic cycle, confirm no rollback triggers occurred, and make a final archive of the old environment. Only then should you shut it down and remove redundant services.
Migration Checklist Summary
Use this condensed sequence as your execution order: inventory the site, back up files and database, prepare the new host, import database, move files, validate staging, lower TTL, cut over DNS, monitor live traffic, and keep rollback ready. If you follow those steps with discipline, a WordPress migration becomes a controlled release instead of a weekend fire drill. That is the value of a clear manual: fewer surprises, less downtime, and far better confidence in the result. The best teams build these steps into their operating docs the same way they standardize other technical workflows, from scaling collaborative toolchains to enterprise adoption playbooks.
Related Reading
- A Modern Workflow for Support Teams - Learn how to standardize triage and reduce avoidable operational noise.
- Trust but Verify: How Engineers Should Vet LLM-Generated Metadata - A practical reminder that validation matters before production changes.
- Architectural Responses to Memory Scarcity - Useful context for evaluating hosting constraints and capacity planning.
- Transforming Account-Based Marketing with AI - A structured implementation mindset you can apply to migrations and other ops work.
- Building the Perfect Sports Tech Budget - A good example of accounting for hidden project costs before you start.
Related Topics
Evan Mercer
Senior Technical Editor
Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.
Up Next
More stories handpicked for you