Skip to content

ehonep/wordpress-migration-checklist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Migration Checklist & Tools

Complete checklist and automation scripts for zero-downtime WordPress migrations with full SEO preservation.

License: MIT PHP: 7.4+ WordPress: 5.0+


Overview

Migrating a WordPress site without losing traffic, rankings, or functionality requires a systematic approach. This repository provides:

  • Step-by-step checklists for pre- and post-migration phases
  • PHP automation scripts for URL redirects, database search-replace, and health checks
  • Client-ready report templates for professional delivery
  • SEO preservation workflows to protect your search rankings

Repository Structure

wordpress-migration-checklist/
├── checklists/
│   ├── pre-migration.md          # Everything to do BEFORE you migrate
│   └── post-migration.md         # Everything to verify AFTER migration
├── scripts/
│   ├── url-redirect-generator.php   # Generate .htaccess rules from CSV
│   ├── search-replace-db.php        # Safe serialization-aware DB search/replace
│   └── post-migration-health-check.php  # Automated site health verification
├── templates/
│   └── migration-report.md       # Client-facing migration report template
└── README.md

Quick Start

1. Pre-Migration

Work through checklists/pre-migration.md completely before touching any files or DNS settings. No step is optional.

2. Generate Redirect Rules

php scripts/url-redirect-generator.php --input=redirects.csv --output=.htaccess

CSV format:

old_url,new_url
/old-page/,/new-page/
/category/old/,/new-category/

3. Run Database Search & Replace

# Always dry-run first
php scripts/search-replace-db.php --dry-run --from="http://old-domain.com" --to="https://new-domain.com"

# Then execute for real
php scripts/search-replace-db.php --from="http://old-domain.com" --to="https://new-domain.com"

4. Post-Migration Health Check

php scripts/post-migration-health-check.php --url="https://new-domain.com" --report=health-report.json

5. Post-Migration Verification

Work through checklists/post-migration.md and deliver templates/migration-report.md to your client.


Sections

Pre-Migration

  • Full site backup (files + database)
  • Environment documentation
  • SEO baseline capture
  • Redirect planning
  • DNS & SSL preparation
  • Staging environment testing

Migration

  • File transfer via SFTP/rsync
  • Database export, transform, import
  • Configuration updates (wp-config.php, .htaccess)
  • DNS cutover procedure
  • SSL verification

Post-Migration

  • Functional testing (pages, forms, payments, email)
  • SEO verification (canonicals, sitemap, robots.txt)
  • Performance baseline (Core Web Vitals)
  • 30-day monitoring plan

SEO Preservation

  • 1:1 URL mapping for all changed URLs
  • Proper 301 redirect chains (no chains > 1 hop)
  • Canonical tag verification
  • Sitemap submission to Google Search Console
  • Backlink profile preservation

Tools

  • url-redirect-generator.php — Batch .htaccess rule generation
  • search-replace-db.php — Serialization-safe DB search/replace with logging
  • post-migration-health-check.php — Automated broken link and canonical checker

Requirements

Tool Version Purpose
PHP 7.4+ Running the scripts
MySQL/MariaDB 5.7+ Database operations
WP-CLI 2.x Optional, for advanced operations
Screaming Frog Any Pre-migration URL crawl

SEO Preservation Best Practices

  1. Crawl before you migrate. Export all URLs from Screaming Frog before touching anything.
  2. Map every URL. Any URL that changes needs a 301 redirect. No exceptions.
  3. Avoid redirect chains. A→B→C costs you link equity. Flatten to A→C.
  4. Preserve canonical tags. Make sure they point to the new domain, not the old one.
  5. Update internal links. Redirects are a fallback, not a substitute for correct URLs.
  6. Submit sitemap immediately. Help Google discover the new structure fast.
  7. Monitor for 30 days. Check Search Console daily for coverage and crawl errors.

Common Pitfalls

Pitfall Prevention
Serialized data corruption Use search-replace-db.php, never raw SQL
Staging URLs left in content Run health check script after migration
Missing image redirects Include /wp-content/uploads/ in URL crawl
SSL mixed content Force HTTPS in wp-config.php + scan with health check
Redirect chains > 1 hop Health check script detects and reports chains
DNS TTL not lowered Lower to 300s 48 hours before cutover

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


License

MIT License — see LICENSE for details.


Author

Built for professional WordPress migrations. Tested on 50+ production migrations ranging from simple blogs to enterprise WooCommerce stores.

About

Complete checklist and automation scripts for zero-downtime WordPress migrations with SEO preservation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages