How to Migrate WordPress to Next.js Without Losing SEO
PandaCodeGen's owner confirms that MyCustomPatches was delivered in 22 days. The previously published performance numbers have been withdrawn until their dated URLs, profiles, run count, cache and consent state are reconciled. Here is the SEO migration checklist behind the work.
Hassan Jamal·Mar 11, 2026·10 min read
SEO migration control loop
A deliberate decision for every old URL
URL inventory
Crawl and baseline
Disposition map
Keep, redirect, or retire
Staged QA
Crawl, forms, consent, and speed
Monitor
Indexing, queries, and errors
Reduce technical risk. Do not promise rankings.
How To Migrate WordPress To Next.js In 8 Steps
A WordPress to Next.js migration without losing SEO starts with evidence, not a ranking promise. Build a complete URL inventory, keep valuable URLs stable, record a disposition for every old URL, create and validate 301 redirects when a changed URL has a relevant successor, preserve metadata and canonical tags, submit the new sitemap, run a staged crawl, and monitor Google Search Console after launch. Some ranking volatility can occur while search engines recrawl and reprocess the site. No agency can guarantee rankings, but a documented process reduces avoidable technical risk. If you are still weighing the risk, our guide to whether migrating hurts your SEO explains what separates a controlled migration from a costly one.
Three Reasons People Leave WordPress. Only One Is About Speed.
Before getting into the how, it is worth being clear on why. Businesses migrate WordPress to Next.js for one of three reasons. Understanding which one applies to you affects how you approach the migration.
- ✓Performance constraints: some WordPress sites remain slow after sensible optimization because the theme, plugin stack, database work, hosting, or third-party scripts limit further gains. Measure representative pages before deciding that a rebuild is necessary.
- ✓Search and page-experience risk: poor Core Web Vitals can weaken the user experience and contribute to search-performance problems, but they are only part of Google's broader ranking systems. Base the decision on lab tests, field data, crawl health, content quality, and conversion evidence rather than a blanket WordPress failure statistic.
- ✓Cost and maintenance burden: compare the current spend on hosting, premium plugins, security, updates, and developer support with the proposed WordPress migration cost. Commercial Next.js hosting on Vercel Pro starts at $20 per month plus usage. Vercel Hobby is for personal, non-commercial use, so it is not a valid business-hosting cost assumption.
If any of these sound familiar, a migration may be worth scoping. If your WordPress site is reliable, traffic is growing, conversions are healthy, and maintenance is manageable, there may be no urgent reason to rebuild it. A fit audit should compare repair, optimization, and migration before recommending a platform change.
Owner-confirmed project: MyCustomPatches
The owner confirms a 22-day delivery. This article does not treat that number as a market average or as proof of the project's exact migration inventory. We publish performance figures only with the test profile, date and conditions attached, so none are quoted here. Commercial hosting is budgeted under the destination provider's business plan rather than presented as free. Project feedback is available on Clutch and GoodFirms.
Site live at mycustompatches.net. See the project evidence standard.
The Pre-Migration Audit That Protects High-Value URLs
Do not start building until you have completed this SEO migration checklist. Missing the baseline, URL inventory, or integration map increases the chance of avoidable launch errors and search-visibility loss.
- ✓Crawl your full site with Screaming Frog (free up to 500 URLs) and export every URL, title tag, meta description, H1, and status code
- ✓Export your Google Search Console data: top 50 pages by clicks, top 50 by impressions. These are the pages you cannot afford to break
- ✓Screenshot your current PageSpeed score on mobile for every key page. This is your baseline to beat
- ✓Document every third-party integration: forms, chat, analytics, pixels, booking tools. Each one needs a Next.js equivalent
- ✓List every plugin and its function. Each will need a native replacement in Next.js
- ✓Set up Google Search Console for your domain if not already done. You will need it immediately after launch
A small business site may take half a day to inventory; a large editorial or ecommerce site can take much longer. The output should be a versioned source of truth for URLs, content, integrations, baselines, owners, and acceptance checks.
“A missing or incorrect 301 redirect on a URL with traffic or backlinks is a preventable migration risk. Build the URL inventory first, then document every route and validate redirects for changed URLs with relevant successors before launch.”
Hassan Jamal, PandaCodeGen
The 8 Steps We Run Every Time
Step 1
Audit Your WordPress Site
Crawl every URL using Screaming Frog or Sitebulb. Export the URL, title tag, meta description, H1, canonical URL, indexability, and HTTP status. This becomes the SEO migration source of truth. Each indexable WordPress URL should remain at the same path, receive a validated 301 redirect to a relevant replacement, or be intentionally retired with the decision documented.
Also pull your top pages from Google Search Console sorted by clicks. These get the most scrutiny during QA. A broken redirect on your top landing page can cost you significant traffic.
Step 2
Export Your WordPress Content
Go to WordPress Admin → Tools → Export → All Content. Download the XML file: it contains every post, page, category, tag, and custom field. For images, download your full wp-content/uploads folder via FTP or your host's file manager.
Before importing images into Next.js, convert them to WebP format and compress them to under 150KB where possible. Tools like Squoosh or ImageOptim work well for batch conversion. Next.js's next/image component will handle responsive sizing automatically, but starting with well-optimized source images gives you the best PageSpeed baseline.
Step 3
Set Up Your Next.js Project
Scaffold your project with npx create-next-app@latest --typescript. Install Tailwind CSS for styling. Deploy an empty shell to Vercel immediately. This sets up your CI/CD pipeline so every commit deploys automatically. You will use preview URLs for QA throughout the build.
If you need a content management interface for blog posts or frequently updated pages, define the fields, relationships, roles, preview workflow, localization, and publishing approvals before choosing a headless CMS. Sanity and Contentful are established options, but plan eligibility, included usage, editor seats, and operating cost should be checked against the current project requirements.
Step 4
Build Your Pages and Migrate Content
Build each page as a React Server Component in Next.js. Replicate your navigation structure, internal linking, and page hierarchy exactly. Import your WordPress XML content into your CMS or convert blog posts to MDX files. Use next/image for every image: this automatically serves WebP, handles lazy loading, and generates responsive sizes.
For each WordPress plugin, implement the equivalent native solution:
- ✓Contact Form 7 / Gravity Forms → API route + Resend or Nodemailer
- ✓Yoast SEO → Next.js metadata API + JSON-LD schema in each page
- ✓Analytics and advertising tags → consent-gated loading through the site's approved consent flow, with regional behavior and event delivery verified before launch
- ✓WooCommerce → Shopify headless or custom Stripe integration
- ✓Social sharing buttons → lightweight custom component (no plugin needed)
Step 5. Critical
Set Up 301 Redirects
Redirect decisions are a critical part of SEO preservation. Each changed URL with a relevant successor should normally receive a server-side permanent redirect. An intentionally removed URL with no useful replacement can return 404 or 410 instead of sending users to an unrelated page. Record that decision for every URL in the inventory. In next.config.js, add a redirects array:
async redirects() {
return [
{
source: '/old-wordpress-slug',
destination: '/new-nextjs-path',
permanent: true, // 301
},
]
}Common URL changes that may need redirects include WordPress /category/ archives, date-based post URLs (/2024/03/post-name), and tag pages. Map useful old URLs to the closest relevant equivalent, avoid redirecting many unrelated pages to the homepage, and keep the migration redirects in place for at least one year under Google's current site-move guidance.
Step 6
Migrate All SEO Metadata
Transfer every title tag, meta description, Open Graph tag, and canonical URL from WordPress (via Yoast or RankMath) to Next.js. In Next.js 14+, use the metadata API in each page.tsx:
export const metadata = {
title: "Your Page Title",
description: "Your meta description",
alternates: { canonical: "https://yoursite.com/page" },
openGraph: { title, description, type: "website" },
}Recreate only the JSON-LD structured data that accurately describes the page and was previously generated by WordPress or its SEO plugin. Common types include Organization, WebSite, BreadcrumbList, WebPage, and Article where eligible. Keeping schema in the codebase makes it version-controlled and testable, but it does not guarantee a rich result.
Generate a new sitemap.xml with Next.js metadata routes or next-sitemap. Include the canonical, indexable URLs you want search engines to discover, exclude application and API routes, and compare the output with the approved URL inventory.
Step 7
QA and Pre-Launch Testing
Do not go live until all of these pass:
- ✓If the signed scope includes a 90+ mobile PageSpeed acceptance target, run three tests on each agreed representative page and record the URL, device profile, date, and environment
- ✓Every URL assigned a redirect tested for the expected permanent status, relevant destination, and final 200 response without a chain; every intentional retirement tested for its documented 404 or 410 response
- ✓All forms submitting correctly with confirmation emails firing
- ✓All images loading with correct alt text and dimensions
- ✓Google's Rich Results Test passing on key schema pages
- ✓sitemap.xml rendering all expected URLs at /sitemap.xml
- ✓robots.txt and page-level robots directives match the approved indexation plan; sensitive API routes use authentication and authorization because robots.txt is not access control
- ✓No console errors in Chrome DevTools on any page
- ✓Mobile layout tested on actual devices (not just browser devtools)
QA duration follows the number of templates, URLs, forms, integrations, devices, redirect exceptions, and acceptance rounds in scope. Do not compress it into a universal one- or two-day promise. A broken form or missing redirect discovered after launch costs more time to fix than finding it in staging.
Step 8
DNS Cutover and Post-Launch Monitoring
When QA is complete and everything passes, update your domain DNS to point to Vercel. In your domain registrar, update the A record to Vercel's IP or add a CNAME pointing to your Vercel project URL. Vercel provisions an SSL certificate automatically within minutes.
Immediately after DNS propagates and your new site is live:
- ✓Submit your new sitemap.xml in Google Search Console → Sitemaps
- ✓Use Google Search Console's URL Inspection tool to request indexing on your top 10 pages
- ✓Verify your old WordPress site is fully offline or returning 301s (not serving duplicate content)
- ✓Use Search Console's URL Inspection and Page indexing reports to check how Google sees the production URLs
- ✓Monitor Search Console daily for crawl errors in the first 2 weeks
Ranking volatility can occur while Google recrawls URLs, follows redirects, and reprocesses canonical signals. There is no fixed recovery window and no agency can guarantee that rankings will rise. Compare clicks, impressions, average position, indexed URLs, crawl errors, and conversions with the pre-launch baseline. Core Web Vitals field data can update only after enough eligible Chrome user data is collected, so use lab tests for immediate debugging and Search Console for longer-term monitoring.
Scope, Test, Cut Over
Want Us to Handle the Migration?
We handle the URL inventory, build, staged crawl QA, 301 redirect mapping and validation, DNS cutover, rollback plan, and post-launch Google Search Console monitoring. Support days, representative test pages, measurement conditions, and any 90+ PageSpeed acceptance target are written into the signed scope. A performance target is not a ranking guarantee.
What to Expect After the Migration: The Real Timeline
A WordPress to Next.js migration is not an instant ranking boost. This sequence describes what the team should verify after cutover; it is an operating plan, not a promise about when Google will recrawl the site or how rankings will move.
Technical Verification
Run the staged checklist again in production. Verify redirects, canonical tags, robots directives, sitemap coverage, analytics, forms, and the agreed PageSpeed test set. Log any ranking volatility without treating daily movement as a verdict.
Crawl and Index Monitoring
Use Google Search Console's Page indexing and URL Inspection reports to check whether Google sees the intended status, canonical, and rendered page. Crawl timing varies by site, so investigate errors rather than promising a recovery date.
Core Web Vitals Review
Compare lab measurements with the Core Web Vitals field report when enough real-user data becomes available. CrUX uses a rolling collection window and may not report every URL. Better field performance supports page experience, but it does not guarantee higher rankings.
Search Baseline Review
Compare clicks, impressions, queries, landing pages, indexed URLs, and conversions with the dated pre-migration baseline. Separate technical migration issues from seasonality, content changes, competitors, and wider search updates.
Content and Conversion Iteration
Once crawl and measurement signals are stable, prioritize content gaps, internal links, snippets, and conversion friction. Traffic growth should be reported from the site's own Search Console and analytics data, not from a universal percentage claim.
DIY Migration vs Professional Migration: The Honest Comparison
This guide gives you the full process. But it is worth being direct about what DIY migration actually involves if you are not an experienced Next.js developer.
DIY Migration
- ✓Timeline: Depends on your Next.js experience, available hours, page inventory, integrations, content migration, and QA scope
- ✓Learning curve: React, Next.js, Tailwind, headless CMS
- ✓Risk control: You own the URL inventory, redirect QA, launch checklist, and rollback plan
- ✓WordPress migration cost: Engineering time, paid commercial hosting, CMS, monitoring, and any specialist tools
- ✓PageSpeed result: Variable, depends on implementation and optimization knowledge
- ✓Redirect mapping: Inventory-led mapping and validation for every changed or retired URL
Professional Migration
- ✓Timeline: Quoted after the page, content, integration, and approval dependencies are inventoried
- ✓Client input: Required for content decisions, access, acceptance, and launch approval
- ✓Risk control: Documented crawl QA, redirect validation, rollback planning, and post-launch monitoring; rankings cannot be guaranteed
- ✓WordPress migration cost: Fixed or phased in the signed proposal after discovery
- ✓PageSpeed result: A 90+ mobile target can be an acceptance criterion on agreed representative pages when written into scope
- ✓Redirect mapping: Automated crawl plus manual review of high-value and exception URLs
The decision comes down to technical capacity, migration risk, and what the website supports. For a revenue-generating site, compare the quoted migration cost with maintenance spend, conversion friction, downtime exposure, and the internal time required for DIY delivery. A professional migration can reduce execution risk, but it cannot promise payback or rankings. If you are a developer who wants to learn Next.js through a real project, DIY is a legitimate path. Just budget time for crawl QA, accessibility, analytics, consent, security, and rollback testing as well as the build. For the measurement process, read our guide to a 90+ PageSpeed score.
Either way, read our post on WordPress vs Next.js before committing: it covers the full comparison of what you gain and what you trade off. And see our guide to fixing a slow WordPress site if you want to understand exactly where the WordPress speed ceiling is before deciding whether a migration is necessary. This is also the exact move we made for our own site, and we documented why we moved off WordPress ourselves with the before and after numbers.
Ready to Migrate?
Get a Free WordPress Migration Assessment
We will audit your WordPress site, scope the migration, map every redirect, and give you a fixed-price quote before you commit to anything.
The assessment compares WordPress repair and optimization with a Next.js rebuild, then documents the URL inventory, migration cost, PageSpeed baseline, SEO acceptance checks, cutover responsibilities, and rollback plan. If migration is not justified by the evidence, improving the current WordPress site may be the better recommendation.
Key Takeaways
- Every old URL needs a deliberate disposition: Keep stable URLs unchanged where possible, map changed URLs to relevant successors with permanent redirects, and document intentional 404 or 410 retirements. Validate each decision before launch.
- Timeline follows scope and dependencies: Page count, content cleanup, integrations, approvals, redirect exceptions, and QA determine how long the eight-step migration takes.
- No agency can guarantee rankings: Expect possible ranking volatility, preserve technical signals carefully, and use Google Search Console monitoring against a dated baseline. Better Core Web Vitals support page experience, but do not cause a guaranteed position gain.
- The pre-migration audit creates the control set: A complete URL inventory, priority landing pages, canonical tags, sitemap, integrations, analytics, and acceptance criteria make staged crawl QA possible.
- Plan a controlled cutover and rollback: Keep WordPress available until the Next.js release is accepted, lower DNS TTL when appropriate, verify production immediately, and define how to reverse the cutover if a critical check fails.
Frequently Asked Questions
Related Articles
Next.js and Sanity in 2026: Fit, Cost and Tradeoffs
A current guide to Next.js with Sanity: rendering and content roles, editorial workflows, localization, pricing, security boundaries and when to use a simpler stack.
WordPress in April 2026: Three Security and Product Records
A source-led review of the Smart Slider 3 Pro and EssentialPlugin supply-chain incidents plus a WooCommerce core team lead's public feedback thread and their limits.
Divi Theme Slow? A 2026 Diagnostic and Fix Guide
Diagnose a slow Divi site, test Divi 5 and in-place fixes, and decide whether to optimize, rebuild in WordPress, or migrate.