Back to blog
December 3, 2026•88 views

From WordPress to Next.js: A Founder's Migration Roadmap (SEO, Costs, and Zero-Downtime Cutover)

nextjswordpressmigrationseoheadless cmsweb developmenthiring a developer
From WordPress to Next.js: A Founder's Migration Roadmap (SEO, Costs, and Zero-Downtime Cutover)

Every few weeks someone emails me the same question in slightly different words: "My WordPress site is slow, my plugin bill is creeping up, and my developer says Next.js. Should I migrate?" Sometimes it's a founder in Dhaka, sometimes an agency owner in Sydney or Austin. The answer is almost never a flat yes.

I've shipped a lot of websites and web apps across WordPress and Next.js, and I've done the unglamorous part too: mapping old URLs, watching Search Console for weeks, rolling back a cutover at 2am. This is the roadmap I actually use when clients ask me to migrate WordPress to Next.js. It's written so a founder can judge the risk and a developer can execute it.

First, decide whether you should migrate at all

Next.js is not a religion. It's a rendering framework. If WordPress is doing its job, moving to Next.js is a cost, not an upgrade. Before you touch anything, run your site through this honest filter.

When migrating off WordPress makes sense

  • Your Core Web Vitals are stuck. An LCP above 2.5s on mobile that no caching plugin fixes usually means the problem is rendering architecture, not plugins. (2.5s is Google's "good" LCP threshold, see the Core Web Vitals guidance.)
  • You're building an app, not a brochure. Dashboards, auth, checkout flows, real-time features. WordPress fights you here.
  • Your content is mostly static and rarely edited by non-technical staff. A blog or marketing site with 200 posts and two editors is a great fit for Next.js.
  • Plugin sprawl is a security and maintenance tax. I've seen sites with 40+ plugins. Every one is a future CVE. If that's you, read my WordPress security checklist for 2026 before you decide.
  • You want full design and performance control without fighting a theme.

When you should NOT migrate

  • Your team lives in the WordPress editor and won't learn a new CMS. Editorial friction is a real cost. If nobody can publish, the site dies a slow death.
  • You rely on WooCommerce with complex tax, shipping, and subscription rules. Rebuilding that in Next.js is a project, not a migration.
  • You have a membership site with thousands of roles and gated content. Possible, but budget accordingly.
  • Your site is fine. If your Lighthouse scores are green and traffic is growing, spend the money on content instead. I've talked more than one client out of a rebuild.

The three migration paths (and which one you actually want)

This is the decision most guides skip. There isn't one migration. There are three, and they have very different costs and tradeoffs.

Path What it means Best for Typical timeline Ongoing complexity
Headless WordPress Keep WordPress as the CMS, build a Next.js frontend that pulls content via WPGraphQL or REST Teams that love the WP editor but want Next.js speed 4 to 8 weeks Medium (two systems to maintain)
Full rebuild with a modern CMS Move content to Sanity, Payload, Contentful, or a database-driven custom CMS Founders wanting a clean slate and a fast, maintainable site 6 to 14 weeks Low to medium
Static export Next.js output: 'export' with content in Markdown or a git-based CMS Blogs, docs, marketing sites with infrequent updates 2 to 5 weeks Low

My default recommendation for a founder with an active blog: headless WordPress if the editorial team is large, full rebuild if it's you and one writer. Static export is tempting for cost, but the moment you need forms, search, or dynamic content you regret it. (Note that output: 'export' disables server-side features like ISR, middleware, and route handlers, see the Next.js static exports docs.)

If you're leaning toward the headless path, I've written a full walkthrough of the Next.js and headless WordPress setup, including the API wiring and preview flow.

Step-by-step: the migration playbook

Here's the sequence I run. Don't skip steps 1 and 2. That's where rankings go to die.

Step 1: Crawl and inventory every URL

Before writing a line of code, export every URL that currently exists and returns a 200. Use Screaming Frog (the free tier covers up to 500 URLs) or wget plus a sitemap merge. You need:

  • All posts, pages, category archives, tag archives, author archives
  • All media URLs (images get indexed too)
  • All paginated URLs (/page/2/, etc.)
  • Any legacy URLs that still get traffic in Search Console

Export this to a spreadsheet. This becomes your redirect map and your QA checklist. I keep it in git so every redirect is reviewed like code.

Step 2: Decide the URL structure before you build

This is the SEO-preservation decision that matters more than anything else. If your WordPress URLs look like /2023/05/my-post-title/, you have two choices:

  1. Preserve the exact path in Next.js. Zero redirects, zero risk. This is what I recommend for sites with meaningful organic traffic.
  2. Flatten to /blog/my-post-title/ and 301 every old URL. Cleaner, but every redirect is a small risk of loss.

For a site under ~50 posts with low traffic, flatten. For anything with real rankings, preserve. The 30 seconds of "ugly URLs" is worth more than the traffic you'd lose.

Step 3: Model your content

If you're keeping WordPress as a headless CMS, install WPGraphQL (or use the REST API) and map every post type and ACF field to a TypeScript type. If you're rebuilding, this is where you define your schema in Sanity or Payload.

// types/content.ts
export type Post = {
  slug: string;
  title: string;
  excerpt: string;
  publishedAt: string;
  updatedAt: string;
  content: string; // rendered HTML or MDX
  seo: {
    title: string;
    description: string;
    canonical?: string;
    ogImage?: string;
  };
};

Get this wrong and you'll be refactoring mid-migration. Get it right and the rest is mechanical. When those API responses come back as unknown, my guide to TypeScript type guards for Next.js shows how to narrow them safely instead of casting your way into runtime errors.

Step 4: Build pages with the right rendering strategy

Next.js App Router gives you three tools. Use them deliberately.

  • generateStaticParams + static generation for blog posts, docs, and anything that doesn't change hourly.
  • ISR (Incremental Static Regeneration) for content that updates but doesn't need to be real-time. Set revalidate to something sensible like 3600 seconds. (See the ISR docs.)
  • Server Components with cache: 'no-store' only for genuinely dynamic data (user-specific, real-time).

If you're on headless WordPress, wire up on-demand revalidation so publishing a post triggers a rebuild without waiting for the cache window:

// app/api/revalidate/route.ts
import { revalidatePath } from 'next/cache';
import { NextRequest, NextResponse } from 'next/server';

export async function POST(req: NextRequest) {
  const secret = req.headers.get('x-revalidate-secret');
  if (secret !== process.env.REVALIDATE_SECRET) {
    return NextResponse.json({ ok: false }, { status: 401 });
  }
  const { path } = await req.json();
  revalidatePath(path);
  return NextResponse.json({ revalidated: true, path });
}

Then in WordPress, hook save_post and ping that endpoint. Editorial workflow stays identical, page speed goes up. That's the whole headless WordPress pitch in one snippet.

Step 5: Build the 301 redirect map (the part everyone botches)

This is where the SEO checklist lives or dies. Every old URL that changes must 301 to its new equivalent. Every old URL that goes away entirely must 301 to a relevant parent page, never a 404.

Create a redirect map from your Step 1 spreadsheet:

Old URL New URL Type
/2022/11/nextjs-caching-explained/ /blog/nextjs-caching-explained/ 301
/services/seo/ /services/search-engine-optimization/ 301
/author/admin/ /blog/ 301
/tag/react/ /blog/ 301
/old-campaign-landing/ / 301

Then implement it in next.config.js (or next.config.ts). The official Next.js redirects documentation is at nextjs.org/docs/app/api-reference/config/next-config-js/redirects. Keep it declarative:

// next.config.ts
import type { NextConfig } from 'next';

const redirects = [
  { source: '/2022/11/nextjs-caching-explained', destination: '/blog/nextjs-caching-explained', permanent: true },
  { source: '/services/seo', destination: '/services/search-engine-optimization', permanent: true },
  { source: '/author/:slug*', destination: '/blog', permanent: true },
  { source: '/tag/:slug*', destination: '/blog', permanent: true },
];

const nextConfig: NextConfig = {
  async redirects() {
    return redirects;
  },
};

export default nextConfig;

A few rules I follow:

  • permanent: true gives you a 308 by default in Next.js (a permanent redirect that preserves the request method). For most SEO purposes a 308 is treated like a 301, but if you specifically need a 301 status code, verify the emitted status with curl -I and adjust if your host or CDN rewrites it. (See the redirects docs for the permanent behavior.)
  • Use wildcards (:slug*) for whole sections like author and tag archives.
  • Use middleware only for logic that can't be expressed statically (geo-redirects, A/B tests, cookie-based routing). Every middleware redirect adds latency to every request.
  • Test every redirect with curl -I in staging before cutover. I've caught typos this way that would have cost a client a category page.
curl -I https://staging.example.com/2022/11/nextjs-caching-explained
# should return a permanent redirect (301/308) and a location header to the new URL

Step 6: Preserve on-page SEO

Redirects are half the job. The other half is making sure the new pages say the same things to Google.

  • Title tags and meta descriptions copied and reviewed, not regenerated by AI.
  • Canonical tags pointing to the production domain, never to staging.
  • Structured data (Article, BreadcrumbList, Organization) preserved or improved.
  • Internal links updated to point to new URLs directly, not through redirects. Redirect chains waste crawl budget.
  • Sitemap generated at /sitemap.xml and submitted to Search Console on launch day.
  • robots.txt reviewed. Staging must be noindex so it never gets indexed.

Step 7: Replace dynamic features

WordPress plugins do a lot of invisible work. Every one needs a replacement:

WordPress feature Next.js replacement
Contact forms React Hook Form + server action + Resend or Postmark
Search Algolia, Typesense, or a Postgres full-text query
Comments Giscus, Disqus, or drop them (I usually recommend dropping)
Analytics Plausible, Vercel Analytics, or GA4
Caching Next.js ISR + a CDN (Vercel, Cloudflare)
SEO plugin generateMetadata per route
Image optimization next/image
Security/backups Platform-level (Vercel, or your own CI)

This table is usually where founders realize the migration is bigger than they thought. That's a good thing to realize before signing a contract.

Step 8: Staging, QA, and the zero-downtime cutover

Do not point DNS at production on day one. Here's the cutover I run:

  1. Deploy staging to a preview URL. Run a full crawl and compare against your Step 1 inventory. Every old URL should either return 200 at the same path or 301 to a mapped target.
  2. Run Lighthouse and Core Web Vitals on staging mobile. Compare to your WordPress baseline. If you regressed, fix before cutover. My guide to Next.js image optimization in 2026 covers the most common cause of a mobile LCP regression.
  3. Lower your DNS TTL to 300 seconds 24 hours before launch. This is the single most important cutover step. It means a rollback takes minutes, not a day.
  4. Launch at a low-traffic hour for your primary audience. If your traffic is US-heavy, that's early morning Eastern.
  5. Flip DNS. Watch for propagation. Verify with dig from multiple locations.
  6. Immediately submit the new sitemap in Search Console and request indexing for your top 20 pages.
  7. Monitor Search Console daily for two weeks. Expect minor fluctuation. Panic only if a top page drops more than 50% for more than a week.
  8. Keep WordPress running (read-only, noindexed) for 30 days as a rollback option. Then archive it.

If rankings drop hard, roll DNS back. The old site is still there. This is why you keep it up.

What it actually costs

I won't give you fake numbers. Here are honest ranges based on projects I've delivered and seen quoted, clearly labeled as ranges, not quotes. Treat them as ballpark figures, actual quotes depend heavily on scope, design, and location.

Scope Typical range (USD) Notes
Static blog, 50 posts, no dynamic features $3,000 to $8,000 Freelancer, 2 to 4 weeks
Headless WordPress + Next.js, 100 posts $8,000 to $20,000 Includes WPGraphQL, ISR, preview
Full rebuild with custom CMS, 500+ pages $20,000 to $60,000 Design + build + migration
WooCommerce with complex rules $30,000+ Often not worth it, see above
Ongoing maintenance $300 to $1,500/month Hosting + monitoring + small changes

The real cost isn't the build. It's the weeks of your time coordinating content, testing redirects, and answering "where did my draft go" questions. Budget for that.

And if you're hiring rather than building in-house, the quotes you get will vary wildly. My guide to hiring a full-stack developer in 2026 covers the Next.js and Node.js skills to screen for, and the web developer rates and interview questions for Australia piece is useful if you're hiring in that market.

The Next.js SEO checklist for launch day

Print this. Tape it to your monitor.

  • Every old URL returns 200 at same path or 301 to a mapped target
  • No redirect chains (A → B → C)
  • Canonicals point to production domain
  • Sitemap submitted in Search Console
  • robots.txt allows production, blocks staging
  • Structured data validates in Rich Results Test
  • Core Web Vitals green on mobile
  • 404 page is helpful, not a dead end
  • Internal links point to final URLs, not redirects
  • Analytics and Search Console verified on new domain
  • WordPress still live (read-only) for 30 days as rollback

Final thought

A migration is a business decision dressed as a technical one. The developers who get it right are the ones who spend as much time on the redirect map as the components. The founders who get it right are the ones who ask "what's the rollback plan" before signing.

If you're weighing a WordPress to Next.js migration and want a second opinion on scope, cost, or whether it's even worth it, that's the kind of conversation I have most weeks. I work with founders across the USA, Bangladesh, Australia, Canada, and New Zealand on exactly this. Reach out through the site and tell me what you're running.

Frequently asked questions

How long does a WordPress to Next.js migration take?

For a blog with under 100 posts and no dynamic features, 2 to 4 weeks is realistic. Headless WordPress with preview and revalidation, 4 to 8 weeks. A full rebuild with a custom CMS and complex features, 2 to 3 months. Anyone quoting "one week" is either using a template or hasn't done the redirect mapping.

Will I lose SEO traffic when I migrate?

If you preserve URL paths or 301 every changed URL correctly, you should see minimal loss. Most drops I've investigated come from missing redirects, canonical tags pointing at staging, or a sitemap that wasn't submitted. Follow the SEO checklist in this guide and you'll be in good shape.

Should I use headless WordPress or rebuild?

Use headless WordPress if your editorial team is large and comfortable with the WP editor. Rebuild if it's a small team and you want to reduce maintenance surface. There's no wrong answer, only wrong expectations about cost.

Can I migrate without downtime?

Yes. Lower your DNS TTL 24 hours before launch, deploy to staging, verify every redirect, then flip DNS. Keep WordPress live and noindexed for 30 days as a rollback. I've done this on sites with hundreds of thousands of monthly visitors without a measurable gap.

Share this post

Native Web Share is available on mobile, so that share sheet includes Instagram and any other app you have installed.

Let's Connect

Get In Touch

Let's build something premium together.

Contact info

Follow me
Chat on WhatsApp