Blog
    By Gabriel CA
    6 min read

    Migrating from WordPress to Next.js: choosing a route and keeping your SEO

    Migrating from WordPress to Next.js: choosing a route and keeping your SEO

    The move from WordPress to Next.js starts with a site audit and a redirect map. Content transfer and the frontend build form separate stages of the work. SEO parity is part of the launch stage, followed by monitoring.1

    Why move from WordPress to Next.js?

    WordPress builds pages through PHP on each request, unless caching is in place. Next.js can build pages in advance and serve them through a global CDN.2

    Typical Next.js response times range from 50 to 200 milliseconds for the first byte. Typical largest content paint times range from 0.5 to 1.5 seconds. These compare with 800 to 2,000 milliseconds and 2.5 to 5 seconds for WordPress.2

    Next.js has no database or public admin panel by default. A static frontend has no WordPress plugin layer to patch. An outdated WordPress plugin can expose the site's database.2

    Next.js hosting on Vercel or Netlify can scale with traffic without managing servers. Growing WordPress sites can need more costly hosting, caching and database work.1, 2

    A Next.js codebase can help attract developers and speed up feature work. Hiring PHP and WordPress developers can be harder and more costly.2

    When staying on WordPress makes sense

    A working WordPress site with a light theme and few plugins may not need a rebuild. The budget and attention spent on a move could go into content instead.1

    Stay on WordPress for a simple blog if writers rely on its editor and you have no developers. Core features tied to plugins with no sound code replacement are another reason to stay.1, 2

    Choose where content will live

    Headless WordPress keeps WordPress as the editing system while Next.js serves the public site. Content reaches the frontend through the REST API or WPGraphQL, an interface for querying WordPress data.1, 3

    Editors can keep the admin screens they already know. WordPress still manages pages, media and publishing workflows. The new frontend does not remove the need for WordPress updates and plugin care.1, 3, 4

    Keeping WordPress can make sense when business logic cannot be replaced at short notice. That might mean WooCommerce, membership features or a link to an ERP or customer database.1

    For that route, set an end date rather than treating two systems as the final state. Headless WordPress still needs servers, security patches and plugin upkeep.1

    A full move transfers content to a headless CMS such as Sanity or Contentful. Moving to Sanity allows the WordPress install to be switched off. Defined content fields replace an editor that mixes layout with content.1, 4

    This route suits sites built around posts, pages, services and case studies rather than shop or membership logic. It can also suit sites where plugin sprawl, broken custom fields or licences have become a burden.1, 4

    A static site needs only a frontend, with hosting often free or nearly free.5 Markdown makes it easier to move between static site tools.

    Converting content may involve manual copying. A static HTML export is not the same as a Markdown export.5

    Audit the site before the frontend build

    List all pages, posts, plugins and custom post types. Review the media library for file sizes and formats. Export SEO titles, meta descriptions and image alt text.6

    Crawl the old site and record which pages carry traffic. Capture date permalinks, category paths, attachment pages, author archives and pages in a series. Build a map from every old URL to one new target before writing frontend code.1

    Decide which content moves and which content gets archived. Find old or duplicate content that needs cleanup. Record which features need rebuilding and which plugins have modern replacements.6

    Export content and define its new fields

    Use the WordPress export tool or WP-CLI to export content. The REST API is another route for a structured export. Convert the data to JSON or Markdown as needed.6

    For a CMS move, map posts and pages to document types with defined fields. Include custom post types, categories, tags, media and languages in that model.1

    Allow time to clean up the content after automated transfer. Page builder shortcodes and poorly recorded custom fields can make the move harder. Images may also contain old URLs embedded in the post text.4

    Move and optimise images

    Back up the media library by downloading wp-content/uploads through FTP or SFTP. You can also use rsync over SSH to copy those files.6

    Use sharp to resize old JPEG and PNG files and convert them to WebP. The image conversion can write the new files into public/images.6

    Build the Next.js frontend

    Set up the Next.js project with TypeScript and Tailwind CSS. Separate page routes, content data and public image files in the project structure.6

    Rebuild the design in React components rather than carrying over the old theme's CSS. That work needs time from both a designer and a developer. Forms and WooCommerce need different levels of planning.4

    Where AI can help

    AI tools can help convert WordPress HTML into Markdown or MDX. They can also suggest links between migrated posts.2

    AI can compare old and new rendered pages and check that meta tags have moved across. It can flag missing images, broken links and invalid structured data. It can also check redirect chains for loops and missing pages.2

    Preserve URLs and SEO at launch

    Changing the framework does not itself require a loss of rankings. Gaps in the redirect map can cause ranking loss. Each old URL needs a 301 redirect to exactly one new target.1

    Include old date-based paths, category paths and author archives in the redirect map. Redirect rules can be set in next.config.js.1, 6

    Carry over the full content, page titles and meta descriptions unchanged. Keep canonical tags and structured data too. A canonical tag identifies the main version of a page.1

    Submit an updated sitemap after the move. Missing redirects and lost metadata can cause lasting ranking loss.2

    Monitor after launch

    Keep two weeks of monitoring after the site goes live. Use a 404 report and compare rankings with the earlier snapshot.1

    Crawl the live site to find broken internal links. Every internal link must point to the new URL structure. Check redirect chains for loops and 404 errors too.2

    Costs and timelines

    A business migration can cost £8,000 to £40,000 and take six weeks to six months. Site size and custom features affect that range. Treat these figures as planning ranges, not a fixed quote.4

    For a small site of up to 20 pages, a planning range is £8,000 to £15,000. That scope can take six to ten weeks. Content cleanup, redirect work and custom links to other systems change the final cost.4

    Can the move happen in stages?

    A phased move can be safer for a large site. Next.js can serve new pages while WordPress keeps handling existing content.2

    Another option is to move one section at a time, starting with the blog. Next.js rewrites can also pass selected routes through to WordPress.2

    Platform migration with Kraftwire

    Kraftwire offers platform migration from WordPress, Framer and Webflow. The offer is to move platforms without losing SEO or content.7

    Kraftwire's AI digital engineering offer pairs developers with language models. Its workflow covers discovery, design, development, launch and support.7

    Discovery covers goals, limits and what counts as done. Design approval comes before development starts. The development offer includes regular updates and working software to review.7

    Kraftwire's offer covers code, CMS, hosting, staging and analytics under one roof. It also includes quality assurance, ongoing deployment and post-launch support. Monitoring after launch is offered around the clock.7

    Sources

    1. in-sync.io
    2. ztabs.co
    3. pantheon.io
    4. devcritters.com
    5. justingosses.com
    6. programmiert.at
    7. kraftwire.com

    FAQ

    What is the difference between headless WordPress and fully migrating to a new headless CMS?

    Headless WordPress keeps the WordPress editor and sends content to a Next.js frontend through an API. A full CMS move transfers content to a system such as Sanity and allows WordPress to be switched off. Keeping WordPress also keeps its updates, plugins and server upkeep.

    How much does a WordPress to Next.js migration cost and how long does it take?

    A business migration can cost £8,000 to £40,000 and take six weeks to six months. For up to 20 pages, a planning range is £8,000 to £15,000 and six to ten weeks. Content cleanup, redirects and custom features affect the final scope and price.

    Can you migrate from WordPress to Next.js gradually instead of all at once?

    Yes. Next.js can handle new pages while WordPress serves existing content. You can also move section by section or use Next.js rewrites to pass selected routes to WordPress.