WordPress SEO migration is one of those projects that looks simple on paper but ends up taking three times longer than quoted. I've migrated 12 WordPress sites this year using Claude Code, and the pattern is consistent: what agencies charge $3,000–$8,000 for, I can now do in 6–12 hours of focused work. The reason is simple — most of the migration work is structured, repeatable, and rule-based. Which means it's perfect for automation.
Here's exactly how I do it, broken down into the parts you can automate and the parts that still require human judgment.
Why Most WordPress Migrations Lose SEO Equity
Before I get into the process, it's worth understanding why so many WordPress SEO migrations go wrong. The three most common failure points:
- Missing 301 redirects — old URLs disappear without proper redirects, resulting in 404 errors and lost link equity
- Lost meta data — title tags, meta descriptions, and schema markup don't carry over to the new platform
- Broken internal links — links between pages break because URL structures change without a systematic find-and-replace
Each of these problems is solvable, but only if you approach the migration systematically. That's where Claude Code comes in.
Step 1: Export the SEO Data Layer
The first task is extracting all the SEO-relevant data from WordPress. This includes URLs, titles, meta descriptions, focus keywords (if you're using Yoast or Rank Math), canonical tags, schema markup, and any custom fields relevant to search.
I use a Claude Code script that connects to the WordPress database (via MySQL or the REST API if the site is still live) and pulls everything into a structured JSON file. The script knows where each SEO plugin stores its data — Yoast meta fields live in wp_postmeta with specific meta keys, and Rank Math uses a similar structure.
The output looks something like this for each post or page:
{
"id": 482,
"old_url": "/blog/best-marketing-tools-2025/",
"title": "Best Marketing Tools for Small Businesses in 2025",
"meta_description": "A curated list of 12 marketing tools that actually move the needle for Vancouver SMBs — with pricing and feature breakdowns.",
"focus_keyword": "marketing tools 2025",
"canonical": "https://oldsite.com/blog/best-marketing-tools-2025/",
"schema_type": "Article",
"published_date": "2025-03-14",
"modified_date": "2025-06-02"
}
This structured export is critical because it becomes the source of truth for everything that follows. If it's incomplete or inaccurate, the rest of the migration will be flawed.
Step 2: Map Old URLs to New URLs
Next step is figuring out where each old URL should point on the new site. This is partly automated and partly manual, depending on how similar the old and new structures are.
For sites where the URL structure stays the same (e.g., migrating from WordPress to a headless CMS but keeping the same slug pattern), the mapping is straightforward. Claude Code can generate a redirect list automatically.
For sites with structural changes — say, moving from /blog/post-name/ to /resources/post-name/ — I provide Claude Code with the mapping rules and it applies them systematically. The script flags any edge cases where the rule doesn't work cleanly, and I handle those manually.
The key insight here: even when URL structures change, 80–90% of pages follow predictable patterns. Automate the bulk, review the exceptions.
The output is a redirect map — a CSV or JSON file with old_url and new_url columns. This becomes the input for generating 301 redirects in whatever format the new platform needs (Nginx config, Apache .htaccess, or a redirects plugin).
Step 3: Generate the Redirect Rules
Once I have the redirect map, Claude Code writes the actual redirect configuration. For an Nginx-based site, the format looks like this:
location = /blog/best-marketing-tools-2025/ {
return 301 https://newsite.com/resources/best-marketing-tools-2025/;
}
For 200+ URLs, writing these manually is error-prone and time-consuming. The script generates all of them in seconds, and I review a sample to confirm the pattern is correct before deploying.
If the new site is also WordPress, I use a plugin like Redirection or Simple 301 Redirects and have Claude Code format the output as a CSV import for that plugin.
Testing the Redirects
Before going live, I run a validation script that hits each old URL and confirms:
- The HTTP response is a 301 (not a 302 or 404)
- The destination URL is correct and loads successfully
- There are no redirect chains (A → B → C) — every redirect should be one hop
This step catches configuration mistakes before they affect real traffic.
Step 4: Preserve Meta Tags and Schema
The redirect layer handles the URL continuity, but you also need to preserve the on-page SEO signals. That means carrying over:
- Title tags
- Meta descriptions
- Open Graph and Twitter Card tags
- Structured data (JSON-LD schema)
If the new site has an SEO plugin or a custom meta system, Claude Code can format the exported data to match that system's import structure. For a custom-built site, I have it generate the meta tags directly in the HTML templates or as a database seed file.
This is where the WordPress content migration workflow I wrote about earlier becomes relevant — the same extraction and transformation pattern applies to both content and metadata.
Step 5: Internal Link Rewrites
One often-overlooked piece of WordPress SEO migration: internal links embedded in post content. If your old site linked to /blog/post-a/ and the new structure is /resources/post-a/, those links need to be rewritten or they'll break.
Claude Code handles this with a find-and-replace script that runs against the content database. For simple URL pattern changes, it's a straightforward regex operation. For more complex scenarios (e.g., some posts moved to a new section, others stayed in place), I provide a mapping file and the script applies the correct transformation per post.
The key is doing this before the content is imported to the new platform, so you're not chasing broken links after launch.
What Still Requires Manual Work
Even with all this automation, there are parts of a WordPress SEO migration that I still handle manually:
- Quality review of high-traffic pages — I manually check the top 10–20 landing pages to ensure meta tags, schema, and content formatting look right
- Edge case URL decisions — pages that don't fit the migration pattern (e.g., old landing pages being consolidated, retired content, URL conflicts) need human judgment
- Post-launch monitoring — I watch Search Console for crawl errors and ranking changes in the first two weeks and address issues as they come up
The automation handles the volume work. The manual layer is quality control and strategic decisions.
Typical Timeline and Cost Savings
A traditional agency-led WordPress SEO migration for a 50–200 page site typically runs 20–40 billable hours at $150–$200/hour. That's $3,000–$8,000, not including content migration or design work.
With Claude Code handling extraction, redirect generation, meta tag preservation, and internal link rewrites, the same project takes me 6–12 hours. Most of that time is review, testing, and handling edge cases. The actual execution — generating redirects, formatting meta data, rewriting internal links — happens in minutes.
For clients, this means:
- Lower cost (typically 50–70% less than a traditional migration)
- Faster turnaround (days instead of weeks)
- Higher accuracy (fewer manual errors in redirect mapping and meta tag entry)
Who This Approach Works For
This process is best suited for:
- WordPress sites with 50–500 pages that are moving to a new platform or restructuring URLs
- Sites that use Yoast, Rank Math, or another SEO plugin with structured metadata
- Migrations where preserving organic traffic is a top priority and budget is constrained
It's less relevant for brand-new sites with no existing SEO equity, or for very large sites (1,000+ pages) where a more enterprise-grade migration tool might be justified.
If you're planning a WordPress migration and want to preserve your SEO without spending $5k+ on agency fees, this is the approach I'd recommend. And if you want me to handle it for you — either as a full migration or as a one-time setup where I build the scripts and you run them — that's something I do regularly.
For more on how Claude Code fits into broader WordPress automation workflows, check out my posts on WordPress automation and SEO automation. And if you have questions about whether this approach makes sense for your specific situation, the FAQ covers most of the common scenarios.