How to Migrate WordPress to Next.js Without Losing SEO
Last one we ran: MyCustomPatches went from 3.2s load and 45 PageSpeed on WordPress to 0.7s and 97 PageSpeed on Next.js. Organic traffic up 45 percent in 90 days. Six migrations, zero ranking disasters. Here is the exact process.

Hassan Jamal·Mar 11, 2026·10 min read
Auditing site: 3 Core Web Vitals failing
How To Migrate WordPress To Next.js In 8 Steps
We have migrated WordPress to Next.js six times without losing a single ranking. The playbook: preserve every URL, map a 301 for any that change, transfer all metadata, submit the new sitemap to Search Console on launch day. Rankings hold for 30 to 60 days, then climb because Google rewards the faster Core Web Vitals Next.js delivers natively. Skip any one of those steps and you lose SEO equity you spent years building. Here is the exact process.
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.
- ✓Speed ceiling: WordPress mobile PageSpeed scores plateau at 65 to 75/100 regardless of optimisation. Next.js sites score 95 to 100/100 natively. If you have spent money on speed optimisation and are still stuck, the platform is the problem.
- ✓SEO stagnation: 56% of WordPress sites fail Google's Core Web Vitals on mobile. Failing Core Web Vitals means a persistent structural ranking disadvantage that no amount of content or backlinks fully overcomes.
- ✓Cost and maintenance burden: WordPress hosting, plugin licences, and maintenance typically cost $10,000 to $20,000 over 3 years. Next.js hosting on Vercel is free. The total cost of ownership drops significantly after the initial migration investment.
If any of these sound familiar, the migration will pay back. If you are on WordPress and everything is working fine, traffic growing, conversions healthy, no major speed or security issues, there is no urgent reason to migrate. But most business owners reading this guide are dealing with at least one of these three problems.
Client Receipt: MC Patches LLC (Matt Conner)
WordPress to Next.js migration. Before: 3.2s load, 45 PageSpeed, $150/mo hosting. After: 0.7s load, 97 PageSpeed, $0/mo hosting. Organic traffic up 45 percent in 90 days. Full design assistance and unlimited revisions included. Rated 5 stars on Clutch and GoodFirms.
Site live at mycustompatches.net. Full case study: pandacodegen.com/work/mycustompatches
The Half-Day That Saves Your Rankings
Do not start building until you have completed this checklist. Skipping these steps is why migrations fail or lose rankings.
- ✓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
This audit typically takes half a day. It is the most important half day of the entire migration.
“Missing a 301 redirect on a page with backlinks is the number one cause of ranking drops during WordPress migrations. Every other step is there to prevent it.”
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 a complete spreadsheet of all URLs with their title tags, meta descriptions, H1s, canonical URLs, and HTTP status codes. This document becomes your SEO bible for the migration. Every page that returns a 200 status on WordPress must either return a 200 at the same URL in Next.js or receive a 301 redirect to the correct new URL.
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-optimised 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, set up a headless CMS at this stage. Sanity is our recommendation. It has a clean editing UI similar to WordPress's Gutenberg editor, and the free tier supports most business sites. Contentful is a solid alternative for larger content libraries.
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
- ✓Google Analytics → next/script with lazyOnload strategy
- ✓WooCommerce → Shopify headless or custom Stripe integration
- ✓Social sharing buttons → lightweight custom component (no plugin needed)
Step 5. Critical
Set Up 301 Redirects
This step is non-negotiable for SEO preservation. Every URL that changes between your WordPress site and your Next.js site needs a 301 redirect. 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 need redirects: WordPress often adds /category/ prefixes to blog archives, date-based post URLs (/2024/03/post-name), and tag pages. If you are simplifying your URL structure in Next.js, every old URL needs a redirect to its new equivalent.
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" },
}Add JSON-LD schema markup that Yoast was previously generating. At minimum: Organization, WebSite, BreadcrumbList, and WebPage on every page. Article schema on every blog post. This schema is now inline in your page rather than generated by a plugin: it is more reliable and Google processes it faster.
Generate a new sitemap.xml using the next-sitemap package. Configure it to include all your pages and exclude any admin or API routes.
Step 7
QA and Pre-Launch Testing
Do not go live until all of these pass:
- ✓PageSpeed Mobile score above 90 on your top 5 pages. Run on the Vercel preview URL
- ✓Every 301 redirect tested and returning correct destination URLs
- ✓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 configured correctly (disallow /api/ paths, allow everything else)
- ✓No console errors in Chrome DevTools on any page
- ✓Mobile layout tested on actual devices (not just browser devtools)
This QA phase typically takes 1 to 2 days for a standard business site. Do not rush it. A broken form or missing redirect discovered after launch costs more time and SEO equity to fix than finding it in QA.
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)
- ✓Check that Googlebot can access your new site via Search Console's Coverage report
- ✓Monitor Search Console daily for crawl errors in the first 2 weeks
Rankings may fluctuate in the first 2 to 4 weeks as Google re-crawls and re-evaluates your pages. This is normal. By weeks 4 to 8, your Core Web Vitals field data begins updating in Search Console with real user data from the faster Next.js site. That is when ranking improvements typically start appearing.
Done It 6+ Times
Want Us to Handle the Migration?
We handle the entire process: audit, build, QA, redirect mapping, DNS cutover, and 30-day post-launch monitoring. Guaranteed 95+ PageSpeed score or we fix it for free.
FOUNDER'S OFFER: $500 Founder Migration (Apply)
Don't want to handle this yourself? $500 for a complete custom built migration done by our team. 30% upfront, the rest after the site is live. Every URL redirected. Every page tested. Zero downtime.
What to Expect After the Migration: The Real Timeline
Managing expectations is important. A WordPress to Next.js migration is not an instant ranking boost. Here is the realistic timeline based on our client migrations:
Technical Verification
PageSpeed scores improve immediately and visibly. Verify all redirects, metadata, and sitemap in Search Console. Some minor ranking fluctuations are normal as Google re-evaluates changed or redirected pages.
Googlebot Re-Crawl
Google crawls your new faster site more frequently because of improved TTFB. The Coverage report in Search Console shows pages being re-indexed. Internal linking improvements from cleaner Next.js code get picked up.
Core Web Vitals Update
Real Chrome user data (CrUX) begins reflecting your new faster load times in Search Console's Core Web Vitals report. This is the data Google actually uses for rankings: your pages start moving from Needs Improvement to Good.
Ranking Recovery and Growth
Rankings stabilise at their new baseline, typically equal to or better than pre-migration. Pages that were borderline on Core Web Vitals see the biggest position improvements. Organic traffic increases as better rankings compound.
Compounding Advantage
The full impact becomes visible. Clients typically see 20 to 40% organic traffic increases from the combined effect of better Core Web Vitals, lower bounce rates, and the authority signals that come from faster, more engaging pages.
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: 3 to 6 months part-time
- ✓Learning curve: React, Next.js, Tailwind, headless CMS
- ✓Risk: High. Easy to break SEO during DNS cutover if you miss redirects
- ✓Cost: $0 to $2,000 in tools and hosting
- ✓PageSpeed result: Variable, depends on your optimisation knowledge
- ✓Redirect mapping: Manual, must be 100% complete or rankings drop
Professional Migration
- ✓Timeline: 2 to 6 weeks
- ✓Learning curve: None, handled end to end by us
- ✓Risk: Low. We have done this 6+ times with zero ranking disasters
- ✓Cost: $8,000 to $35,000 depending on complexity
- ✓PageSpeed result: Guaranteed 95 to 100/100 mobile
- ✓Redirect mapping: Automated crawl + manual verification
The decision comes down to your technical background and the revenue your site generates. If your site generates $20,000+/month and you're losing rankings to slow Core Web Vitals, a professional migration pays back within months. If you are a developer who wants to learn Next.js by doing a real project, DIY is a legitimate path. Just budget time for the learning curve. To see exactly what 95+ PageSpeed looks like in practice, read our post on achieving 100/100 PageSpeed scores.
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.
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.
Every month on a slow WordPress platform is a month your competitors with faster Next.js sites are compounding their ranking advantage. The businesses that migrate in 2026 will dominate organic search for the next 3 to 5 years.
FOUNDER'S OFFER: $500 Founder Migration (Apply)
If our Starter ($1,500+) or Growth ($3,500+) tiers are out of budget, apply for our Founder Migration. We pick 3 businesses per month for a $500 full migration (normally $5,000+) in exchange for a verified Google or Clutch review after launch. Requirements: your site is on WordPress, Webflow, Wix, Squarespace, or GoHighLevel, under 15 pages, no e-commerce. April 2026: 1 filled, 2 remaining.
Key Takeaways
- 301 redirects are non-negotiable: Every URL that changes during migration needs a permanent redirect or you will lose the SEO equity you spent years building.
- A proper migration takes 2-6 weeks, not months: The 8-step process (audit, export, setup, build, redirects, metadata, QA, launch) is well-defined and repeatable.
- Rankings recover in 30-60 days and then improve: Temporary fluctuations are normal, but faster Core Web Vitals cause Google to reward your pages with better positions by month 2-3.
- The pre-migration audit is the most important step: Crawling every URL, documenting top pages, and mapping integrations prevents the mistakes that cause ranking drops.
- Your WordPress site stays live until the new one is verified: Zero-downtime DNS cutover means visitors never see a maintenance page during the transition.
Frequently Asked Questions
Frequently Asked Questions
Related Articles
Divi Theme Slow in 2026? Real Scores, Real Costs, and the Only Fix That Works
Divi scores 64 to 68 out of 100 on mobile. That ceiling is built into its architecture. Caching plugins raise your score 10 to 15 points but cannot remove the render-blocking builder JavaScript that fires on every page load. Here is what that costs your business.
WordPress Migration Cost 2026: Full Pricing by Site Size (From $1,500 Starter)
A WordPress to Next.js migration starts at $1,500 in our Starter tier. Growth tier at $3,500 for most business sites. Scale tier at $5,000 to $10,000 for complex WooCommerce stores. This breakdown explains what drives migration cost by tier and how to calculate ROI.
Pagepro Alternatives in 2026: Cheaper, Faster, With a Guarantee
Pagepro, Naturaily, and Blazity are strong Next.js agencies. They all charge $50-99/hr with $25K+ minimums and no published pricing. Here is what they do well, where they fall short, and who offers the same quality at a fraction of the cost with written guarantees.