How to Get off WordPress

5. Frontend Implementation in Next.js

Preserve URL structure, choose rendering modes, and improve SEO during migration.

5.1 Routing and URL preservation

Preserving URLs is a major SEO and trust requirement.

Routing goals

  • Keep existing permalink structure where feasible
  • Preserve trailing slash behavior consistently
  • Support legacy paths with explicit redirects
  • Avoid redirect chains during and after launch

Route strategy

  • Use dynamic segments for posts and pages
  • Add catch-all route for rare legacy patterns
  • Map old slugs to new canonical routes via redirect table

Staging crawl and indexing safety

Make sure your staging environment is not indexed:

  • Require authentication or IP allowlisting for staging access, when possible
  • Use noindex and restrict crawling intentionally
  • Verify canonical URLs and sitemap output are correct for the environment

5.2 Rendering strategy

Choose rendering per page type.

Typical approach

  • Static generation for stable marketing pages
  • ISR for frequently updated content
  • Server components for data-heavy pages

Avoid over-optimization

Do not force every page into one rendering mode. Optimize for editing frequency, cacheability, and correctness.

5.3 SEO parity and improvement

At minimum, preserve existing SEO state.

Must-have outputs

  • Metadata: title, description, canonical, robots
  • Open Graph and Twitter cards
  • XML sitemaps
  • RSS feeds if content previously offered feeds

Technical checks

  • Correct status codes for indexed pages
  • Stable canonical tags
  • No accidental noindex on production pages
  • Structured data for articles and organization

Implementation examples

export async function generateMetadata({ params }: { params: { slug: string } }) {
  const post = await getPostBySlug(params.slug);
  return {
    title: post.seoTitle ?? post.title,
    description: post.seoDescription ?? post.excerpt,
    alternates: { canonical: `/blog/${post.slug}` },
  };
}
export const revalidate = 300;

Pre-launch acceptance tests

  • Compare top landing pages against current production metadata
  • Crawl staging and verify internal links and canonicals
  • Validate sitemap coverage for all intended indexable pages