PandaCodeGen
+1 (302) 250-4340

info@pandacodegen.com

Back to Blog
WordPress

How to Migrate WordPress to Next.js Without Losing SEO

We have done this 6+ times. Here is the exact process, starting from crawling your WordPress site on day one all the way to monitoring rankings 30 days after launch. No steps skipped.

Hassan Jamal

Hassan Jamal·Mar 11, 2026·10 min read

What This Guide Covers

Migrating WordPress to Next.js takes 2 to 6 weeks professionally. The SEO risk is real but manageable: preserve all URLs, map 301 redirects for any that change, transfer all metadata, and submit a new sitemap to Google Search Console on launch day. When done correctly, rankings hold or improve within 30 to 60 days because Google rewards the faster Core Web Vitals that Next.js delivers natively. This guide covers every step in order.

Why Businesses Migrate WordPress to Next.js

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.

"MyCustomPatches migrated from a slow WordPress site to Next.js. Before: 3.2s load time, 45/100 PageSpeed. After: 0.7s load time, 97/100 PageSpeed. Organic traffic increased 45% in 90 days.

Before You Start: The Pre-Migration Checklist

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.

The 8-Step Migration Process

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.

Missing a 301 redirect on a page with backlinks is the #1 cause of ranking drops during WordPress migrations. Check every URL in your Screaming Frog export against your Next.js routes before going live.

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.

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:

Day 1 to 7

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.

Week 2 to 4

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.

Week 4 to 8

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.

Month 2 to 3

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.

Month 3 to 6

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.

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.

Published: Mar 11, 2026

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.

View WordPress Migration Service

Key Takeaways

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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