Complete Migration Guide
How to Move WordPress to a New Host: Zero Downtime Migration
Copy your files, migrate your database, switch hosts — without your site going dark for a single minute
📋 What’s in this guide
- How Zero Downtime Migration Works
- Plugin vs. Manual: Which to Use
- Before You Start: Prep Checklist
- Method 1: Migrate with a Plugin
- Method 2: Manual Migration
- Test Your Site Before Switching DNS
- Switch Your Domain to the New Host
- Post-Migration Checklist
- Troubleshooting Common Issues
- When Your New Host Migrates for You
Moving a WordPress site to a new host is one of the most common tasks in web hosting — and one of the most anxiety-inducing. You have a live site with real visitors, real content, and possibly real revenue. The idea of it going dark while you fumble with FTP clients and database exports is stressful enough to make people stay at a bad host for years longer than they should.
Here’s the truth: a properly executed WordPress migration involves zero downtime. Your old site stays live and fully functional the entire time you’re setting up the new one. You only flip the switch — pointing your domain to the new host — after you’ve confirmed everything is working perfectly. If something goes wrong at any point before the switch, your visitors never notice because they’re still on the old host.
This guide walks through both the plugin method (faster, recommended for most people) and the manual method (more control, useful when plugins fall short). By the end, you’ll know exactly what to do, in what order, and how to verify it worked.
1. How Zero Downtime Migration Works
The key to migrating without downtime is understanding that you’re doing this in two completely separate phases — and the old site stays online through both of them.
🔄 The Zero Downtime Migration Flow
The process has three phases. In Phase 1, you copy all your WordPress files and database to the new host — your old site is completely untouched. In Phase 2, you preview and test the new site using a temporary URL or a local hosts file tweak, without affecting what real visitors see. Only in Phase 3 do you update DNS, and at that point you already know the new site is working perfectly.
Keep your old hosting account active for at least one week after the DNS switch. It’s your safety net — if anything goes wrong after the switch, you can point the domain back and lose nothing.
2. Plugin vs. Manual: Which Method to Use
There are two ways to migrate a WordPress site: using a migration plugin, or doing it manually with FTP and phpMyAdmin. Here’s how to choose.
Duplicator or All-in-One WP Migration
Packages your entire site into one file, transfers it, and handles the database search-and-replace automatically. Takes 20–45 minutes. No FTP or SQL knowledge needed. Best for: most shared hosting migrations, non-technical users, and sites under ~2GB.
FTP + phpMyAdmin + wp-config.php
Export database via phpMyAdmin, transfer files via FTP, update config manually. More steps, but no file size limits and no plugin dependencies. Best for: large sites over 2GB, developer workflows, or when plugins fail due to server restrictions.
If your site is under 2GB and you’re on standard shared or VPS hosting, use Duplicator (free) or All-in-One WP Migration. They handle 95% of migrations without a hitch. Only switch to the manual method if a plugin fails or your host has restrictions that prevent it.
3. Before You Start: Prep Checklist
Five minutes of preparation here saves hours of troubleshooting later. Don’t skip this section.
What You’ll Need
- Your new hosting account — active and accessible, with your domain added to it
- FTP/SFTP credentials for both your old and new host — find these in your control panel under FTP Accounts
- Database credentials for your new host — you’ll need to create a new MySQL database in cPanel before importing (covered in Method 2)
- Admin access to your WordPress dashboard on the old site
- An FTP client if doing manual migration — FileZilla is free and excellent
Do This Before Anything Else
- Run a fresh backup right now. Even if you have automated backups, take a manual one immediately before starting. Use UpdraftPlus (free) to back up both files and database to Google Drive or Dropbox.
- Note your current PHP version — check it in your old host’s control panel (usually under “PHP Manager” or “MultiPHP”). Your new host should match or exceed it to avoid plugin/theme compatibility issues.
- Deactivate caching plugins on your old site — WP Rocket, W3 Total Cache, LiteSpeed Cache, etc. Caching can interfere with migration plugins and create stale data in the database export. Re-enable after migration.
- Note any custom wp-config.php changes — if you’ve added custom constants, debug settings, or security keys to wp-config.php, keep a copy handy.
Keep your old hosting active throughout the entire migration and for at least 7 days after pointing DNS to the new host. You need it as a live backup, and you also need it to stay live while DNS propagates — some visitors will still hit the old server for up to 48 hours after you switch.
4. Method 1: Migrate with a Plugin
This is the recommended approach for most users. We’ll use Duplicator (free version) as it’s the most widely used and reliable migration plugin. All-in-One WP Migration works similarly if you prefer it.
Install and run Duplicator on your old site
In your old WordPress dashboard, go to Plugins → Add New, search for “Duplicator,” install and activate it. Then navigate to Duplicator → Packages → Create New. Give the package a name, click Next, let the scanner run (address any warnings it flags), then click Build. When it’s done, download both the Installer file (installer.php) and the Archive file (your-site_date_archive.zip).
Upload both files to your new host
Connect to your new host via FTP (using FileZilla or your host’s File Manager in cPanel). Navigate to the public_html directory (or the folder that corresponds to your domain — check your host’s welcome email if unsure). Upload both the installer.php and the archive .zip file there. Make sure the folder is otherwise empty — delete any default index.html files your host may have placed there.
Create a new database on your new host
Log in to your new host’s cPanel and open MySQL Databases. Create a new database, create a new database user, set a strong password, and then add that user to the database with All Privileges. Write down the database name, username, and password — you’ll need them in the next step.
Run the Duplicator installer
In your browser, visit http://your-new-host-temp-url.com/installer.php — use your new host’s temporary domain (found in your cPanel or hosting welcome email) rather than your real domain, since it hasn’t been pointed yet. Duplicator’s installer will walk you through the setup. On the database step, enter the credentials you just created. Duplicator will extract your files and import your database automatically.
Most hosts provide a temporary URL that lets you access a site before DNS is switched. In cPanel it’s often shown as an IP-based URL or under “Domains.” Examples: server123.hostname.com/~username or an IP address like 185.220.101.45/~yoursite. Ask your host’s support if you can’t locate it.
Complete the installer and log in
Follow Duplicator’s remaining steps. It will update your WordPress database with the new site URL. When it’s done, click the link to log in to your WordPress admin on the new host. Use your existing WordPress username and password — Duplicator migrated your user accounts too. Delete the installer.php and archive files via FTP once you’re logged in successfully.
5. Method 2: Manual Migration
The manual method takes more steps but gives you complete control and has no file size limits. It’s also a great process to understand even if you plan to use a plugin — knowing what’s actually happening makes troubleshooting much easier.
Export your database from the old host
Log in to your old host’s cPanel and open phpMyAdmin. Select your WordPress database from the left sidebar. Click the Export tab at the top. Choose “Quick” export method and “SQL” format. Click Go. Save the .sql file to your computer.
Export method: Quick Format: SQL Output: Save output to a file Compression: None (or gzipped for large DBs)
Download all WordPress files via FTP
Connect to your old host via FTP using FileZilla (or your preferred client). Navigate to the root of your WordPress installation — typically public_html. Select everything and download it to a folder on your computer. This includes wp-admin, wp-content, wp-includes, and all root files including wp-config.php. For a typical site this takes 5–30 minutes depending on your site size and connection speed.
Create a new database on your new host
In your new host’s cPanel, open MySQL Databases. Create a new database, a new database user with a strong password, and grant that user All Privileges on the database. Note the database name, username, password, and database host (usually localhost).
Import your database to the new host
In your new host’s cPanel, open phpMyAdmin. Select your newly created (empty) database from the left sidebar. Click the Import tab. Click “Choose File” and select the .sql file you exported. Click Go. The import will run and populate your new database with all your posts, pages, settings, and user data.
If your .sql file is large (over 50MB), phpMyAdmin may time out. In that case, use BigDump (a free script for large SQL imports) or ask your host to increase the max upload size temporarily.
Upload your WordPress files to the new host
Connect to your new host via FTP and navigate to the public_html directory for your domain. Upload all the files you downloaded in Step 2. This is usually the longest step — for a site with lots of images, it can take 30 minutes to several hours.
Update wp-config.php with new database credentials
Open the wp-config.php file in a text editor. Update these four lines with the new database credentials from Step 3:
// Database name define( 'DB_NAME', 'your_new_db_name' ); // Database username define( 'DB_USER', 'your_new_db_user' ); // Database password define( 'DB_PASSWORD', 'your_new_db_password' ); // Database host (usually localhost) define( 'DB_HOST', 'localhost' );
Save the file and upload it back to the new host via FTP, overwriting the existing version.
Run a search-and-replace on the database
Your WordPress database contains your old site’s URL stored in dozens of places — in post content, option values, widget settings, and more. These need to be updated to the new URL. The safest way to do this is with the WP-CLI search-replace command or the Better Search Replace plugin (free).
If using Better Search Replace: install it on your new WordPress installation, then search for your old domain (http://oldsite.com) and replace with the new temporary URL or the same domain (you’ll run it again after DNS if needed). Make sure to run it on all tables and check “Run as dry run” first to preview the changes before committing.
wp search-replace 'http://oldsite.com' 'http://newsite.com' --all-tables6. Test Your Site Before Switching DNS
This is the step most guides gloss over — and it’s arguably the most important one. Before you point your real domain to the new host, you need to verify the migrated site looks and works correctly. Here’s how to do that without affecting any real visitors.
Option A: Use Your Host’s Temporary URL (Easiest)
Most hosts give you a temporary URL to access your site before DNS is switched. Access the new site through this URL and click through your pages, test forms, check that images load, and confirm the admin dashboard works. The limitation is that WordPress hardcodes your real domain in many places, so some links may redirect you back to the old site — which is normal at this stage.
Option B: Edit Your Hosts File (Most Thorough)
This is the gold standard for pre-migration testing. Editing your hosts file tells your specific computer to look up your domain at the new host’s IP address, while everyone else on the internet still sees the old host. You’re previewing the new site through your real domain — which means all internal links, WordPress settings, and SSL work exactly as they will post-migration.
1. Find your new host's IP address (in cPanel or from support) 2. Open your hosts file: Mac/Linux: /etc/hosts (use: sudo nano /etc/hosts) Windows: C:\Windows\System32\drivers\etc\hosts (open Notepad as Administrator) 3. Add this line at the bottom: 185.220.101.45 yourdomain.com 185.220.101.45 www.yourdomain.com 4. Save the file and flush DNS cache: Mac: sudo dscacheutil -flushcache Windows: ipconfig /flushdns 5. Open your browser and visit yourdomain.com — you are now seeing the NEW host. 6. Remove these lines after testing is complete.
What to Test
- Homepage loads correctly with all images and styles
- Navigate 5–10 pages including blog posts, a category page, and any custom post types
- Log in to the WordPress admin dashboard (yourdomain.com/wp-admin)
- Check that all plugins and theme settings are intact
- Submit a contact form and confirm it sends
- For WooCommerce: add a product to cart and proceed through checkout
- Check HTTPS — the padlock should appear (you may need to activate SSL in your new host’s cPanel first)
Once you’re happy with the preview, remove your hosts file edits so your own browsing returns to normal. Then proceed to switching DNS. Don’t rush — take an extra day if you want to test more thoroughly. Your old site is still live and nobody is being inconvenienced.
7. Switch Your Domain to the New Host
Once you’ve confirmed the new site works correctly, it’s time to update DNS. This is covered in detail in our domain pointing guide, but here’s the quick version specific to WordPress migrations.
The Two DNS Approaches
Changing nameservers (recommended if your email is also hosted at the new host): log in to your domain registrar and replace the current nameservers with your new host’s nameservers. This transfers all DNS management to the new host.
Updating the A record (if keeping email elsewhere): log in to your registrar’s DNS management, find the A record for @ and update it to your new host’s IP address. Update the www CNAME as well.
Reduce TTL Before Switching (If You Planned Ahead)
If you lowered your DNS TTL to 300 seconds a day before the switch, your domain will propagate to the new host within minutes rather than hours. If you didn’t, expect 1–4 hours for the A record to propagate worldwide, and up to 48 hours for a nameserver change.
For several hours after you switch DNS, some visitors will hit the old server and some will hit the new one. This means any new posts, comments, or form submissions made during this window may land on the old server. If your site has active user submissions (orders, registrations, comments), consider posting a brief maintenance notice during the switchover, or time the switch for your lowest-traffic period.
8. Post-Migration Checklist
Once DNS has propagated and real visitors are hitting the new host, run through this list within the first 24 hours.
Immediately After DNS Propagates
- Confirm your site loads at both yourdomain.com and www.yourdomain.com
- Confirm HTTPS works — padlock visible, no “not secure” warning
- Log in to WordPress admin and verify plugins and settings are intact
- Send a test contact form submission and confirm it arrives
- Check that images and media files are loading on posts and pages
- Verify Google Analytics or any tracking scripts are still firing (check browser dev tools → Network tab)
Within 48 Hours
- Re-enable and reconfigure your caching plugin
- Run a speed test (Google PageSpeed Insights, GTmetrix) and compare to pre-migration baseline
- Submit your sitemap to Google Search Console if you haven’t already
- Check your email is still working correctly (send and receive a test)
- Review your server error logs in cPanel for any PHP errors or 404s
- Set up automated backups on the new host (UpdraftPlus or your host’s built-in backup tool)
After 7 Days
- Confirm traffic in Google Analytics looks normal (no sudden traffic drop)
- Check Google Search Console for any new crawl errors
- Cancel your old hosting account (keep the domain registration — they’re separate)
9. Troubleshooting Common Issues
These are the problems that come up most often during and after WordPress migrations, and exactly how to fix each one.
White Screen of Death (WSOD)
A blank white screen usually means a PHP error that WordPress is suppressing. First, check that your new host’s PHP version matches or exceeds your old host’s. Then temporarily enable WordPress debug mode by adding these two lines to wp-config.php:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true );
Check /wp-content/debug.log for the actual error. Most commonly it’s a plugin incompatible with the new PHP version, or a missing PHP extension. Disable plugins one by one via FTP (rename the plugins folder to plugins_old) to isolate the culprit.
Images Not Loading (Broken Image Icons)
This almost always means the files didn’t fully transfer — either some images are missing from wp-content/uploads, or the file paths in the database still reference the old domain. Re-upload the wp-content/uploads folder via FTP and double-check that you ran search-and-replace on the database for the old URL.
Redirects Looping or Going to Wrong Site
If clicking a link immediately redirects you back to the old site (or loops infinitely), the WordPress site URL settings are still pointing to the old domain. Fix this by logging in to WordPress admin → Settings → General, and confirming both the WordPress Address and Site Address fields show the correct URL. If you can’t get into admin, you can update these directly in the database: find the wp_options table in phpMyAdmin and update the siteurl and home rows.
“Error Establishing a Database Connection”
This means WordPress can’t connect to the database. Check wp-config.php — the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST values must exactly match what you set up in your new host’s MySQL Databases. A common mistake: the database username must include the cPanel account prefix (e.g., cpanelusername_dbuser, not just dbuser). Double-check this in your cPanel MySQL Databases panel.
SSL Certificate Not Working After Migration
After DNS propagates to the new host, you need to activate SSL there. Go to your new host’s cPanel → SSL/TLS → and run AutoSSL or install a free Let’s Encrypt certificate for your domain. This usually takes 1–5 minutes once your domain is fully pointing at the new server.
Caching Showing Old Content
If you see old content after the migration, your caching plugin may have carried over a stale cache from the old host. Clear all caches: in your caching plugin’s settings, click “Clear All Cache.” Also clear Cloudflare’s cache if you use it (Caching → Purge Everything). Then clear your browser cache and check again in incognito mode.
10. When Your New Host Migrates for You
Here’s something worth knowing before you do any of this yourself: most reputable hosting companies will migrate your WordPress site for free when you sign up.
This is one of the most underused features in web hosting. Companies like SiteGround, Kinsta, WP Engine, Cloudways, and many shared hosting providers include free WordPress migration as part of the onboarding process — either performed by their team or through an officially provided migration plugin that their servers are specifically configured to support.
What Free Migration Typically Includes
- Full file and database transfer handled by the host’s team
- Search-and-replace for URLs handled automatically
- A staging/preview environment to verify before going live
- SSL setup on the new host
- DNS guidance for the final switch
When to DIY Instead
- Your new host doesn’t offer free migration (or only offers it for the first site)
- You have multiple sites to migrate
- You want to learn and understand the process
- You need to customize the migration (e.g., changing the domain name at the same time)
Before spending time on a DIY migration, email or chat with your new host’s support and ask: “Do you offer free WordPress migration?” If they do, let them handle it. Their team does this dozens of times a day and can often complete it faster and with less risk than a first-time manual migration.
Your Site, Your New Host,
Zero Drama.
WordPress migration sounds intimidating, but it’s really just a copy-and-paste operation at its core — copy the files, copy the database, update a few settings, test thoroughly, then flip the DNS switch. The zero-downtime approach means there’s no moment where your site is just gone. Your old host keeps running the whole time.
Use a plugin if your site is under 2GB and you want the fastest path. Go manual if you want complete control or if plugins hit a wall. And always — always — check whether your new host will just do it for you first.
Keep your old hosting active for a week, run through the post-migration checklist, and monitor your traffic for a few days. After that, you’re done. Cancel the old account and enjoy the new host.
The migration you’ve been putting off?
You can finish it this afternoon.