How to Migrate a WordPress Site (2026 Guide)
Learn how to migrate a WordPress site to a new host with plugins, manual SFTP, or free host migrations—plus DNS, testing, and post-migration fixes.
Moving a WordPress site sounds intimidating, but it’s a well-worn path. Every day, site owners switch to faster hosting, consolidate multiple sites, move from a subdomain to a real domain, or push a finished staging build to production. The mechanics are always the same: copy the files, copy the database, point the domain, and fix whatever broke along the way.
This guide covers three ways to migrate a WordPress site—migration plugins, a fully manual move, and free host-assisted migrations—plus the pre-flight steps and post-migration cleanup that separate a smooth cutover from a weekend of firefighting. Pick the method that matches your comfort level and the size of your site.
When Should You Migrate a WordPress Site?
Migration isn’t something you do for fun. The usual triggers:
- Switching hosts – Your current host is slow, expensive, or unreliable and you’ve found a better one.
- Changing domains – Rebranding, or moving from
.netto.com. This is a related but distinct task; see our guide on how to change your WordPress domain for the URL-specific details. - Going from local or staging to live – You built the site somewhere safe and now it’s ready for the world.
- Consolidating – Merging several small sites onto one account or one server.
- Outgrowing shared hosting – Traffic has grown and you need managed or VPS hosting. Our roundup of the best WordPress hosting can help you choose a destination.
Whatever the reason, the process below applies. The only thing that changes is whether the domain stays the same (host-only move) or changes too (host and domain move).
Before You Migrate: Three Non-Negotiable Steps
Rushing into a migration is how sites break. Spend fifteen minutes on these first.
1. Take a full backup. Before you touch anything, capture a complete copy of the current site—files and database both. If the migration goes sideways, this is your escape hatch. Our guide on how to back up a WordPress site walks through the fastest free methods. Do not skip this.
2. Document your current setup. Note your PHP version, WordPress version, active theme, and any server-specific configuration (custom .htaccess rules, cron jobs, redirects). You want the new environment to match closely enough that nothing surprises you.
3. Migrate to staging first when you can. Rather than pushing straight to your live domain, migrate into a WordPress staging site on the new host, test everything there, and only then flip the domain. Most quality hosts offer free staging. This turns a high-stakes cutover into a low-risk rehearsal.
Method 1: Migration Plugins (Easiest for Most Sites)
For the majority of sites, a migration plugin is the fastest and safest route. These tools bundle your files and database into a single package, then rebuild it on the destination server—handling the URL and path adjustments automatically.
Duplicator
Duplicator packages your entire site into an archive plus a small installer script.
- Install and activate Duplicator on your current site.
- Go to Duplicator → Packages → Create New and build the package. It produces two files: an archive (
.zip) andinstaller.php. - Download both files.
- On the new host, upload both files to the target directory via SFTP or the file manager.
- Create an empty database on the new host and note the name, user, and password.
- Visit
yournewsite.com/installer.phpin your browser and follow the prompts, entering the new database details. - Duplicator extracts the archive, imports the database, and rewrites URLs.
All-in-One WP Migration
All-in-One WP Migration is the most beginner-friendly option—no manual database handling at all.
- Install the plugin on both the old and new sites.
- On the old site, go to All-in-One WP Migration → Export and export to a file.
- On the new site (a fresh WordPress install), go to Import and upload that file.
- The plugin restores everything and adjusts URLs automatically.
The free version caps upload size, so very large sites may need the paid extension or a different method. For small-to-medium sites it’s hard to beat.

Method 2: Free Host-Assisted Migrations
Before you install anything, check whether your new host will do the migration for you. Many managed and premium hosts offer free migration as a signup perk—either through a dedicated plugin or a white-glove service where their team moves the site.
How it typically works:
- Some hosts provide an automated migration plugin. You install it on the old site, enter a token from the new host’s dashboard, and it pulls everything across.
- Others offer a request form where you hand over your current host credentials and their migration team handles the entire move, then emails you when it’s ready to review.
Why this is often the best option:
- It’s free and requires little technical work on your part.
- The host’s team knows their own platform’s quirks and configures the destination correctly.
- If something breaks, it’s their responsibility to fix.
The catch: availability and quality vary. Confirm before you sign up whether free migration is included, how many sites it covers, and whether there’s a queue. When you’re comparing destinations, factor this in—our best WordPress hosting guide notes which providers include it.
Method 3: Manual Migration via SFTP and Database Export
The manual method gives you total control and works on any host, including ones with no migration tools at all. It has more steps, but nothing magical happens—you’re just copying files and a database by hand.
Step 1: Download the Files
Connect to your current host via SFTP (FileZilla, Cyberduck, or similar) and download the entire WordPress directory to your computer. The critical folder is /wp-content/, which holds your themes, plugins, and every uploaded image and media file. Core files can be re-downloaded from wordpress.org if needed, but grab everything to be safe.
Step 2: Export the Database
- In your current host’s control panel, open phpMyAdmin.
- Select your WordPress database (its name matches
DB_NAMEinwp-config.php). - Click the Export tab, choose the Quick method and SQL format, and click Go.
- A
.sqlfile downloads. This is your entire database—posts, settings, users, everything.
Step 3: Upload Files to the New Host
Connect via SFTP to the new host and upload the WordPress files to the target directory (usually public_html or the domain’s document root).
Step 4: Import the Database
- On the new host, create a fresh, empty MySQL database and a database user with full privileges. Note the name, user, password, and host.
- Open phpMyAdmin on the new host, select the empty database, click Import, choose your
.sqlfile, and click Go.
Step 5: Update wp-config.php
Open wp-config.php on the new server and update the database credentials to match what you just created:
define( 'DB_NAME', 'your_new_db_name' );
define( 'DB_USER', 'your_new_db_user' );
define( 'DB_PASSWORD', 'your_new_password' );
define( 'DB_HOST', 'localhost' );
Some hosts use a DB_HOST other than localhost—check their documentation if the connection fails.
Step 6: Search-and-Replace the URLs
If your domain is changing (or you migrated from a local URL like http://localhost/mysite), the old URL is hard-coded throughout the database. Running a raw find-and-replace on the SQL file breaks serialized data, so use a proper tool:
- Install the Better Search Replace plugin on the new site and replace
http://oldurl.comwithhttps://newurl.comacross all tables (do a dry run first). - Or use WP-CLI:
wp search-replace 'oldurl.com' 'newurl.com', which handles serialized data safely.
If the domain is staying the same, you can skip this step.
Switching DNS and Cutting Over the Domain
Once the site is running correctly on the new host—ideally verified on staging or via a temporary URL—it’s time to point the domain.
- Lower your DNS TTL first. A day or two before the cutover, reduce the TTL on your domain’s A record (or CNAME) to 300 seconds. This makes the eventual switch propagate faster.
- Update the A record to point to the new host’s IP address (or update nameservers if your host manages DNS). You’ll find the target IP in the new host’s dashboard.
- Wait for propagation. DNS changes can take anywhere from a few minutes to 48 hours to reach everyone, though most visitors see the new server within an hour or two.
- Keep the old host live during propagation. Don’t cancel the old account the moment you switch DNS. For a day or so, some visitors still hit the old server, so leave both running until traffic has fully moved.
To confirm the switch, you can check propagation with a global DNS lookup tool, or temporarily edit your local hosts file to preview the new server before DNS changes at all.
Testing After Migration
Before you announce anything, walk through the site methodically:
- Homepage and key pages load without errors.
- Internal links and navigation work.
- Images and media display (a broken image is often an unfixed URL reference).
- Forms submit and deliver email.
- Login works and the admin dashboard is accessible.
- Permalinks resolve—visit a few individual posts.
- WooCommerce or membership flows, if present, complete end to end.
- SSL padlock shows on every page.
Test as a logged-out visitor in a private browser window, not just as an admin—the two can behave differently.
Fixing Common Post-Migration Problems
Even a clean migration can leave a few loose ends. Here are the usual suspects and their fixes.
404 Errors on Every Post
Individual posts return “Not Found” even though the homepage loads. This is a permalink/rewrite issue on the new server. Go to Settings → Permalinks and click Save Changes without altering anything—this regenerates the rewrite rules. If it persists, confirm mod_rewrite is enabled and the .htaccess file made it across.
Mixed Content Warnings
The padlock is missing or the browser flags “insecure” resources. This happens when the database still references http:// URLs after moving to HTTPS. Run Better Search Replace to change http://yourdomain.com to https://yourdomain.com, and confirm both WordPress Address and Site Address under Settings → General use https://.
Broken Images or Links
Images with a broken icon usually point to the old domain or an old file path. A search-and-replace across the database fixes hard-coded references. If images still fail, verify the entire /wp-content/uploads/ folder actually transferred—large uploads folders sometimes stall mid-transfer.
Can’t Log In / White Screen
If the dashboard won’t load, double-check the wp-config.php database credentials and DB_HOST. For a broader troubleshooting checklist covering database connection errors, redirect loops, and the white screen of death, see our guide to common WordPress errors and fixes.
Emails Not Sending
The new server may not be configured to send mail. Install an SMTP plugin and route transactional email through an authenticated service so contact forms and order notifications keep working.
Migration Checklist
| Phase | Task |
|---|---|
| Before | Full backup of files + database |
| Before | Document PHP/WP versions and config |
| Before | Set up staging on the new host |
| Move | Copy files (plugin, SFTP, or host tool) |
| Move | Export and import the database |
| Move | Update wp-config.php credentials |
| Move | Search-replace URLs if domain changes |
| Cutover | Lower DNS TTL, then update A record |
| After | Save permalinks, test as logged-out visitor |
| After | Fix mixed content and broken images |
| After | Decommission old host once traffic moves |
FAQ
How long does it take to migrate a WordPress site?
A small site with a migration plugin can move in under an hour, plus DNS propagation. A large or complex site done manually might take an afternoon. The file and database transfer is quick; the variable is DNS, which can take anywhere from minutes to 48 hours to fully propagate.
Will migrating hurt my SEO?
Not if you do it carefully. Keep the same URL structure, migrate all content and images intact, and don’t leave the old and new sites both indexable at the same time. If you’re also changing domains, set up 301 redirects from old URLs to new ones—our change your WordPress domain guide covers the redirect strategy that preserves rankings.
Should I migrate to staging or straight to production?
Migrate to staging first whenever the new host offers it. Testing on a WordPress staging site lets you catch broken links, missing images, and configuration issues before real visitors see them. Only flip the live domain once staging checks out.
Do I need a plugin, or can I migrate manually?
Either works. Plugins like Duplicator or All-in-One WP Migration are easier and handle URL rewriting automatically, which suits most site owners. A manual SFTP-and-database move gives you full control and works when a site is too large for plugin upload limits or when no migration tools are available.
What do I do if the migration breaks the site?
This is exactly why you took a backup first. Restore the previous version, confirm the original site still works, and diagnose what went wrong before trying again. Most failures trace back to wrong database credentials in wp-config.php or an incomplete file transfer—both easy to fix on a second attempt.
Migrating a WordPress site is a process, not a gamble—so long as you back up first, test on staging, and work through the checklist above. Take it one step at a time and the site will land on its new home intact. When you’re ready to build your next project, browse our free WordPress themes to start on a fast, well-coded foundation.