How to Migrate WordPress to Next.js Without Losing Google Rankings
A production migration blueprint: 25+ permanent 301 redirects, multilingual hreflang, Schema.org Local SEO, and IndexNow to protect every Google ranking.

TL;DR: Migrating from WordPress to Next.js only hurts SEO when old URLs return 404 or drop structured metadata. By mapping every indexed WordPress route to a permanent 301/308 redirect in next.config.ts, preserving canonical and hreflang tags, and re-submitting sitemap.xml plus IndexNow on launch day, you keep 100% of existing Google equity while slashing load times.
Why Most WordPress Migrations Drop Traffic
Businesses rarely migrate away from WordPress because of design alone, they leave because plugin bloat pushes mobile page loads past 4 seconds, security patches pile up, and Core Web Vitals fail.
Yet many teams break their organic traffic on launch day because they:
- Change URL slugs (
/menu-en/→/en/menu) without server-side301/308redirects. - Forget trailing-slash and category/tag archives that already hold backlinks.
- Ship a client-rendered shell without
Schema.orgJSON-LD orhreflangalternates.
The Zero-Loss Migration Checklist (Used in Production)
During the migration of Kardeşler Kebap & Cafe Cihangir from a legacy WordPress site to Next.js 16 (App Router) + Supabase, we preserved all search rankings across 10 languages with 25+ permanent redirect rules and zero 404 drops.
1. Export Every Indexed URL Before Touching Code
Pull URLs from three sources so no backlinked page is missed:
- Old WordPress
sitemap_index.xmland post/page sitemaps. - Google Search Console Pages and Links → Top linked pages exports.
- Server access logs for top organic landing paths over the last 90 days.
2. Map Exact 1-to-1 Permanent Redirects in next.config.ts
In Next.js App Router, configure permanent redirects at the edge before page rendering:
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async redirects() {
return [
{
source: "/menu-english/",
destination: "/en/menu",
permanent: true, // HTTP 308 permanent redirect
},
{
source: "/hakkimizda/",
destination: "/tr/about",
permanent: true,
},
{
source: "/wp-content/uploads/:path*",
destination: "/tr",
permanent: true,
},
];
},
};
export default nextConfig;Avoid soft-404 traps: Never redirect dozens of unrelated dead URLs to the homepage (/). Redirect each legacy URL to its closest thematic match, and let truly obsolete spam/query URLs return a clean 404 or 410.
3. Upgrade Technical SEO Beyond What WordPress Had
Once URL parity is locked, Next.js lets you generate strict, code-verified SEO metadata:
- Self-referencing canonicals + reciprocal
hreflang(en,ar,tr,x-default) ingenerateMetadata. - Typed
Schema.orgJSON-LD (Restaurant,Service,BreadcrumbList,FAQPage) rendered server-side in initial HTML. - Clean
sitemap.xmlwith real<lastmod>dates: never include.txtfiles,404routes, or build-timenew Date()timestamps.
4. Launch-Day Verification Protocol
| Step | Check | Target |
|---|---|---|
| 1. Automated Crawl | Test every legacy WordPress URL with redirect: "manual" | 100% resolve in 1 hop (301/308 → 200) |
| 2. Google Search Console | Submit updated sitemap.xml & inspect key URLs | Zero unintended noindex or canonical mismatch |
| 3. Bing + IndexNow | Ping api.indexnow.org with all canonical URLs | Immediate discovery for Bing & ChatGPT Search |
Explore the live migration results in the Kardeşler Platform Case Study or see Website & Landing Page Development.
Planning to move off a slow WordPress site without losing Google traffic?
Message me your current domain on WhatsApp and I will audit your indexed URLs, redirect map, and Next.js migration timeline within 24 hours.
Kardeşler Cihangir: Production Restaurant Platform
How Hamed Mohamed built kardeslercihangir.com: 10 languages, live currency for 6 currencies, WhatsApp ordering, and Schema.org SEO for a Turkish restaurant.
Healix Medical: 5-Language International Patient Coordination Platform
Case study: 5-language international patient coordination platform in Istanbul with 337 static pages, Arabic RTL, 33 facilities, and #1 Google brand rank.