How to Do a WordPress Migration Without Downtime
Moving a WordPress site to a new host can feel scary. What if the site goes down, emails stop working, or you lose orders and comments during the move? The good news is that a WordPress migration without downtime is very achievable if you follow the right order of steps. The secret is simple: build and test the site on the new server first, and only switch traffic when everything is ready.
This step-by-step guide shows you how to migrate WordPress to a new host with zero or near-zero downtime. It works for blogs, business sites and WooCommerce stores, and it is written in plain English for beginners.
Why Websites Go Down During Migration
Downtime usually happens for one of these reasons:
- The old hosting is cancelled before the new site is fully working.
- DNS is changed before the site is copied and tested.
- Files or the database are copied incompletely.
- Site URLs are wrong, causing redirect loops or broken pages.
- SSL certificates are not ready on the new host, so visitors see security warnings.
- Email records (MX) are lost when DNS moves, so emails stop arriving.
Every step below is designed to avoid these problems.
Before You Start: Migration Checklist
- Your new hosting account is active. Not sure which host to pick? See our guide to choosing WordPress hosting.
- You have login details for your old host, new host, domain registrar and WordPress admin.
- You know where your DNS is managed (your registrar, your host or a service like Cloudflare).
- You have a recent full backup. Follow our automatic website backup guide if you do not.
- Do not cancel your old hosting yet. Keep it until at least a week after the move.
Step 1: Lower Your DNS TTL a Day in Advance
TTL (time to live) controls how long internet providers cache your DNS records. If it is set to several hours, some visitors may keep seeing the old server long after you switch. One or two days before the move, set the TTL on your main A record (and www record) to a low value, such as 300 seconds (5 minutes). When you later switch to the new server, the change will spread much faster.
Step 2: Take a Full Backup
Back up both parts of your WordPress site:
- Files: everything in your WordPress folder, especially
wp-content(themes, plugins, uploads) andwp-config.php. - Database: all your posts, pages, settings, users, comments and orders.
Download a copy to your computer or cloud storage. This is your safety net if anything goes wrong.
Step 3: Choose Your Migration Method
Option A: Your new host’s free migration service or tool
Many hosts offer free migrations or a migration plugin. This is often the easiest path for beginners. Check your new host’s dashboard first.
Option B: A migration plugin
Plugins like Duplicator, All-in-One WP Migration, Migrate Guru and UpdraftPlus can package your whole site and restore it on the new server. Large sites may need a paid version or a plugin that transfers directly between servers.
Option C: Manual migration
Copy files with SFTP or the file manager, export the database with phpMyAdmin or WP-CLI, import it on the new host, and update wp-config.php. This gives you the most control and is best if you are comfortable with technical tools. The official WordPress migration documentation explains the manual process in detail.
Step 4: Copy Your Site to the New Server
Using your chosen method, copy all files and the database to the new host. Keep the same domain name. At this point, your live site is still running on the old server, so visitors see no change.
If you migrate manually, create a new database and user on the new host, import your database, upload your files, and update the database name, username, password and host in wp-config.php.
Step 5: Test the Site on the New Server Before Switching DNS
This is the most important step for zero downtime. You need to see the site on the new server while the rest of the world still sees the old one. There are two common ways:
- Edit your hosts file. On your computer, add a line to your hosts file that points your domain to the new server’s IP address. Your browser will load the new server, while everyone else still sees the old one. Remove the line after testing.
- Use a temporary URL or preview link from your new host. Many hosts provide one for exactly this purpose.
Now test everything:
- Homepage, key pages and recent posts load correctly.
- Images and media display.
- You can log in to WordPress admin.
- Menus, forms and search work.
- Permalinks work (if not, go to Settings then Permalinks and click Save).
- For WooCommerce: product pages, cart and checkout work in test mode.
- No mixed content or PHP errors.
Step 6: Set Up SSL on the New Host
Make sure an SSL certificate is ready on the new server so your site loads on HTTPS without warnings the moment DNS switches. Many hosts issue free Let’s Encrypt certificates automatically, but some need DNS pointing to them first. If you use Cloudflare’s proxy, SSL can be handled at Cloudflare’s edge so there is no gap. See our Cloudflare for WordPress setup guide.
Step 7: Freeze Changes on the Old Site
Any new content, comments or orders added to the old site after you copied it will not exist on the new server. To avoid losing anything:
- For blogs: avoid publishing or editing during the switch, and temporarily close comments if needed.
- For stores and membership sites: schedule the switch for your quietest time. If the site is busy, do a final database sync right before switching DNS, or briefly enable a short maintenance window for checkout only.
Step 8: Switch DNS to the New Server
Update your domain’s A record (and www record) to point to the new server’s IP address. If you change nameservers instead, make sure every existing record, especially email (MX, SPF, DKIM, DMARC), is recreated at the new DNS provider first.
Because you lowered the TTL in Step 1, most visitors will reach the new server within minutes. Both servers have the same site, so visitors see your site either way. That is how you get zero downtime.
Step 9: Check Everything After the Switch
- Visit your site from different devices and networks, including mobile data.
- Use an online DNS checker to see that the new IP has spread worldwide.
- Test forms, logins, checkout and emails.
- Clear caches in your caching plugin, CDN and browser.
- Check Google Search Console for crawl errors over the next few days. New to it? See our Search Console beginner’s guide.
- Run a speed test. If something feels slow, use our checklist to speed up a slow WordPress site.
Step 10: Keep the Old Host for a Week, Then Cancel
Keep your old hosting active for at least a week. Some visitors may still be cached on the old server for a short time, and you have a fallback if something unexpected appears. Once you are confident, download a final backup from the old host and cancel. Then raise your DNS TTL back to a normal value.
Changing Your Domain at the Same Time?
If you are also moving to a new domain name, there are extra steps: update all URLs in the database with a proper search-and-replace tool (one that handles serialized data), set up 301 redirects from every old URL to the matching new URL, and use the Change of Address tool in Google Search Console. Avoid changing host, domain and design all at once if you can. Fewer changes at once make problems easier to find.
WordPress Migration Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| “Error establishing a database connection” | Wrong database details | Check database name, user, password and host in wp-config.php |
| Pages show 404 errors | Permalinks or .htaccess missing | Re-save permalinks; check .htaccess was copied |
| Images missing | Uploads folder not fully copied | Copy wp-content/uploads again |
| Redirect loop | Wrong site URL or SSL settings | Check siteurl and home values; check SSL mode in Cloudflare |
| Security warning in browser | SSL not issued yet | Issue SSL on new host or use Cloudflare |
| Emails stopped | MX records lost | Recreate email DNS records |
| White screen | PHP version or plugin conflict | Match PHP version; disable plugins to find the culprit |
Security After Migration
A migration is a good moment to tighten security. Change your WordPress admin passwords, turn on two-factor authentication, remove any old backup files or migration packages left on the server, and delete unused plugins and themes. Make sure automatic backups are running on the new host from day one.
Special Tips for WooCommerce Stores
Online stores need extra care because orders, stock levels and customer accounts change constantly. A few extra steps keep you from losing sales:
- Pick a quiet time. Check your analytics for the hour with the fewest orders, often late at night in your main market.
- Do a final database sync. Copy the database one last time right before switching DNS, so the newest orders and stock levels move across.
- Pause scheduled tasks. Subscription renewals, abandoned cart emails and stock syncs can run on both servers during the switch. Pause them briefly or make sure only one server runs them.
- Check payment webhooks. Payment providers like Stripe and PayPal send notifications to your site. Make sure they reach the new server and that test payments complete.
- Compare order numbers. After the switch, compare the newest order on the old and new servers. If any orders landed on the old server during the change, add them manually.
Using WP-CLI for Faster Migrations
If your hosts support SSH, WP-CLI makes manual migrations much faster and more reliable. You can export the database with wp db export, import it with wp db import, and safely update URLs with wp search-replace, which correctly handles serialized data. Combined with rsync for copying files, it can move large sites in minutes rather than hours.
Frequently Asked Questions
How long does a WordPress migration take?
Small sites can be migrated in an hour or two. Larger sites with big media libraries or databases may take several hours. DNS changes usually spread within minutes to a few hours when TTL is lowered in advance.
Will migrating WordPress hurt my SEO?
Not if you keep the same domain and URLs, avoid long downtime and keep your site fast. Google simply crawls the same pages on a new server.
What is the best WordPress migration plugin?
Duplicator, All-in-One WP Migration, Migrate Guru and UpdraftPlus are all popular. Many hosts also offer free migration tools or services, which are often the easiest option.
Can I migrate WordPress myself?
Yes. Most site owners can migrate a typical WordPress site using a plugin and the steps in this guide. Larger stores or complex setups may benefit from professional help.
Final Thoughts
A WordPress migration without downtime comes down to order: lower TTL, back up, copy, test on the new server, set up SSL, then switch DNS and keep the old host as a safety net. Take your time with testing, and the move will be invisible to your visitors.







One Comment