Conversion Guide

Next.js to WordPress: Migrating App Router and Pages Router Sites

Convert Next.js 13/14/15 sites (App Router, Pages Router, RSC) to WordPress. Preserve routing, images, ISR, and SEO.

By AI to Wordpress Engineering Team·July 28, 2026·1,870 words
Expert-WrittenRegularly UpdatedSecurity Verified

Convert your website now

Upload ZIP → Security Scan → Free Preview → Download WordPress Theme

How AI to Wordpress Converts Your Website

1Upload ZIPLovable, Webflow,Framer, or HTMLMax 100 MB2Security ScanMalware detection,virus scanningAuto-reject threats3AIAI ConversionDOM → WordPresstemplate generation2-5 min avg4Preview & PayLive WP previewbefore purchaseDownload ZIP

1
Why Move a Next.js Site to WordPress

Next.js App Router site being migrated to a WordPress theme with static export preserved

Next.js App Router site being migrated to a WordPress theme with static export preserved

This section includes step-by-step visual guidance for optimal results.

Next.js is the reference framework for modern React development: file-based routing, image optimization, server components, streaming, and a hosting story from Vercel that is genuinely first-class. Its weakness is not technical — it is organizational. Editors cannot publish without a Git commit. Marketing cannot spin up a landing page without a developer. Support cannot install a chat widget without a redeploy. WordPress solves those problems with two decades of accumulated CMS features and 60,000+ plugins. Migrating a Next.js site to WordPress hands editorial control to editors while keeping every visual and interactive detail Next.js produced. React Server Components render at build time, Client Components hydrate on load, and next/image's optimized variants ship in the theme. The second reason is cost. Vercel scales with traffic, and popular Next.js sites can produce eye-watering bills. WordPress on a good shared host or a small VPS runs the same content for a fraction of that. The break-even point where WordPress hosting saves money is remarkably low. The third reason is longevity. Next.js has changed its API dramatically across versions — pages, app, RSC, streaming, middleware — and each change breaks something. WordPress core APIs have been stable for a decade. If you want a site that runs unchanged for years, WordPress is the safer platform for the presentation layer.

2
What the Migration Preserves

With `output: 'export'` in next.config.js, `next build` produces an `out/` folder full of pre-rendered HTML. That output is what the theme ships. Every route Next.js pre-rendered — whether from the App Router with `generateStaticParams`, from the Pages Router with `getStaticPaths`, or from a plain static page — becomes a WordPress template. React Server Components resolve at build time and their output is baked into the HTML. Client Components carry over as JavaScript bundles that hydrate against the correct DOM anchors. Metadata from the App Router's `generateMetadata` function ships in the initial HTML head. Tailwind, CSS Modules, and styled-jsx all compile into the theme's stylesheet. next/image's exported images ship with all the responsive variants intact. Fonts loaded through next/font are copied and referenced from the theme's assets directory. What does not carry over is anything that required Vercel's runtime — API routes, middleware, ISR, on-demand revalidation, or edge functions. Those get flagged in the audit for WordPress or serverless reimplementation.

Pro Tip

Use your platform’s official export or download option and upload that ZIP directly. Keep all files together in one complete archive.

3
Preparing Your Next.js Project

Add `output: 'export'` to next.config.js: ```js module.exports = { output: 'export' } ``` Run `next build` locally. If it succeeds, the `out/` folder is what the pipeline will consume. If it fails because a route uses dynamic server features (headers, cookies, revalidate paths), decide whether to make those routes fully static (usually easy) or accept that they will need reimplementation post-migration. For App Router projects, add `generateStaticParams` to every dynamic route so the exporter knows which paths to pre-render. Without it, dynamic routes are skipped. Remove or migrate any API route your frontend depends on. If a Client Component fetches from `/api/subscribe`, that endpoint disappears in the exported build unless you replace it with an external URL or a WordPress REST endpoint after migration.

Technical Architecture

How AI to Wordpress Processes Your WebsiteSecure, isolated conversion pipeline from any builder to WordPressINPUT SOURCESLovableWebflowFramerReplitCursor AIV0.devBase44HTML/CSS/JSSECURE PIPELINEVirus ScanFile ValidationFramework DetectionDOM ParsingAI Structure MapTemplate GenerationQA ValidationOUTPUTWordPress Theme Filesheader.phpfront-page.phpstyle.cssfunctions.phpfooter.php🔍 Live PreviewFree — before payment⬇ Download ZIPAfter payment — yours forever

4
The Conversion Workflow

Upload your ZIP or connect GitHub. The pipeline detects Next.js through `next` in package.json and runs the build with export mode. It consumes the `out/` folder as the pre-rendered source of truth. Headless Chrome runs a validation pass to confirm hydration works cleanly. Every HTML file becomes a WordPress template. Dynamic route slugs seed real WordPress posts under a matching custom post type so editors can add new entries through wp-admin. Assets get rewritten from Next.js's hashed convention to the theme's assets directory. next/image output ships with srcsets pointing at the theme root. Fonts loaded through next/font copy into a theme fonts directory with matching @font-face rules. Total build time for a typical Next.js marketing site is five to ten minutes.

5
WordPress Setup After Migrating from Next.js

Install a caching plugin, an SEO plugin, and an SMTP plugin. If you had middleware for auth, install a membership plugin like MemberPress or Members. If you had middleware for redirects or rewrites, translate those rules into the Redirection plugin. Reimplement any API routes your frontend depends on. WordPress REST endpoints registered with `register_rest_route` are the WordPress-native replacement. For anything heavier (webhook processing, third-party API bridging), a small serverless function is often the cleanest path. Allowlist the WordPress domain in every external API's CORS config. This is the most common single post-migration bug for Next.js sites that fetched from third-party services. Set up 301 redirects for any URL structure that changed and submit the new sitemap in Google Search Console.

Security Note

Every file you upload is automatically scanned for malware before processing. Unsafe files are rejected immediately to protect your WordPress installation.

6
Common Mistakes

Do not attempt to migrate an ISR-heavy site without first pre-rendering every path with generateStaticParams. Whatever ISR was going to regenerate at request time simply will not exist in the exported output. Do not forget middleware. Redirect logic, auth checks, and geolocation-based rewrites all live in middleware.ts and need explicit WordPress replacements. Missing this creates a live site that quietly stops enforcing rules your business relied on. Do run the free preview. Next.js apps often have subtle client-side hydration behavior — a modal that pops up on scroll, a component that swaps based on user agent — and the preview is where you catch anything that diverges. Do not skip the sitemap resubmission. Google's index of your old Next.js site can lag behind for weeks unless you actively re-crawl through Search Console.

7
Migrate Your Next.js Site Today

Upload on the homepage or connect GitHub. Preview the WordPress render before you pay, and verify every route, every image, and every hydrated component. Conversion typically completes in five to ten minutes.

Your Files Are Always Secure

Malware scanned before processing
Sandboxed conversion environment
Per-user data isolation
Auto-deleted after 72 hours

Frequently Asked Questions

Does the pipeline support Next.js App Router?
Yes. The Next.js adapter runs `next build` with `output: 'export'` to produce static HTML for every route the app can pre-render. App Router routes that are fully static (no dynamic per-request data) convert cleanly; routes that need dynamic server rendering get flagged for reimplementation.
What about Server Components?
React Server Components render on the server during `next build`, so their output is baked into the pre-rendered HTML. From WordPress's perspective the HTML is complete, and any Client Components inside the tree hydrate on load exactly as they did on Vercel.
How is ISR handled?
Incremental Static Regeneration requires a Node runtime, which WordPress does not provide. For ISR-heavy sites, either pre-render every path with `generateStaticParams` at build time or reimplement the dynamic portions as WordPress REST endpoints. The audit surfaces every ISR route so nothing gets missed.
Do Next.js API routes survive?
No — API routes require a Node server. They get flagged during the audit, and the recommended migration path is either a WordPress REST endpoint (register_rest_route) or a small serverless function on a service like Vercel Functions or Netlify Functions that WordPress can call.
What happens to next/image?
The pipeline runs `next build` with export, which produces optimized image variants during the build. Those variants ship in the theme with the correct srcset, sizes, and modern format attributes so lazy loading and responsive images continue to work.
Is Middleware supported?
Edge middleware runs on Vercel's edge network and cannot execute inside WordPress. If your middleware handled auth, redirects, or rewrites, port those rules to WordPress's Redirection plugin or a small mu-plugin. Auth logic typically becomes a WordPress plugin like Members or MemberPress.
Can I convert Pages Router projects too?
Yes, and the Pages Router path is often the smoothest because it was designed from the start to work with `next export`. getStaticProps and getStaticPaths results are pre-rendered into HTML and ready for WordPress.
What about App Router streaming and Suspense?
Streaming requires an active server. In an exported static build, Suspense boundaries either resolve fully at build time or fall back to their fallback state. The pipeline captures the resolved state and hydrates Suspense boundaries on the client from there.

Ready to Convert Your Website?

Secure upload with malware scanning. Free preview before purchase. WordPress theme in minutes.

Conversion Guides by Builder

Related Articles

Explore More

Convert by Platform