14+ years building on WordPress / Replies in under 5 hours
Maintenance 14 min read · Updated July 2026

WordPress Website Migration: Complete Guide for 2026

AK
Ajay Khandal
WordPress Developer
WordPress Website Migration: Complete Guide & Cost Breakdown 2026
TL;DR

For most WordPress migrations: Duplicator Pro ($49.50/year) or All-in-One WP Migration (free up to 512MB) handle the packaging. Core steps: (1) export the database via phpMyAdmin and back up wp-content via FTP or cPanel; (2) create a new database on the destination host, import the .sql file, upload wp-content; (3) update wp-config.php with new database credentials; (4) run URL search-replace — WP-CLI command: wp search-replace 'oldsite.com' 'newsite.com' --all-tables handles serialized data correctly where manual find-and-replace breaks arrays; (5) lower DNS TTL to 300s 48 hours before cutover, then update the A record. After go-live: resave permalink structure (Settings → Permalinks → Save Changes) to fix 404s on all pages, configure WP Mail SMTP for reliable email delivery, and submit an updated sitemap to Google Search Console. Zero-downtime option: route the domain through Cloudflare before migrating, then update the origin IP — change propagates in seconds.

WordPress migration moves your entire site — files, database, themes, plugins, and configurations — from one server environment to another without losing data or functionality. The three most common reasons: switching hosting providers for better performance or pricing, changing the domain name as part of a rebrand, and adding HTTPS with an SSL certificate. Each type follows the same core process with specific variations at the URL update and DNS steps.

This covers the complete migration workflow from pre-migration backup through post-migration verification — including the step-by-step file transfer and database import sequence, a printable three-phase checklist, three zero-downtime methods, and fixes for the seven errors that most commonly break migrations.

Migration types: when you need to migrate WordPress

WordPress migration is the process of moving your website — its files, database, and server configuration — from one environment to another.

Host-to-host migration: Moving from one hosting provider to another (e.g., Bluehost to Kinsta or SiteGround). Site content and URL structure stay the same; the server environment changes. The most common migration type.

Domain change migration: Changing the site’s domain name (rebranding). Requires a full database search-and-replace to update all stored URLs and 301 redirects from the old domain to preserve organic traffic and rankings.

HTTP to HTTPS migration: Adding an SSL certificate and updating all URLs from HTTP to HTTPS. Required for current search ranking signals and browser trust indicators. The lowest-risk migration type — can be done live with minimal downtime.

Local to live migration: Pushing a site from a local development environment (LocalWP, DevKinsta, MAMP) to a live hosting server. Requires absolute path updates in the database and wp-config.php.

Staging to production migration: Pushing tested changes from a staging environment to the live site — common in ongoing development workflows.

Common reasons to migrate: the current host is slow or frequently unreliable; rebranding requires a new domain; the site has outgrown shared hosting; the host doesn’t support current PHP or MySQL versions; you’re consolidating multiple sites. For moving an existing site from a non-WordPress platform — Squarespace, Wix, Joomla, or Drupal — the process differs from a host-to-host migration. See the guide to migrating to WordPress from other platforms for the content export and import steps specific to each platform.

DIY migration tools

WordPress migration plugins handle the file and database packaging that makes migration manageable without command-line access:

  • Duplicator Pro: $49.50/year. Packages the entire site into a zip archive with an installer script that handles database creation and import automatically. Handles sites of any size reliably without the PHP timeout issues that affect simpler plugins. Best option for most migrations.
  • All-in-One WP Migration: Free (512MB limit) / $69 for the unlimited extension. Browser-based import and export — no FTP access required. Works well for smaller sites and straightforward host switches.
  • UpdraftPlus: Free backup and manual restore. More steps than a dedicated migration plugin but reliable for host-to-host moves when combined with phpMyAdmin access for the database.
  • WP Migrate DB Pro: $99/year. Specialises in database migration and URL search-replace. Best for staging-to-production workflows and domain changes where files are managed separately via FTP.

DIY migration works well for sites under 5GB where you’re comfortable with FTP, databases, and DNS settings, and where several hours of downtime isn’t a business problem. WooCommerce stores, membership sites, and sites with custom code have higher complexity — a broken payment gateway or lost order data during migration carries immediate revenue impact. After migrating a WooCommerce store, the hosting configuration and caching setup on the new server matter significantly for performance; see the WooCommerce performance guide for the Redis object cache and page caching configuration to establish on the destination server before going live.

The complete WordPress migration process

Phase 1: Pre-migration preparation (2–4 hours)

Step 1: Create a complete backup

✓ Full file backup via FTP or cPanel
✓ Database export via phpMyAdmin
✓ Store backups in 2 locations (local + cloud)
✓ Test backup restore on a local environment

Step 2: Audit the current site

✓ Document active plugins and versions
✓ Note active theme and child theme
✓ Record integrations (payment, email, analytics)
✓ Check PHP and MySQL versions
✓ Run a broken link check
✓ Document custom code or .htaccess rules

Step 3: Prepare the new environment

✓ Verify PHP compatibility (8.2 or 8.3 recommended)
✓ Install WordPress core (same version as current)
✓ Configure database credentials
✓ Set file permissions correctly
✓ Install SSL certificate if needed

Step 4: Schedule the migration window

✓ Pick a low-traffic time window
✓ Notify team members
✓ Prepare a maintenance mode page
✓ Set up uptime monitoring (UptimeRobot or similar)

Phase 2: Migration execution (1–3 hours)

Step 5: Transfer files

✓ Upload wp-content folder via FTP/SFTP
✓ Verify all plugins transferred
✓ Verify all themes transferred
✓ Check uploads folder (images, PDFs)
✓ Preserve file permissions

Step 6: Import the database

✓ Create new database on new host
✓ Import .sql file via phpMyAdmin
✓ Verify all tables imported
✓ Check for import errors

Step 7: Update configuration

✓ Edit wp-config.php with new database credentials
✓ Update database host (usually 'localhost')
✓ Generate and set new authentication keys and salts
✓ Enable WordPress debugging temporarily to surface errors

Step 8: Search and replace URLs

✓ Use WP-CLI: wp search-replace 'oldsite.com' 'newsite.com' --all-tables
✓ Or use Better Search Replace plugin for browser-based access
✓ Both handle serialized data correctly — manual find-and-replace breaks serialized arrays
✓ Verify no broken internal links remain after replacement

Step 9: Update DNS settings

✓ Lower DNS TTL 24–48 hours before cutover (to 300 seconds / 5 minutes)
✓ Update the A record to the new server IP
✓ Wait for DNS propagation (4–48 hours)
✓ Test the site via direct IP or hosts file before DNS fully propagates

Phase 3: Post-migration verification (1–2 hours)

Step 10: Test critical functionality

✓ Login to WordPress admin
✓ Test all forms (contact, registration, checkout)
✓ Verify payment gateways (if e-commerce)
✓ Check email delivery (send a test from the contact form)
✓ Verify search functionality

Step 11: Check SEO elements

✓ Verify meta titles and descriptions
✓ Check robots.txt file
✓ Test XML sitemap
✓ Implement 301 redirects if domain changed
✓ Submit sitemap to Google Search Console
✓ Update Google Analytics property

Step 12: Performance baseline

✓ Run GTmetrix or PageSpeed Insights
✓ Compare with pre-migration benchmarks
✓ Configure caching (WP Rocket or LiteSpeed Cache)
✓ Enable CDN if applicable
✓ Verify image optimisation is in place

For Core Web Vitals targets after migration — LCP, INP, CLS, and TTFB thresholds with measurement tools — see the WordPress Core Web Vitals guide.

Step 13: Security hardening

✓ Update all plugins and themes
✓ Change admin password
✓ Install security plugin (Wordfence or Sucuri)
✓ Enable two-factor authentication

Seven things that can go wrong

Database connection errors

Symptoms: “Error establishing a database connection,” white screen of death, or can’t access WordPress admin.

Causes: Incorrect database credentials in wp-config.php, database not imported correctly, wrong database host value, database user lacks privileges.

Fix — verify wp-config.php values:

define('DB_NAME', 'correct_database_name');
define('DB_USER', 'correct_username');
define('DB_PASSWORD', 'correct_password');
define('DB_HOST', 'localhost'); // or specific host from control panel
  1. Verify database credentials via the hosting control panel
  2. Test database connection via phpMyAdmin
  3. Confirm the database user has all privileges on that database
  4. Enable WordPress debugging (define('WP_DEBUG', true);) to surface the exact error message

Broken images and missing media

Symptoms: Images show as broken links, media library appears empty or incomplete, 404 errors on image URLs.

Causes: Incomplete file transfer, incorrect file permissions, URLs not updated in the database, .htaccess rewrite rules missing.

Prevention:

✓ Verify entire wp-content/uploads folder transferred
✓ Check file permissions (folders: 755, files: 644)
✓ Run search-replace on image URLs after migration
✓ Verify .htaccess rules copied from old host

Fix:

  1. Re-upload the wp-content/uploads folder via FTP
  2. Run Better Search Replace plugin to update remaining image URLs
  3. Use Regenerate Thumbnails plugin to rebuild WordPress thumbnail sizes
  4. Fix file permissions via FTP client

404 errors on all pages except the homepage

Symptoms: Homepage loads correctly, all other pages return “404 Not Found,” WordPress admin works normally.

Causes: Permalink structure not saved after migration, .htaccess file missing or incorrect, mod_rewrite not enabled on the new server.

Fix:

  1. Go to Settings → Permalinks in WordPress admin
  2. Click “Save Changes” without changing anything — this regenerates the .htaccess file
  3. Verify .htaccess contains WordPress rewrite rules
  4. Contact host to enable mod_rewrite if the above doesn’t resolve it

This is one of the most common post-migration issues and almost always resolves with the permalink resave. Do this before debugging anything else when pages return 404s.


SSL/HTTPS mixed content warnings

Symptoms: Browser shows “Not Secure” warning, some resources loading via HTTP, lock icon has a warning symbol.

Causes: Hard-coded HTTP URLs in content, themes or plugins loading HTTP resources, incomplete search-replace after SSL migration.

Add to wp-config.php:

define('FORCE_SSL_ADMIN', true);

Add to .htaccess:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The Really Simple SSL plugin handles remaining mixed content issues automatically and is a reliable fix for edge cases the manual search-replace doesn’t catch. Scan for remaining mixed content with the “Why No Padlock” tool after applying the above.


Emails stop sending

Symptoms: Contact forms don’t deliver, password reset emails fail, WooCommerce order confirmation emails are missing.

Causes: New host has stricter email policies, SPF/DKIM records not configured, PHP mail() function disabled on the new server.

Fix:

  1. Install WP Mail SMTP plugin
  2. Configure with an SMTP service: Gmail, SendGrid, Mailgun, or Postmark
  3. Test email delivery via the plugin’s built-in test tool
  4. Update SPF and DKIM DNS records to match the new sending configuration

Configure SMTP delivery as part of the new environment setup — relying on PHP mail() is a common source of silent email failures after migration that only surfaces when a customer reports not receiving a confirmation.


Dramatic speed decrease on the new host

Symptoms: Site loads noticeably slower, page load time 2–3× higher, TTFB (Time to First Byte) increased.

Causes: Lower PHP version on new host, no object caching available, missing server-level compression, caching plugin configuration incompatible with new server.

Fix:

  1. Upgrade PHP to 8.2 or 8.3 — WordPress and WooCommerce performance improves measurably on current PHP versions
  2. Enable Redis or Memcached object caching
  3. Install WP Rocket or LiteSpeed Cache
  4. Enable Gzip or Brotli compression at the server level
  5. Add a CDN for static assets — Cloudflare (free tier) or Bunny.net

SEO rankings drop after migration

Symptoms: Organic traffic drops after go-live, pages disappear from Google index, Search Console shows crawl errors or coverage drops.

Causes: Missing 301 redirects if domain changed, robots.txt blocking crawlers, XML sitemap not updated, canonical URLs still pointing to old domain.

For domain changes — add to .htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldsite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.oldsite\.com$
RewriteRule (.*)$ https://newsite.com/$1 [R=301,L]

Verify robots.txt allows crawling:

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Submit the updated sitemap to Google Search Console and request reindexing of key pages immediately after DNS cutover. Rankings typically recover within 2–8 weeks for a correctly executed domain change — recovery is slower or incomplete when 301 redirects were missing or incorrect during the transition period.

WordPress migration checklist

Pre-migration (1–2 days before)

Backup and documentation:

  • Full website backup via FTP/cPanel
  • Database export via phpMyAdmin
  • Screenshot of all plugin settings
  • Document active theme and child theme
  • List all integrations (analytics, payment, email)
  • Export Rank Math SEO settings
  • Test backup restore on a local or staging environment

Environment preparation:

  • New hosting account activated
  • WordPress installed (matching version)
  • SSL certificate installed if HTTPS migration
  • PHP 8.2 or 8.3 verified
  • Database created with user access granted
  • Email accounts configured

Communication:

  • Schedule migration during low-traffic window
  • Notify team of planned maintenance
  • Prepare maintenance mode page
  • Set up uptime monitoring alerts

During migration

File transfer:

  • Upload wp-content/plugins folder
  • Upload wp-content/themes folder
  • Upload wp-content/uploads folder
  • Verify all files transferred (compare folder sizes)
  • Set correct file permissions (755 folders / 644 files)

Database migration:

  • Import database via phpMyAdmin
  • Verify all tables imported successfully
  • Check database size matches original
  • No import errors or warnings

Configuration:

  • Update wp-config.php database credentials
  • Update database host and prefix
  • Generate new authentication keys and salts
  • Enable debugging temporarily to surface errors

URL updates:

  • Run search-replace for domain and URLs
  • Handle serialized data correctly (WP-CLI or Better Search Replace — not manual)
  • Verify no hardcoded URLs remain
  • Check media library URLs

DNS and domain:

  • Update DNS A record to new server IP
  • Update CNAME records if needed
  • Configure email MX records
  • Test via hosts file before DNS cutover

Post-migration

Functionality testing:

  • Login to WordPress admin
  • Homepage loads correctly
  • Navigation menus work
  • Search functionality works
  • Contact forms send and deliver emails
  • User registration works
  • Media uploads work in admin

E-commerce testing (if applicable):

  • Products display correctly
  • Shopping cart functions
  • Checkout process completes
  • Payment gateway processes a test transaction
  • Order confirmation emails send
  • Customer accounts accessible
  • Tax calculations correct
  • Shipping options work

SEO and analytics:

  • Meta titles and descriptions intact (verify via Rank Math)
  • robots.txt configured correctly
  • XML sitemap accessible
  • 301 redirects working if domain changed
  • Google Analytics tracking active
  • Google Search Console updated with new sitemap

Performance:

  • Page load speed benchmarked (GTmetrix or PageSpeed Insights)
  • TTFB under 200ms
  • Images optimised
  • Caching configured
  • CDN active if applicable
  • Mobile responsiveness verified on a real device

Security:

  • SSL certificate working (HTTPS lock showing)
  • No mixed content warnings
  • WordPress core updated
  • All plugins updated
  • Admin password changed
  • Security plugin active (Wordfence or Sucuri)
  • Backup schedule configured on new host

Final cleanup:

  • Remove maintenance mode
  • Delete migration plugins after use
  • Clear all caches
  • Test from multiple devices and browsers
  • Monitor for 24–48 hours after go-live
  • Cancel old hosting after 7–30 days (once confident migration is stable)

How to migrate without downtime

Method 1: Low TTL and quick cutover

Timeline: 48 hours total, 2–4 hours of potential downtime for cached DNS users

  1. 48 hours before: Lower DNS TTL to 300 seconds (5 minutes)
  2. Migration day: Complete migration on new host, test via hosts file
  3. Cutover: Update DNS A record — most users switch within 5–30 minutes
  4. Monitoring: Watch both old and new servers for 24 hours

Method 2: Cloudflare proxy (recommended for zero downtime)

Timeline: 24 hours, no customer-facing downtime

  1. Setup: Route domain through Cloudflare (free plan works)
  2. Migration: Complete migration on new host
  3. Testing: Test the new host directly via its IP address
  4. Cutover: Update Cloudflare’s origin IP — change propagates within seconds
  5. Result: Cloudflare proxies all traffic; visitors see no transition

Method 3: Staging to production push

Timeline: 5–10 minutes of planned maintenance

  1. Setup: Create a staging site on the new host
  2. Migration: Migrate to staging and test thoroughly
  3. Maintenance window: Put live site in maintenance mode (5 minutes)
  4. Sync: Push staging to production
  5. Update: Switch DNS or hosting settings

Post-migration testing: what to check

Form submissions (critical)

✓ Submit contact form
✓ Verify email received in inbox
✓ Check form data saved to database
✓ Test with invalid data (error handling)
✓ Test newsletter signup

Broken forms mean lost leads. Test forms first, before checking anything else post-migration.

E-commerce checkout (critical for stores)

✓ Add product to cart
✓ Proceed through full checkout flow
✓ Process a test payment (use Stripe's test card numbers)
✓ Verify order confirmation email sends
✓ Check order appears in WooCommerce admin
✓ Test customer account creation
✓ Verify inventory is deducted on purchase

User authentication

✓ Login with an existing user account
✓ Register a new user account
✓ Reset password via email
✓ Login with the new account
✓ Check user roles and permissions

Media and images

✓ All images display on frontend
✓ Featured images show on posts and pages
✓ Gallery images load correctly
✓ New image uploads work in admin
✓ PDF and file downloads function

Mobile responsiveness

✓ Test on iOS (Safari)
✓ Test on Android (Chrome)
✓ Check hamburger menu navigation
✓ Verify forms work on mobile
✓ Test checkout on mobile (for e-commerce stores)

Third-party integrations

✓ Google Analytics is tracking page views
✓ Payment gateway connected and processing
✓ Email marketing integration active
✓ Live chat widget loading
✓ Social sharing buttons functional

After migration and performance verification, the recurring maintenance tasks — plugin updates, backup schedule, database cleanup, and uptime monitoring — are covered in the WordPress maintenance guide. For post-migration performance tuning on the new server, including hosting selection, caching, CDN, and database optimisation, see the WordPress performance guide. For the full post-launch verification sequence beyond migration — SEO configuration, analytics setup, structured data, and redirect validation — see the WordPress site launch checklist.

Frequently asked questions

Simple sites (under 5GB, under 50 pages) typically take 2–4 hours total, including preparation and testing. Medium sites with more content and plugins take 4–8 hours. WooCommerce stores with large product catalogs and order history take 8–16 hours, mostly due to the additional testing required to verify checkout, payment gateways, and order history. Most of the time is preparation and post-migration testing — the actual file transfer is usually 30 minutes to 2 hours depending on site size and connection speed.

It doesn't have to. Downtime depends on the method. With the Cloudflare proxy method, visitors see no downtime at all: route your domain through Cloudflare first, complete the migration on the new host, then update Cloudflare's origin IP — the change propagates in seconds. With the low-TTL method, lower your DNS TTL to 300 seconds 48 hours before cutover — most visitors switch within 5–30 minutes of the A record update. Without preparation, DNS propagation can take 4–48 hours, during which some visitors reach the old server and some reach the new one.

Duplicator Pro is the most reliable option for most migrations. It packages your entire site — files and database — into a zip archive with a self-contained installer script that handles database creation and import automatically. It handles large sites reliably without PHP timeout issues that affect simpler plugins. All-in-One WP Migration is a solid free alternative for sites under 512MB, with no FTP access required. WP Migrate DB Pro ($99/year) is the best choice for database-only migrations and staging-to-production workflows where files are managed separately.

The critical step for domain changes is setting up 301 redirects from every old URL to the corresponding new URL before going live. Add the redirect rules to .htaccess pointing from oldsite.com to newsite.com using the R=301 flag. After cutover, verify robots.txt is not accidentally blocking crawlers, update your XML sitemap, submit it to Google Search Console, and request reindexing of key pages. If you're only changing hosts (same domain and URL structure), there's minimal SEO impact — just ensure robots.txt is set correctly and the site loads at full speed on the new host. Rankings typically recover within 2–8 weeks for a correctly executed domain change.

The safest method is WP-CLI: run wp search-replace 'oldsite.com' 'newsite.com' --all-tables from the command line. The --all-tables flag ensures it covers every database table, including custom plugin tables. WP-CLI handles serialized data correctly — WordPress stores some values as serialized PHP arrays, and a plain text find-and-replace breaks the array structure and corrupts the data. If you don't have command-line access, the Better Search Replace plugin does the same thing from the WordPress admin and also handles serialized data. Run this before testing the migrated site, not after.

DNS propagation is the time it takes for DNS servers around the world to update their records after you change your domain's A record to point to a new IP address. ISPs and networks cache DNS records for as long as the TTL (Time to Live) value specifies. With a standard TTL of 3600 seconds (1 hour), most users will switch within 1–4 hours. With a standard TTL of 86400 seconds (24 hours), it can take up to 48 hours for all users to reach the new server. Lower your TTL to 300 seconds 48 hours before migration to minimise the propagation window. Alternatively, use Cloudflare as a proxy — changing the origin IP in Cloudflare takes effect in seconds, with no propagation delay.

AK

Written by Ajay Khandal

WordPress Developer — building, fixing and speeding up WordPress sites.

Work with me →