Skip to content
Web Development

Should I Migrate From WordPress to Next.js? How to Decide

Should I migrate from WordPress to Next.js? When the move pays off, when to stay on WordPress, the middle paths, and the risks to plan for first.

Keshur Gojiya

6 min read

Should I Migrate From WordPress to Next.js? How to Decide

You should migrate from WordPress to Next.js when your site is mainly marketing pages and articles, has stayed slow after real optimisation, and costs more in plugin updates and fixes than it gives back. You probably shouldn't if the business runs on WooCommerce, memberships, courses or bookings, if your editors build pages in Elementor or Divi, or if the site already works well. A migration is a rebuild, not a switch, so the real question is whether today's problems are worth a project to remove.

Below is how I make that call, the middle paths that often make more sense, and what a migration involves if you go ahead.

When is migrating from WordPress to Next.js worth it?

A migration usually pays off when several of these are true at once. One on its own is rarely enough.

  • The site is still slow after you've optimised it. Caching, image compression and a lighter theme have been tried, and pages are still slow on mobile because of everything the theme and plugins load on every page. Next.js can pre-render pages as static HTML for a CDN to serve, and its image component resizes images for each screen, so you start from a light base instead of trimming a heavy one.
  • Plugin upkeep has become a job of its own. Every plugin needs updates, updates sometimes conflict, and WordPress security reports consistently find that most vulnerabilities are in plugins, not in WordPress core. A Next.js site still has dependencies to keep current, but no plugin stack runs behind the public pages.
  • The design fights the theme. If every new page needs CSS overrides on top of theme and page builder styles, you are working against the theme. In Next.js, components are built to your design from the start.
  • It's a marketing or content site. Service pages, articles, case studies and landing pages fit a structured content model well.
  • Your team is happy with structured editing. In a headless CMS like Sanity, editors fill in fields and arrange predefined sections rather than dragging elements around a canvas. Some teams like the guard rails; others feel boxed in.
  • Speed and stability affect revenue. If paid campaigns land on the site or leads come through it, slow pages and updates that break things cost you directly.

For a real example: on the 75-page tourism site in my portfolio, mobile Largest Contentful Paint went from 6.14s to 3.38s, and the image payload from 862KB to 127KB, after the move to Next.js and Sanity. That came from rebuilding the whole front end, image delivery included. Next.js alone doesn't make a site fast; heavy scripts and oversized images slow down any framework.

When should you stay on WordPress?

Stay where you are, or start with the middle paths below, if one of these describes your site.

  • It's a WooCommerce-heavy store. Cart, checkout, customer accounts, payment gateways, shipping and tax all live in WordPress and its plugins. Headless WooCommerce is possible, but rebuilding all of that is a far bigger project than moving content.
  • It runs on feature plugins. Memberships, online courses, booking calendars, forums and directories are product features. Each one has to be rebuilt in code or replaced with a separate service, and that cost often outweighs the gain.
  • Your editors depend on a page builder. Elementor and Divi store layouts in their own formats, which don't carry across. Every layout has to be rebuilt as components, and editors lose free-form design. If your marketing team builds a new landing page every week, that change matters.
  • The budget is tight. A migration means a rebuild, content migration, redirects and testing. Limited money does more good fixing the current site.
  • The site already works. If it's fast enough, editors are happy and upkeep is light, leave it alone. A working WordPress site is not a problem to solve.

What are the middle paths?

Optimise WordPress first

Slow WordPress sites usually have a handful of causes: unused plugins, a heavy theme or page builder, oversized images, too many third-party scripts, or underpowered hosting. A focused round of fixes is sometimes enough. Measure before and after with PageSpeed Insights and the Core Web Vitals report in Google Search Console, so the decision rests on numbers.

Go headless with WordPress

You can keep WordPress as the CMS and build only the front end in Next.js, reading content through the REST API built into WordPress or through the WPGraphQL plugin. Editors keep the admin they know. The trade-offs: you run two systems, WordPress still needs hosting, updates and security, plugins that output anything on the page (sliders, form builders, page builder layouts) stop working there, and previews have to be set up again.

Move to Next.js and Sanity

The full move: content goes into Sanity as structured content, Next.js renders the site, and WordPress is retired. It's the most work up front and removes the most upkeep afterwards.

What does a WordPress to Next.js migration involve?

This is the order I follow for a WordPress to Next.js and Sanity migration:

  1. Audit every URL, content type, plugin and integration, and note what each plugin does for the business.
  2. Model and migrate the content. Posts, pages, custom fields and media move by script, with shortcodes and builder layouts converted.
  3. Rebuild the templates as reusable Next.js components.
  4. Map redirects, one permanent redirect for every URL that changes.
  5. Carry over SEO data: titles, descriptions, canonicals, structured data and the sitemap.
  6. Train the editors on a Studio set up around how they work.
  7. Launch and monitor 404s, indexing and traffic for the first weeks.

What are the risks, and how do you manage them?

  • Lost URLs. WordPress creates many more addresses than the pages you edit: category, tag, author and date archives, pagination and feeds. Any of them with traffic or links needs a redirect. The free WordPress to Next.js Redirect Generator turns a sitemap or URL list into a redirect map.
  • A dip in rankings. Google says rankings can fluctuate while it recrawls a site whose URLs have changed. Keeping titles, descriptions and content the same at launch makes any change easier to trace.
  • Missing content. Shortcodes, embeds, custom fields and page builder sections are where content quietly goes missing. Spot-check the oldest and longest posts, not just the newest.
  • Lost features. Forms, site search, newsletter sign-ups and tracking codes are easy to forget because a plugin handled them. List them during the audit.
  • Editors who don't adopt the new CMS. Give them a Studio that mirrors the site's pages, short written notes, and a test page to practise on before launch.

FAQ

Can I keep WordPress and still use Next.js?

Yes. In a headless setup, WordPress stays as the CMS and Next.js builds the public site from its content through the REST API or WPGraphQL. Editors keep the familiar admin, but you still host, update and secure WordPress, and front-end plugins stop working.

Can I move one section at a time?

Yes. Next.js can serve the pages you've rebuilt and pass every other path through to the old WordPress site with a fallback rewrite, so you can move section by section. It means running two systems for a while, so I only suggest it for large sites.

Is a Next.js site harder to maintain than WordPress?

It's different rather than harder. Editors still change content themselves in the CMS, but new layouts and features need a developer, where WordPress would let you install a plugin. In return, there are no plugin updates to keep up with and far less that can break after an update.

Will I lose my Google rankings if I migrate?

Not if every changed URL is redirected and the SEO data is carried over, although some movement while Google recrawls is normal. Lasting losses usually come from missing redirects, dropped content or a noindex tag left over from staging.

Key takeaways

  • Migrate when the site is content-led, still slow after real optimisation, and costly to keep patched.
  • Stay on WordPress for WooCommerce stores, plugin-built features, page builder workflows, tight budgets, or a site that already works.
  • If you're unsure, optimise WordPress or try a headless WordPress setup before a full move.
  • The risks are lost URLs, content and features; a full audit and a redirect for every changed URL handle most of them.

Tags

  • WordPress Migration
  • Next.js
  • Sanity CMS
  • Web Performance

About Keshur Gojiya

Web developer and HTML email specialist with 6+ years of experience, building websites and emails for businesses, startups and agencies.

Get to know me
Keep Reading
View All Articles
  • Web Development

    7 min read

    WordPress to Next.js Migration Checklist: 6 Stages in Order

    A WordPress to Next.js migration checklist in six stages: audit, build, redirects, staging QA, launch day and the first weeks, so nothing gets lost.

    • WordPress Migration
    • Next.js
    Keshur Gojiya
  • Web Development

    6 min read

    How to Hire a Next.js Developer: What to Check and Ask

    How to hire a Next.js developer: what to check in their work, questions to ask before you sign, red flags, freelancer vs agency, and how to write a clear brief.

    • Next.js
    • Best Practices
    Keshur Gojiya
  • Web Development

    7 min read

    Is a Headless CMS Good for SEO? What to Set Up

    Is a headless CMS good for SEO? Yes, if the site is built right. The checklist: rendering, SEO fields, URLs, sitemaps, redirects, images and page speed.

    • SEO
    • Sanity CMS
    Keshur Gojiya

Need help with an email or website?

If an email is breaking in Outlook or dark mode, or you have a design that needs building, tell me about it and I’ll reply with next steps.

Email me