Architecture

How to migrate thousands of WordPress pages to Next.js without losing organic traffic

Blazity team
27 Nov 2026
•
17 min. read

Moving a large WordPress site to Next.js does not have to cost you organic traffic. The safest version of this move rebuilds the same site on a new front end and keeps every URL it can. What a migration plan has to prevent is the loss that does not come back: URLs nobody mapped, redirects that point to the wrong place, and metadata that never made it across.

On a 200-page site that is a checklist. For a publisher with many portals and years of archives it is a different job. Search traffic is the audience that advertising and subscriptions depend on. The newsroom cannot stop publishing, and nobody wants to expose the whole portfolio to one launch day. This guide is written for that situation.

In this guide you will learn:

  • what Google says happens to rankings during a move
  • which WordPress URLs teams forget to map
  • how to run thousands of redirects in Next.js
  • how to check that Google can read the new pages without JavaScript
  • why to move one site first and what that pilot should produce
  • how to tell a tracking problem from a real traffic loss
  • when a migration is not worth doing

Key insights

  • Permanent redirects pass link credit, so the change of framework is not what costs traffic.
  • Next.js returns a 308 for permanent redirects, and Google treats 308 and 301 the same way.
  • A large portfolio should move in sections, and the first section becomes the template for the rest.
  • A redirect map with thousands of entries belongs in a lookup, not in a config file.
  • Search Console shows what Google sees, while Analytics shows only what your tag records.

Will a WordPress to Next.js migration cost us rankings?

Not if the move is mapped, redirected and tested, although you should expect some movement in the first weeks. Google states that 301 and other permanent redirects do not lose PageRank, and that visibility can fluctuate while it recrawls and reindexes the site.

The first decision is which URLs change at all. A move from WordPress to Next.js changes the platform. It does not have to change the addresses. Every URL you keep is a URL you do not need to redirect, test or monitor. Keep the redirect map for what has to change, such as a new category structure or retired archive types.

One default deserves attention here. WordPress permalinks commonly end with a trailing slash, and Next.js by default redirects such URLs to the version without one. Left as it is, every address on the site changes on launch day. Setting trailingSlash: true keeps the old form.

Change one thing at a time where you can, which is also Google's advice. If the design, the URL structure and the platform all change on the same day, a drop cannot be traced to its cause.

Set expectations before launch. If stakeholders hear "no impact" and then see a dip in the first weeks, the project looks like a failure even when it follows the pattern Google describes.

What usually breaks at scale?

The long tail breaks: URLs that WordPress or a plugin generated automatically and that nobody listed. Templates get tested. Archives, feeds and media do not.

What breaks

How to detect it

How to fix it

Unmapped URL types: category, tag, author and date archives, pagination, feeds, attachment pages, ?p= IDs, AMP variants

Build the inventory from a crawl, the old sitemaps, Search Console and server logs, then group URLs by type

Decide per type: keep, redirect to the closest equivalent, or remove on purpose with a 404 or 410

Trailing slashes

Request old URLs on staging and check that they answer 200, not a redirect

Set trailingSlash: true so URLs keep their WordPress form

Media under /wp-content/uploads/

Check image, video and PDF URLs that receive traffic or links

Keep the paths or redirect each file. Google asks you to include embedded resources in the move plan

Redirect chains

Test the redirect map as a file and flag any source that needs more than one hop

Point each old URL straight at its final destination

Many old URLs sent to the homepage

Count sources per destination

Map to the closest relevant page. Google may treat mass redirects to an unrelated page as soft 404s

Titles, descriptions, canonicals and robots rules that lived in an SEO plugin

Compare these fields between old and new pages for a sample of every template

Migrate them as content fields and give each new page a self-referencing canonical

Internal links that still point at old URLs

Crawl the new site and list links that answer with a redirect

Rewrite links in the content during migration

Content that appears only after JavaScript runs

Load each template with JavaScript disabled and compare it with the normal view

Render the headline, body, links and metadata on the server

Staging rules left in production

Check robots.txt and robots meta tags right after launch

Prepare the production robots.txt and the list of noindex rules to remove before launch day

Google's guidance on chains is specific enough to test against. Redirect straight to the final destination and, where that is not possible, keep the chain short: ideally no more than three hops and fewer than five.

How do you handle thousands of redirects?

Use pattern rules where the URL structure changed predictably and a lookup for everything else. A config file with thousands of individual lines is hard to review.

Two details matter in Next.js. First, a redirect marked permanent: true in next.config.js returns a 308, not a 301. Teams often write "301 redirects" into the requirements. Google documents both codes as a permanent move, so a 308 meets that requirement.

Second, config-based redirects are capped by the hosting platform. The official Vercel and Next.js pages state different numbers, so check the current limit for your plan before you rely on it. For a large number of redirects, which the Next.js documentation puts at more than a thousand, it recommends handling them in Proxy (called Middleware before Next.js 16) with a redirect map kept in a key-value store or a JSON file. A Bloom filter can check whether a path has a redirect before the full map is read, so ordinary requests stay fast.

This setup has a practical benefit for a newsroom. Redirects can be added without a redeploy, so the SEO team can fix a missed URL the day it shows up in the logs.

Keep redirects for as long as possible. Google's guidance is generally at least one year.

Can Google read the new pages without JavaScript?

It should be able to, and you should test it before launch. Google processes JavaScript pages in three phases: crawling, rendering and indexing. Its documentation still calls server-side rendering or pre-rendering a good idea, because it makes the site faster for users and crawlers and because not every bot runs JavaScript.

A WordPress theme sends the article in the first HTML response. The Next.js build should do the same. Open each template with JavaScript disabled, or look at the raw HTML, and check five things: the headline, the article body, the internal links, the canonical tag and the structured data. Anything that is missing there depends on a script, and a bot that does not run JavaScript will not see it. Run the test on every template, not only on the article page.

How long does Google take to pick up the new URLs?

For a medium-sized site, a few weeks or more. Larger sites take longer, because the move is processed URL by URL and is complete only when Googlebot has visited every old and new address at least once.

The speed depends on the number of URLs and on how fast your servers respond. Submitting a sitemap of the new URLs helps discovery. Expect Google to crawl the new site more heavily than usual for a while, and make sure the servers can take it.

For a portfolio this changes how you report. A verdict in the first week is too early. Agree on a review date several weeks after each launch and compare against a baseline saved before the move.

Should we move everything at once or site by site?

Site by site, if you run many sites or one very large one. Google recommends that small and medium sites move all URLs at once and says larger sites can move one section at a time. For a test it suggests a section that changes less often and is not exposed to unpredictable events.

For a publisher that rules out the breaking-news portal as the pilot. Pick a title with steady, evergreen traffic. It still has to use the same templates and URL types as the rest of the portfolio. A small site that shares nothing with the others will not expose the problems they are going to have.

Iberion is the example at portfolio scale. Blazity migrated the media group's 15 WordPress portals, which receive more than 150 million monthly visits, with no downtime and an average improvement of 30% in LCP (Largest Contentful Paint). The details are in the Iberion case study.

The case study also shows what a pilot buys you. The first portal took two to three months to build and validate. Each following portal took two to four weeks on the established architecture and content model. These figures describe one publisher's portfolio, so read them as an example and not as a benchmark.

The first site is the slow one, because it produces the reusable parts:

  • the URL inventory and the rules for each URL type
  • the redirect rules and the lookup
  • the template comparison for metadata and structured data
  • the monitoring dashboard and the go or no-go checklist

Plan the editor workflow with the same care. Decide where editors publish during cutover, how long any content freeze lasts and how late edits reach the new system. Train each newsroom before its site moves, not after. At Iberion both systems ran in parallel during cutover, and the case study reports zero editorial downtime throughout.

The content side of the move, getting the articles themselves into a new CMS, is covered in A practical architecture for migrating thousands of articles into a new CMS.

What is different for a news publisher?

Four items on the list carry more weight for a newsroom than for a company blog, because they affect articles in their first hours.

  • News sitemap. Google asks news sitemaps to list only articles from the last two days and to be updated as each article is published. It has to work on the new stack from the first hour after launch.
  • Article markup. Rebuild Article or NewsArticle structured data on the article template. It helps Google show the right headline, image and dates in Search and in Google News.
  • AMP URLs. If the old site served AMP versions, they need a decision. Google's guidance for retiring them is to remove the link to the AMP version from the canonical page and redirect the AMP URL to it.
  • Publishing speed. A new article has to go live without rebuilding the site. In Next.js that is done with Incremental Static Regeneration, and on-demand revalidation can refresh a page as soon as the CMS reports a change.

Why can analytics show a drop when Search Console does not?

Because the two tools measure different things. Search Console counts clicks on Google results. Analytics counts sessions recorded by a tag on your pages, and after a rebuild the tag setup is one of the things that changed.

Check measurement before you draw an SEO conclusion:

  1. Is the tag present on every new template, including archives and article variants?
  2. Did the consent banner or its default settings change?
  3. Do landing page URLs or hostnames differ from the old reports?
  4. Do old dashboards filter on paths that no longer exist?

If clicks and impressions in Search Console hold while organic sessions fall, you have a tracking problem. If clicks fall for one group of URLs, go back to the redirects and indexing status for that group.

What to check before and after launch

Before launch

  • Every old URL has a decision: keep, redirect or remove.
  • The redirect map passes its own test: one hop, a permanent status code, no loops.
  • Redirects are tested on an environment that matches production.
  • Metadata, canonicals, hreflang and structured data match per template.
  • Every template shows its headline, body, links and metadata with JavaScript disabled.
  • Images, video, PDFs and feeds are in the plan.
  • The news sitemap and article markup are tested on staging.
  • The production robots.txt and the new sitemap are ready.
  • Analytics tags, consent settings and Search Console access are verified on the new templates.
  • Editors have published, previewed, scheduled and corrected a real article in the new system.
  • A baseline is saved for each site: clicks, impressions, indexed pages and Core Web Vitals.

After launch

  • Submit the new sitemap and watch the number of indexed new URLs rise.
  • Review the page indexing report for errors and soft 404s.
  • Confirm in the performance report that new URLs earn impressions and clicks.
  • Read the 404 log daily in the first week and add missing redirects.
  • Check the server logs: old URLs answer with the intended redirect and Googlebot requests the new ones.
  • Crawl the live site again for canonicals, internal links, structured data and media.
  • Have editors publish and update a real article after cutover.
  • Note the launch date in your reports and compare Analytics with Search Console before reporting a loss.
  • Record findings by URL type. A single traffic chart does not show which type broke.

Timeline by phase

Phase

What happens

Done when

Inventory

URLs are collected, grouped and decided

No URL type is without an owner

Pilot

One low-volatility site is built, validated and launched

Checklists and redirect tooling exist

Observation

Google recrawls the pilot

New URLs replace old ones in Search Console, which takes a few weeks or more

Rollout

Remaining sites move one at a time

Each site passes the same go or no-go checklist

Retention

Redirects stay live and are monitored

At least one year has passed

When is a migration not worth it?

When the problem you want to solve is not caused by the platform. Thin content, an overloaded theme or too many plugins on a single small site can be fixed in WordPress.

A migration makes sense when the limits are structural: many sites that duplicate templates and fixes, performance problems that return after every round of optimisation, or editors and developers who block each other in one monolith.

Be honest about the trade-offs. A custom front end needs developers for changes a plugin used to handle. Preview and editorial workflows have to be rebuilt. You also take on a redirect map that someone must own for at least a year. If nobody can own the URL inventory, postpone the project.

Stage the move and measure it from day one

The framework is not the risk, the method is. For a large WordPress portfolio the recommendation is to keep URLs where you can, move one site first, turn that pilot into a repeatable checklist and judge the result in Search Console over weeks. The trade-off is time: a staged move takes longer than a single launch, and in return a mistake costs one site, not the portfolio.

For help with the inventory, the pilot and the rollout, talk to Blazity about a Legacy to Next.js Migration.

FAQ on WordPress to Next.js migration

Is a 308 redirect as good as a 301 for SEO?

Yes. Google lists both as permanent redirects and uses them as a signal that the target should be the canonical URL.

How long should redirects stay in place?

As long as possible. Google's guidance is generally at least one year.

Do we need the Change of Address tool?

Only when the site moves to a different domain or subdomain. A platform change that keeps the same domain does not use it.

Should old URLs redirect to the homepage?

No. Send each old URL to the closest relevant page. Google may treat many redirects to one unrelated page as soft 404s.

What belongs in the first pilot?

One site with steady traffic and the same templates and URL types as the rest of the portfolio: articles, archives, author pages, media and pagination. Include the redirects, the analytics setup and the editors' daily workflow.

Sources

Subscribe to our newsletter

Get Next.js tips, case studies, and frontend insights delivered to your inbox.

By clicking Sign Up you request to receive newsletters from us in accordance with Website Terms. The Controller of your personal data is Blazity Sp. z o.o. with its registered office at Warsaw, Poland, who processes your personal data for marketing purposes. You have the right to data access, rectification, erasure, restriction and portability, object to processing and to lodge a complaint with a supervisory authority. For detailed information, please refer to the Privacy Policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.