Technical SEO

A WordPress-to-Next.js content migration worksheet

A successful WordPress to Next.js content migration requires separating decisions into content equivalence, URL redirect mapping, metadata parity, media optimization, and post-cutover verification. Rushing into code without auditing the legacy WordPress database often leaves high-traffic URLs unmapped, breaks internal link equity, and triggers crawl errors. Use a structured worksheet to review legacy routes, assign 1:1 destinations, configure server-level 301 redirects, and ensure Core Web Vitals excellence before updating DNS.

Illustration of technical tools, gears and chart bars

A worked example

Consider a production WordPress site with 450 blog posts, 25 static landing pages, 60 category archives, and hundreds of media attachment pages. An equivalence audit reveals that 380 posts migrate directly to Next.js App Router dynamic routes (`/blog/[slug]/`), 40 outdated announcements should be retired with HTTP 410 Gone, and 30 thin articles should be consolidated into 5 comprehensive pillar guides via 301 redirects. Blindly redirecting all legacy URLs to the homepage would destroy historical keyword rankings and frustrate users.

A practical checklist

  1. Export and inventory all legacy WordPress URLs using Google Search Console, server access logs, and XML sitemaps to catalog every indexed route, page type, and organic traffic benchmark.
  2. Establish strict 1:1 URL mappings and equivalence criteria, preserving URL slugs wherever feasible or configuring permanent 301 redirects in next.config.ts for modified paths.
  3. Test redirect status codes, canonical metadata, JSON-LD schema parity, and responsive image performance in a staging environment before DNS cutover and post-launch Search Console validation.

1. Content inventory and equivalence audit

Begin by exporting a comprehensive list of all published WordPress posts, pages, custom post types, categories, and tags. Do not rely solely on the WordPress admin dashboard—cross-reference your export with Google Search Console coverage reports and server log files to catch legacy URLs that still receive search impressions or external backlinks. Categorize every legacy asset into one of four distinct migration actions: Migrate 1:1 (maintain exact topical scope), Consolidate (merge thin content into comprehensive guides with 301 redirects), Update (refresh facts, code, and date stamps), or Retire (remove obsolete promotions with an explicit HTTP 410 Gone header).

2. URL architecture, trailing slashes and 301 redirect rules

WordPress historically enforces trailing slashes on permalinks by default (e.g., `/blog/sample-post/`). In Next.js, decide on a consistent URL convention early. If preserving legacy WordPress rankings, configure trailingSlash: true in next.config.ts to prevent unnecessary 301 redirect hops from legacy bookmarks and external backlinks. When route paths must change, implement permanent 301 redirects rather than temporary 302 redirects. Never map discarded or low-value pages to the homepage—Google treats mass homepage redirects as soft 404s, eroding domain trust.

// next.config.ts - Production redirect configuration
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  trailingSlash: true,
  skipTrailingSlashRedirect: true,
  async redirects() {
    return [
      // 1:1 legacy URL migration
      {
        source: "/2024/05/12/legacy-slug/",
        destination: "/blog/legacy-slug/",
        permanent: true,
      },
      // Consolidated topic category to new pillar guide
      {
        source: "/category/wordpress-tips/",
        destination: "/guides/wordpress-to-nextjs-migration/",
        permanent: true,
      },
    ];
  },
};

export default nextConfig;

3. WordPress to Next.js migration decision matrix

Use this operational worksheet to classify legacy WordPress assets and determine the correct Next.js technical response before initiating development:

3. WordPress to Next.js migration decision matrix comparison
Legacy WordPress AssetEquivalence ConditionNext.js Target RouteHTTP Response Code
High-traffic blog post1:1 topical equivalence; updated code and facts/blog/[slug]/ (Static or Dynamic SSR)200 OK (Self-referencing canonical)
Thin or fragmented postsConsolidated into single comprehensive guide/guides/[new-pillar-slug]/301 Moved Permanently
WordPress tag archivesHigh cannibalization; zero distinct organic valueNoindex during migration; remove from sitemap410 Gone or 301 to parent category
Obsolete event/promoNo equivalent content; expired commercial offerRemove route completely from Next.js app410 Gone (signals permanent removal)
Attachment/media URLsWordPress attachment pages (image.php)Redirect to media file or parent article301 Moved Permanently to article

4. Media, asset migration and image optimization

WordPress stores media in date-stamped directory trees under wp-content/uploads/. When migrating media to Next.js, store shared branding in the public/ folder or serve article imagery from an optimized asset store. Replace legacy raw <img> tags with Next.js next/image components to ensure automatic WebP/AVIF modern format conversion, responsive srcset generation, and explicit width/height dimensions that prevent Cumulative Layout Shift (CLS). For above-the-fold hero illustrations, supply priority or preload hints while keeping below-the-fold images lazy-loaded.

5. Metadata, canonical parity and JSON-LD structured data

WordPress SEO plugins (such as Yoast or Rank Math) store metadata in custom post meta tables. In Next.js App Router, implement the generateMetadata API to dynamically emit page-level <title>, <meta name="description">, OpenGraph tags, and canonical link elements. Verify that every page declares a clean, self-referencing canonical URL matching the exact preferred protocol, host, and trailing slash format. Additionally, embed server-rendered JSON-LD schema (Article or BlogPosting, and BreadcrumbList) directly into the HTML to maintain structured data continuity for Google Search and AI answer engines.

6. Pre-launch and post-cutover technical SEO checklist

Execute these critical operational checks before pointing production DNS to the new Next.js deployment:

  • Validate that all 301 redirects respond with HTTP 301 and point directly to the final destination without intermediary redirect chains.
  • Verify that robots.txt permits search crawler access to public content while disallowing internal administrative routes.
  • Generate dynamic XML sitemaps (/sitemap.xml) listing only approved, indexable HTTP 200 URLs with accurate lastmod dates.
  • Check that server-rendered HTML contains full article text and headings before client hydration runs.
  • Submit the updated XML sitemap in Google Search Console immediately following DNS propagation.
  • Monitor Google Search Console Coverage and Crawl Stats reports daily for 404 errors, redirect loops, or soft 404 anomalies.

What to avoid

Avoid wildcard-redirecting all legacy WordPress URLs to the homepage, which triggers soft 404 penalties. Do not deploy Next.js pages without self-referencing canonical URLs or forget to configure trailing slash consistency in next.config.ts. Avoid leaving legacy attachment pages or empty tag archives unhandled, and never launch without verifying that server-rendered HTML contains complete article copy before JavaScript execution.

Related guides and tools

Frequently asked questions

Practical answers to common technical and editorial questions.

Do 60 new posts replace a legacy migration audit?

No. Publishing new articles expands your content library but does not resolve broken links, lost keyword rankings, or orphaned backlinks from legacy WordPress URLs. A comprehensive URL redirect audit and content equivalence review must be completed independently of new publishing initiatives.

How should trailing slashes be handled when migrating from WordPress to Next.js?

WordPress permalinks historically append a trailing slash by default. If your legacy URLs used trailing slashes, configure trailingSlash: true alongside skipTrailingSlashRedirect: true in next.config.ts. This ensures search engines and users reach the exact intended URL directly without experiencing an extra 308 or 301 redirect hop.

Should every legacy WordPress tag and category archive be 301 redirected?

Only redirect category or tag archives if they possess established organic traffic, high-value backlinks, or direct equivalents in the Next.js site hierarchy. Low-value or auto-generated tag pages that dilute crawl budget should either be consolidated into a relevant topic hub or allowed to return HTTP 410 Gone.

How can teams prevent Largest Contentful Paint (LCP) regressions during a Next.js migration?

Use the Next.js Image component with explicit sizes and priority on the primary above-the-fold image. Avoid wrapping LCP hero images in heavy client-side animations or complex CSS mask filters on mobile, and ensure critical CSS is inlined with the server-rendered document.

How long should 301 redirects from WordPress remain active in Next.js?

Google recommends maintaining 301 redirects permanently, or for at least one full year after a site move, to ensure all search crawlers, external backlinks, and user bookmarks transfer equity smoothly to the new Next.js destinations.

Documentation & Standards

Sources and further reading

Apply this guidance to your publication research

Ready to plan your publication campaign?

Compare publications across DA, DR, traffic estimates and listed placement prices, or explore our free technical SEO tools.