How to Migrate WordPress Without Losing Traffic

How to Migrate WordPress Without Losing Traffic

How to Migrate Your WordPress Site Without Losing Traffic or Breaking Links

Migrating a WordPress site is one of those tasks that sounds straightforward but has a surprising number of ways to go wrong. Miss a step, and you're dealing with broken links, a Google Search Console full of crawl errors, and a site that mysteriously loads slowly on the new server. Get it right, and the transition is invisible to your visitors and to search engines. This guide shows you exactly how to do it right. with a full pre-migration checklist, detailed plugin walkthroughs, the .htaccess code you need, and a post-migration testing protocol that catches problems before they affect your rankings.


Why SEO-Safe Migration Matters

When you move a WordPress site, you're not just moving files. You're moving:

  • Every URL your visitors have bookmarked
  • Every link other sites have pointed at you
  • Every page Google has indexed and assigned ranking value to
  • All the metadata, canonical tags, and structured data your SEO plugin configured

A careless migration breaks the relationship between your old URLs and your new server, creating 404 errors that search engines interpret as content being removed. If you lose even 10. 20% of your indexed pages to 404s, you can see organic traffic drop significantly. and rebuilding that takes months.

The good news: SEO-safe migration is entirely achievable with proper preparation. The guide below covers every step.


Pre-Migration Checklist

Complete every item here before touching your migration:

Site documentation:

  • ☐ Export full list of URLs using Screaming Frog (free up to 500 URLs) or your XML sitemap
  • ☐ Screenshot Google Analytics: top 20 pages by organic traffic
  • ☐ Note Google Search Console baseline: total indexed pages, any existing errors
  • ☐ Export Search Console sitemap data (what Google has indexed)
  • ☐ Document your current permalink structure (Settings → Permalinks)
  • ☐ Note active plugins and their version numbers

Technical prep:

  • ☐ Check current PHP version (Tools → Site Health → Info → Server)
  • ☐ Note custom wp-config.php settings you've made
  • ☐ Document any custom .htaccess rules
  • ☐ Check if you use a CDN (Cloudflare, Bunny, etc.) and note settings
  • ☐ Record all DNS records: A, CNAME, MX, TXT (critical for preserving email)

DNS prep:

  • ☐ Log in to your domain registrar
  • ☐ Reduce TTL on your A record to 300 seconds (5 minutes)
  • ☐ Do this at least 24 hours before your planned DNS cutover

Backup:

  • ☐ Full backup of files and database (see Step 1 below)
  • ☐ Download backup to local computer
  • ☐ Upload copy to cloud storage (Google Drive, Dropbox, S3)
  • ☐ Verify backup files are not corrupted (try opening the .sql file in a text editor)

Step 1: Back Up Your Current Site

Everything starts with a complete, verified backup. Don't skip this.

Using UpdraftPlus (recommended for beginners):

  1. Install and activate UpdraftPlus from the WordPress plugin directory
  2. Go to Settings → UpdraftPlus Backups
  3. Click Backup Now
  4. Ensure both "database" and "files" options are checked
  5. Once complete, download all generated files (you'll get separate archives for the database, plugins, themes, uploads, and other)
  6. Store copies both locally and in cloud storage

Using Duplicator (good for larger sites):

Duplicator creates a single archive file plus an installer script, making it easy to redeploy:

  1. Install and activate Duplicator
  2. Go to Duplicator → Packages → Create New
  3. Follow the wizard. it scans for issues before building
  4. Download both the archive.zip and the installer.php file
  5. Store both safely

Manual backup via WP-CLI:

# Export database
wp db export site-backup-$(date +%Y%m%d).sql

# Create file archive (adjust path to your WordPress root)
tar -czf site-files-$(date +%Y%m%d).tar.gz /var/www/html/

Step 2: Set Up Your New Hosting Environment

Before migrating content, prepare the destination:

  1. Create a WordPress installation on your new host (or use their one-click installer)
  2. Note your new database credentials: database name, username, password, and hostname
  3. Access your temporary staging URL. this is where you'll test the migrated site before going live
  4. Match PHP versions initially: install the same PHP version your old site runs (you can upgrade after migration)
  5. Configure email: if your email is hosted separately (Google Workspace, etc.), note your MX records so you don't accidentally break them during DNS cutover

Step 3: Migrate Your Content

Option A: All-in-One WP Migration (simplest)

Best for sites under 512MB (free plugin limit):

On your old site: 1. Install All-in-One WP Migration 2. Go to All-in-One WP Migration → Export → File 3. Download the .wpress file to your computer (can be large)

On your new site: 1. Install All-in-One WP Migration 2. Go to All-in-One WP Migration → Import 3. Drag and drop the .wpress file (or browse to upload) 4. Confirm the import. note this will overwrite any existing WordPress installation on the new site 5. Once complete, update your permalinks (Settings → Permalinks → Save Changes)

Option B: Migrate Guru (best free option for large sites)

Migrate Guru handles sites of any size, migrates directly server-to-server (no downloading huge files), and is free:

  1. Install Migrate Guru on your old site
  2. Enter your new host's FTP/SFTP credentials
  3. Let Migrate Guru transfer everything directly between servers
  4. Test on staging URL when complete

Option C: Manual Migration

For developers or when plugin migrations fail:

Transfer files via SFTP:

# Download from old server
sftp user@old-server.com
cd /public_html
get -r *

# Upload to new server
sftp user@new-server.com
cd /public_html
put -r *

Import database on new server:

  1. Log in to phpMyAdmin on your new host
  2. Create a new database and user, assign full privileges
  3. Select the new database → Import → choose your .sql backup file
  4. Update wp-config.php with new database credentials:
define( 'DB_NAME', 'your_new_database_name' );
define( 'DB_USER', 'your_new_db_user' );
define( 'DB_PASSWORD', 'your_new_db_password' );
define( 'DB_HOST', 'localhost' );

Update site URL in database (if the URL changes):

# Run on new server via WP-CLI
# Replace old URL with new URL in all database tables
wp search-replace 'http://old-domain.com' 'https://new-domain.com' --all-tables --report-changed-only

# If moving from non-www to www or vice versa:
wp search-replace 'https://old-domain.com' 'https://www.new-domain.com' --all-tables

Step 4: Set Up 301 Redirects

If your site's URL structure is not changing (same domain, same permalinks), you don't need additional redirects. Your existing .htaccess file migrated with your site.

If URLs are changing. for example, you're adding HTTPS, changing your permalink structure, or moving from a subdomain. set up 301 redirects now.

Force HTTPS (redirect HTTP to HTTPS):

# Add to .htaccess in WordPress root directory
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirect non-www to www:

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

Redirect specific old URLs to new URLs:

# Individual page redirects
Redirect 301 /old-page-slug/ /new-page-slug/
Redirect 301 /old-blog/post-name/ /blog/post-name/

Verify redirects work before going live using a redirect checker tool (e.g., redirect-checker.org).


Step 5: Verify Permalink Settings

After any migration. even plugin-based ones. always regenerate your permalinks:

  1. Go to Settings → Permalinks
  2. Don't change anything
  3. Just click Save Changes

This regenerates the .htaccess rewrite rules WordPress uses for pretty URLs. Skipping this is the single most common cause of post-migration 404 errors.


Step 6: Test the Migrated Site Thoroughly

Before touching DNS, test everything on your staging URL:

Functional testing:

  • ☐ Log in to WP Admin. does it load correctly?
  • ☐ Visit 10+ representative pages (homepage, a few blog posts, category pages)
  • ☐ Submit a contact form (check email delivery)
  • ☐ If WooCommerce: complete a test purchase (enable test/sandbox mode)
  • ☐ Test site search
  • ☐ Check that media/images load properly
  • ☐ Test navigation menus and internal links
  • ☐ Test on mobile devices

Performance testing:

  • ☐ Run through Google PageSpeed Insights
  • ☐ Check GTmetrix for load time
  • ☐ Compare against your pre-migration baseline

SEO/technical testing:

  • ☐ Verify robots.txt is not blocking indexing (yoursite.com/robots.txt)
  • ☐ Confirm your XML sitemap generates (yoursite.com/sitemap.xml)
  • ☐ Check canonical tags on key pages (right-click → View Source → search for "canonical")
  • ☐ Run Screaming Frog on your staging URL. check for broken links, missing titles, missing meta descriptions

Step 7: Point DNS to New Host

Once testing is complete:

  1. Log in to your domain registrar
  2. Update the A record for your domain to the new host's IP address
  3. Update www CNAME if applicable
  4. Do not change MX records unless you also want to change email hosting
  5. Do not cancel old hosting for at least 48 hours

DNS propagation usually takes 1. 4 hours when TTL was pre-reduced. Use dnschecker.org to verify propagation across global DNS servers.

During propagation, some visitors will hit the old host and some the new one. both sites are live simultaneously. This is normal and harmless.


Step 8: Post-Migration Testing Protocol

After DNS propagates:

Immediate checks (within 1 hour):

  • ☐ Access your site from a different network/device (not cached)
  • ☐ Confirm site loads with HTTPS (green padlock)
  • ☐ Flush WordPress cache on new host
  • ☐ Log in to WP Admin and confirm everything functions
  • ☐ Submit your sitemap to Google Search Console (if it's been reset)

24-hour checks:

  • ☐ Monitor Google Search Console for new crawl errors
  • ☐ Verify Google Analytics is still receiving data
  • ☐ Check server error logs for any 404s or 500s
  • ☐ Confirm contact form emails are arriving

7-day monitoring:

  • ☐ Watch organic traffic in Analytics. expect minor fluctuation, stabilizes within 1-2 weeks
  • ☐ Monitor Search Console for any new indexing issues
  • ☐ Address any 404 errors surfaced by Search Console immediately

Common Migration Mistakes (And How to Avoid Them)

Not updating permalinks. Causes 404 errors on all posts and pages. Fix: Settings → Permalinks → Save Changes immediately after migration.

Cancelling old hosting too soon. If DNS propagation takes longer than expected, or you discover an issue, you want the old site available. Wait 48+ hours.

Not checking email. If your domain's email goes through your host (not Google Workspace or Office 365), your MX records are critical. Verify email still works after DNS change.

Forgetting the database URL update. If your site URL changed (HTTP to HTTPS, www to non-www), old URLs hardcoded in the database cause redirect loops or broken internal links. Fix with WP-CLI search-replace.

Trusting the migration plugin to handle everything. Plugin migrations occasionally miss serialized data, custom database tables, or unusual configurations. Always do a manual review post-migration.


How Hyperscale Makes Migration Easier

We've migrated hundreds of WordPress sites, and we know where the pain points are. That's why all Hyperscale plans include:

  • Free managed migration. we handle files, database, DNS coordination, and post-launch testing
  • Staging environments. test your migrated site before going live
  • Same-day turnaround. most sites are live within 24 hours
  • Zero-downtime migration. your old site stays live until we're fully ready to flip the switch

You don't have to go through the steps above yourself. But if you're a hands-on person who wants to understand what's happening under the hood. now you do.

Related reading: Moving to a Better Host: A Practical Migration Guide | WordPress Security: Essential Steps | Signs Your Web Host Is Failing You


Get Migrated Without the Headaches

Done right, migration is invisible. Your rankings hold. Your links work. Your customers notice nothing except that your site is suddenly faster.

Get started with Hyperscale →. free migration included. We've done this hundreds of times. Let's do yours next.


{$footeroutput}