Skip to content
wp2next, home
Skip to the page

wp2next migrate

Moves a WordPress site to Next.js + Sanity on Vercel, in 12 that each end with a checkpoint.

Your AI tool

Commands are shown for Claude desktop, the recommended tool. Pick another if you use a different one; this browser remembers.

Synopsiswp2next migrate [<local-site-slug> | <domain> | <folder>] (Claude desktop and Claude Code plugin: /wp2next:migrate; Codex: $wp2next migrate; Cursor: /wp2next migrate)
Changes codeYes. It creates a new project folder and builds the site there
Touches outside servicesYes, from phase 7 on: Sanity (project, dataset, tokens, CORS origins, Studio deploy), GitHub (repo), Vercel (project, environment variables, domain), a Sanity webhook, and DNS at cutover. It asks before creating or changing each one, saying what, where and under which account. WordPress is only ever read
ReadsThe Local site: its database (read-only queries; never user, comment, form-entry or order tables), theme files and the rendered pages; your user config
WritesA new repo folder: wp2next.json, content/ (snapshot), assets/, the monorepo (apps/web, apps/studio, packages/sanity, packages/brand), the project CLAUDE.md, docs/analytics/, docs/brand-signoff.md, reports under .wp2next/. (HANDOFF.md is written by handoff, which phase 12 offers at the end)

What it does

Step 0, the interview. Before it touches anything, it asks about the site in six short batches: the site and its copy, hosting and goals, team, timing and accounts, the tracking stack and consent banner, forms and compliance, and quality and build setup. Most answers come pre-filled from your init defaults. It shows everything in one table and waits for your yes, then writes wp2next.json in the new project folder.

The 12 phases. The next phase doesn't start until the current one's passes.

#PhaseIn plain words
1InventoryLists pages, posts, menus, forms, tracking, consent banner, fonts, breakpoints and redirects; matches a builder playbook. Read-only
2SnapshotSaves a copy of every page's HTML and the media
3ScaffoldCreates the project (Node 24, pnpm 11.10.0, Next.js 16, Sanity, brand package)
4Parity baselineScreenshots and measurements of WordPress at 390, 1440, 1920 and 2560 px, plus a Lighthouse baseline
5Tokens and chromeColors, fonts, header, footer and tracking wiring; the brand guide seeded from WordPress
6Content contractThe shapes the pages read from Sanity
7SanityCreates the Sanity project, schema and Studio, and copies the content in. Asks before creating
8Blocks and routesEvery WordPress URL answers, or redirects; metadata, sitemap, the contact form route; first seo parity run
9Parity loopCompares the new site with WordPress on a production build until you sign off
10Mobile and qualityPhone and tablet layouts, design critique and accessibility audit
11InfrastructureGitHub repo, Vercel project and environment variables, the Sanity webhook; a real test submission per form. Asks before each resource
12CLAUDE.md and cutover (go-live)Client CLAUDE.md and cutover checklist; tracking on in Vercel Production (still noindex); gates A (compliance), B (Lighthouse) and C (SEO parity) on the production deployment with tracking on; NEXT_PUBLIC_SITE_INDEXABLE=true; domain and DNS; post-launch compliance re-scan; then it offers handoff and report. Gates: no open high compliance finding (A), no Accessibility or SEO Lighthouse drop vs WordPress (B), no unapproved SEO regression (C). Have whoever controls DNS on hand

Modes. You pick one in the interview; it's saved as mode in wp2next.json:

  • pixel: the desktop site matches WordPress within 0.5 px; the mobile layout is redesigned.
  • faithful: same look, checked by visual review instead of measurement.
  • facelift: a new design with the same content, URLs, , forms and tracking (see facelift). There is no parity gate; content parity is checked instead.

Resuming. If the project folder already has a wp2next.json, migrate shows its table, asks only for what's still blank, and picks up where status says the build is.

go only through the secret store (your password manager or another backend you chose in init). They're never printed, never written to wp2next.json or .env.example, and never pasted into chat.

Once phase 12 passes, it offers handoff and, once, report (opt-in). Along the way it suggests side commands where they help: optimize after , tracking, seo parity and compliance before launch, contribute for lessons learned.

Arguments and options

ArgumentEffect
(none)Asks which Local site to move. With no user config yet, it first offers init
<local-site-slug>The Local site, for example acme for https://acme.local
<domain>The live domain; used to pre-fill the interview and find the Local copy
<folder>A Local site folder

Typing wp2next with no command, or wp2next followed by a site, also runs migrate.

If the site isn't in Local yet, migrate pauses and points you to Getting WordPress into Local. A REST-only route exists for sites you can't copy, with limits.

Examples

For Claude desktop
Text
/wp2next:migrate acme
  • wp2next migrate mysite.local: start from the Local host name.
  • wp2next migrate example.com: start from the live .
  • Plain language: "move mysite.local to Next.js".
  • Run it again in the same project folder to resume after a break.