How to Migrate WordPress to Next.js Without Losing SEO
MyCustomPatches is an independent client, and its owner reports that the migration was completed in about 22 days. The performance numbers we previously published for it 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·11 min read
Hassan plans WordPress to Next.js migrations around four things: performance you can measure, URLs that keep working, crawling the staged site before anyone sees it, and a handover that does not surprise you.
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 move that keeps your search traffic starts with a list, not a promise. Write down every web address you have, keep the valuable ones exactly as they are, decide what happens to each of the rest, 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. Where custom code is the answer, PandaCodeGen builds it from $1,500 at a fixed price, has no minimum project size, and hands you code you own.
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.
- ✓Still slow after real effort: some WordPress sites stay slow no matter what you do, because the theme, the plugins, the database, the hosting or outside scripts are the limit. 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
MyCustomPatches is an independent client, not a PandaCodeGen property, and its figures are owner-confirmed and published with permission. The client's owner reports a delivery of about 22 days. We do not hold a dated record of that confirmation, so treat it as an owner statement rather than an audited figure. 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.
Site live at mycustompatches.net. See the project evidence standard.
"Businesses migrate WordPress to Next.js for one of three reasons, and speed is only one of them.
First Decide Whether WordPress Stays: Headless or Full Migration
Every other decision on this page depends on this one, and it is the step most guides skip. There are two destinations, not one. Headless keeps WordPress running as the content backend and replaces only the front end with Next.js, so editors keep working in wp-admin exactly as they do today. Full migration takes the content out of WordPress altogether, into Markdown/MDX files in the repository or into a separate headless CMS, and WordPress is switched off at the end.
Choose by who edits the site and how often, not by which stack sounds more modern:
- ✓Choose HEADLESS when non-technical people publish regularly, when editorial workflow, roles, scheduling or preview matter, or when existing plugins own real functionality you are not ready to rebuild. Next.js reads the content over the WordPress REST API at /wp-json/wp/v2/, or over GraphQL if you install the WPGraphQL plugin.
- ✓Choose FULL MIGRATION when the site is a marketing or documentation site that changes rarely, when developers are the people who edit it, or when you want the WordPress hosting, updates and plugin-security surface gone permanently. Content lands as MDX in the repo, or in a CMS such as Sanity or Payload.
- ✓Count the ongoing bill before choosing. Headless keeps you paying for WordPress hosting and maintenance on top of the new front end, so it is two systems to run, not one. Full migration removes that line but moves editing further from non-technical staff.
- ✓Decide this before the URL audit below, because it changes what you have to export and what you can leave in place.
Neither is the advanced option. A five-person marketing team publishing twice a week is usually worse off on MDX, and a documentation site with two developer maintainers is usually worse off paying to keep WordPress alive behind it. The one combination that reliably disappoints is choosing headless to avoid a content migration and then discovering the plugins you kept WordPress for are the same plugins slowing the site down.
The Pre-Migration Audit That Protects High-Value URLs
Do not start building until you have worked through this checklist. If you skip the baseline, the list of URLs, or the map of what connects to what, you are far more likely to break something at launch and lose search traffic you did not need to lose.
- ✓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 might take half a day to inventory. A large publisher or shop takes much longer. What you end up with should be one file, kept under version control, that says: here are the URLs, here is the content, here is what connects to what, here are the numbers we started from, here is who owns each part, and here is how we will sign it off.
“A missing or wrong forward on a page that has traffic or links pointing at it is the most preventable way to lose search traffic. List every address first, then write down where each one goes and test them 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 your team needs to edit blog posts or pages themselves, work out what they actually need before you pick a CMS: which fields, how content pieces relate to each other, who is allowed to do what, whether they can preview before publishing, whether you need other languages, and who signs a post off. Sanity and Contentful are both established choices. Check the plan you would be on, what usage is included, what editor seats cost, and what you would pay to run it.
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 your page-level robots tags match what you agreed to index. Anything sensitive sits behind a login and a permission check, because robots.txt asks crawlers politely and stops nobody
- ✓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 your clicks, impressions, searches, landing pages, indexed URLs and conversions against the baseline you recorded before the move. Then separate what the migration broke from what changed anyway: the time of year, content you edited, a competitor improving, or Google changing its ranking.
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 how well you know Next.js, how many hours a week you actually have, how many pages there are, what has to be reconnected, how much content moves, and how much you test
- ✓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: your engineering time, commercial hosting you have to pay for, a CMS, monitoring, and any specialist tools you end up buying
- ✓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 puts fixing and speeding up your WordPress site side by side with rebuilding it in Next.js. Then it writes down every URL, what the migration would cost, where your PageSpeed scores start, how we would sign off the SEO side, who does what at cutover, and how we would reverse it. If the evidence does not justify moving, improving what you have is 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 the work, not a template: how many pages there are, how much content needs tidying, what has to be reconnected, how long approvals take, how many URLs are awkward exceptions, and how much testing you do.
- 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 audit before you start is what makes testing possible: every URL listed, the landing pages that matter most identified, canonical tags recorded, the sitemap captured, integrations mapped, analytics noted, and agreement on what counts as done.
- 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
How long does it take to migrate WordPress to Next.js?
Weeks, and the schedule is set by how many distinct templates your theme actually renders rather than by post count. Content moves in bulk through the REST API or an export; templates are rebuilt one at a time. Plugin-provided functionality is the wildcard, because each one has to be replaced or deliberately dropped.
Will I lose my Google rankings when migrating from WordPress to Next.js?
WordPress permalinks can usually be reproduced exactly in Next.js, so this migration can be near-neutral on addresses if you decide to keep them. Most losses come from the rendering change instead: check that every template ships its content in the initial HTML rather than assembling it client-side, and compare a representative page's rendered output on both sides.
Do I need to rebuild my content when migrating to Next.js?
Not necessarily. Existing WordPress content can often be exported and transformed into a headless CMS, structured data source, or static content files without rewriting the message. The work is in preserving fields, relationships, media, URLs, metadata, and editorial workflows, then validating the migrated output against the source inventory.
What happens to my WordPress plugins after migration?
Plugins do not move automatically to Next.js. Inventory each plugin's real business function, data, workflow, user role and integration, then replace, rebuild, retire or keep it behind a supported service. Test content, forms, search, commerce, analytics, consent and operations before cutover.
How much does it cost to hire someone to migrate WordPress to Next.js?
Our tiers start at $1,500, $3,500 and $5,000, and the deciding factor is template count rather than post count. Three hundred posts sharing one template is a small job. Fifteen distinct page layouts plus WooCommerce is not. Count your theme's actual templates before asking anyone for a number, and you will get a better quote.
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.
CMS Market Share 2015 to 2026: WordPress Peaked in 2022
Twelve years of measured CMS market share. WordPress peaked at 65.2% in 2022 and is at 59.0% in the August 2026 reading, self-hosted platforms lost 12.7 points while hosted builders gained 12.8, and Webflow has not moved in three readings.