Skip to content
Sudip Acharya

How to Migrate WordPress to Next.js Without Losing Rankings

By Sudip Acharya · · 2 min read

A practical checklist from moving three live sites off WordPress to Next.js while keeping URLs, taxonomies, metadata, redirects and Core Web Vitals.

I've moved three live business sites (Joyful Treks, Anura Spa and CDR Report Writer) from WordPress to Next.js. All three kept their search visibility. A replatform usually goes wrong in the details: a changed slug, a missing redirect, metadata that didn't carry over. Here is the checklist I use.

What to do before migrating WordPress to Next.js

Crawl and export everything. Run a full Screaming Frog crawl and export every URL along with its status code, title, meta description, canonical, H1, and indexability. Then pull the top pages by clicks and impressions from Search Console. This list is your contract: every URL on it must still work after launch.

Export taxonomies. Categories, tags, author pages and pagination are easy to forget. Decide for each one whether to keep it, redirect it, or mark it noindex. Don't let that happen by accident.

Record redirects that already exist. Redirects from plugins such as Rank Math, Yoast or Redirection don't move to the new stack automatically. Export them.

How to keep URLs and metadata during the build

Keep the URLs exactly the same. Use dynamic routes that rebuild the WordPress permalinks, including trailing-slash behaviour. In Next.js, set trailingSlash to match the old site.

Generate metadata from the CMS. Use generateMetadata to output titles, descriptions, canonicals and Open Graph tags from the same fields editors already fill in. Never hard-code them.

Bring structured data across. Rebuild the JSON-LD the plugins used to output: Article, BreadcrumbList, Organization, and any LocalBusiness or Service schema.

Rebuild sitemap.xml and robots.txt. Use the sitemap.ts and robots.ts file conventions so they update automatically.

Handle images. Keep image URLs where possible, or redirect them. Use next/image for sizing and lazy loading, which is usually where Core Web Vitals improve.

Launch day checklist

  1. Deploy to staging and crawl it against your URL list. Look for 404s, redirect chains, missing titles, and canonicals that point to staging.
  2. Remove the staging noindex before going live. This is the most common migration mistake.
  3. Go live, then submit the sitemap in Search Console.
  4. Use URL Inspection on your top 20 pages.

What to monitor in the first four weeks after migration

  • Check the Search Console Pages report daily for new 404s and "Crawled, not indexed" pages.
  • Compare clicks for each of your top pages week over week.
  • Fix redirect gaps as soon as they show up in the logs.

A short dip in the first week or two is normal while Google recrawls. A drop that lasts usually points to a URL, canonical or content mismatch, so go back to your URL list.

See the full project in the case study.

Frequently asked questions

Will moving from WordPress to Next.js hurt my SEO?

Not if you keep URLs, metadata, structured data and redirects. A short dip while Google recrawls is normal.

What is the most common migration mistake?

Launching with the staging noindex still in place, followed by changed URLs that have no redirects.

How long should I monitor after migrating?

At least four weeks. Check the Search Console Pages report daily at first and compare top-page clicks week over week.

All pages

EmailLinkedIn