Next.js Pages to App Router Migration
Plan and migrate existing pages/ routes to app/ with route parity checks.
When to Use
- •Incremental migration to App Router
- •Reducing legacy Pages Router surface
Inputs
- •Routes to migrate
- •Data fetching method in
pages/ - •Route parity requirements
Instructions
- •Identify route parity and dependencies.
- •Create App Router equivalents under
app/. - •Replace
getServerSideProps/getStaticPropswith server fetches. - •Validate metadata, cache settings, and error handling.
- •Remove legacy routes after validation.
Output
- •Migration plan and App Router replacement routes.