Quick start
The short path for people who run migrations: freelancers, agencies and developers. It assumes you know your way around a terminal, Git and an AI coding agent. Moving your own site for the first time? Use the step-by-step track instead: Move my site.
Order: toolchain → install → init → doctor → migrate → launch gates → handoff. How the pieces fit together is in Concepts.
Before you start
- An agent with Agent Skills support: the Claude desktop app (Code tab; the default these docs assume), Claude Code in a terminal, Codex or Cursor are the tested ones. Plans and install steps: AI environments.
- Accounts: GitHub, Vercel, Sanity, and Resend for form email (plus HubSpot or monday.com if leads go to a CRM). Decide who owns them first: Accounts and plans. A business site needs Vercel Pro; Hobby is for personal, non-commercial use only (checked 2026-12, vercel.com, pricing (external site)).
- CLIs, logged in:
gh auth login,vercel login,npx sanity@latest login(check withgh auth status,vercel whoami,npx sanity@latest projects list). MCP servers are optional: MCP servers and command-line tools. - A secret store: the password manager you already use, or Vercel env /
.envas a fallback: Secrets: where wp2next keeps passwords and API keys. - The WordPress site in Local: Getting a WordPress site into Local. No hosting access? The same page covers the REST export fallback.
- Google Chrome, for Lighthouse runs on the old and new site.
wp2next runs on macOS, Linux and native Windows (PowerShell 7 in Windows Terminal, Local on Windows). WSL2 is an advanced option for teams who want Windows to behave like their Macs; it needs mirrored networking to reach Local's database. Both paths: Windows.
Codex users. Codex's default workspace sandbox blocks much of this page: gh, vercel,
npx sanity, pnpm install, fetching *.local sites and secret-store CLIs all need the network,
which is off by default, and init writes outside the workspace (~/.config/wp2next/). Start Codex
in your projects folder (e.g. ~/Sites), expect an approval prompt for ~/.config/wp2next/, and
either approve the network prompts or set network_access = true under [sandbox_workspace_write]
in ~/.codex/config.toml. Don't use full access. Details:
AI environments.
Client-owned sites
client-owned is the recommended ownership, but your user config holds your github.owner,
vercel.team and sanity.org. For each client-owned site:
- Before phase 7, the client creates a GitHub org, a Vercel Pro team and a Sanity org, and invites you. If leads go to HubSpot, their super admin creates the service key in their portal.
- In the
migrateinterview, answer Change for this site at the Accounts question (batch M3) and enter the client's GitHub org, Vercel team and Sanity org ID. They're saved in that site'swp2next.jsonand override your defaults. Answering "Yes, use them" would create the Sanity project (phase 7) and the GitHub repo and Vercel project (phase 11) in your accounts. - At the end,
handoffis short: it checks the client is admin everywhere, rotates the keys you created into their store and removes your access; thesanity,github,vercelandvercel-github-appsteps are n/a.
Details: Accounts and plans, Handing a site over to the client.
Using HubSpot
- In
init, pick Email via Resend and HubSpot for forms; it's saved as["resend","hubspot"](safety net first). - Before
migrate, decide with the client how HubSpot records leads (batch M5b has no recommended answer): a form submission (marketing contact with page-view attribution, with or without an unticked opt-in box) or a CRM contact only (non-marketing contact, no page history). Form GUIDs are collected in phase 7. - Have the client's HubSpot super admin create a service key (Development → Keys → Service keys,
scopes
formsandcrm.objects.contacts.write) for phase 7. It's stored asHUBSPOT_SK; legacy private apps can no longer be created. - Load HubSpot's tracking code (analytics
hubspot, or thehubspotGTM tag), orinitandconfig.py validatewarn that form-mode leads arrive without visit attribution. - Set
FORMS_DESTINATIONS=resendon Preview so test submissions stay out of the CRM.
Details: Forms, email and CRM, Environment variables.
Toolchain
Every site wp2next builds runs on Node 24 LTS and pnpm 11.10.0, plus Python 3 (3.9+, for the skill's helper scripts) and Git.
xcode-select --install # Git and Python 3
brew install fnm # Node version manager; reads .nvmrc
echo 'eval "$(fnm env --use-on-cd --shell zsh)"' >> ~/.zshrc && source ~/.zshrc
fnm install 24 && fnm default 24
npm install -g pnpm@11.10.0 # the exact version projects pin
node --version; pnpm --version; python3 --version; git --version# PowerShell 7 in Windows Terminal. One-time: allow npm/pnpm's .ps1 shims.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
winget install --id Git.Git -e --source winget
winget install --id GitHub.cli -e
winget install --id OpenJS.NodeJS.24 -e # not OpenJS.NodeJS.LTS: that is Node 26 now
# open a new Terminal, then:
npm install -g pnpm@11.10.0
winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity # Python install manager
# open a new Terminal, then:
py install --configure -y
node --version; pnpm --version; py --version; git --versionPrefer fnm? winget install Schniz.fnm, add fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression
to $PROFILE, then fnm install 24 and fnm default 24. But the Claude desktop app doesn't read
PowerShell profiles, so it won't see fnm's Node; use the winget package if you work in the app. One
Node manager only. Details and fixes: Windows.
# Git and Python 3 from your distribution's packages, then:
curl -fsSL https://fnm.vercel.app/install | bash # or your package manager; see github.com/Schniz/fnm
fnm install 24 && fnm default 24
npm install -g pnpm@11.10.0
node --version; pnpm --version; python3 --version; git --versionThe skill runs its Python helpers with the first of python3, python and py -3 that actually
runs, so the Windows python3 Store stub doesn't get in the way.
Notes for people who already have a setup:
- Projects pin the toolchain:
.nvmrcis24; the rootpackage.jsonandapps/web/package.jsoncarry"engines": {"node": ">=24 <25"}; the rootpackage.jsonhas"packageManager": "pnpm@11.10.0". Vercel reads both. Odd Node lines (25, 27…) are not supported. - Install pnpm with npm, not Corepack: Node stops including Corepack from version 25. A global pnpm belongs to the Node it was installed under, so reinstall it after adding a new Node version.
- nvm works too (
nvm install 24 && nvm alias default 24). Avoid Homebrew's Node:brew install nodemay not be 24, andbrew install node@24is keg-only (not on your PATH). The nodejs.org installer works but global installs can fail withEACCES; fix that with a version manager, notsudo. - Inside a project, run one-off tools with
pnpm dlx, notnpx. Outside a project (for examplenpx skills addbelow),npxis fine.
Install
Pick one route. Two installs can load two versions; doctor warns when it finds more than one.
Customize → Plugins → Add → Add marketplace, enter MTRCio/wp2next, install wp2next, then
start a new Code session (or /reload-plugins). If the commands don't appear, install the plugin once
with the CLI from the Code tab's Terminal pane instead; the app shares it:
claude plugin marketplace add MTRCio/wp2next
claude plugin install wp2next@mtrcDetails and caveats (some of this route is Not yet confirmed): AI environments.
# Plugin (recommended). Type these inside Claude Code, then /reload-plugins or restart.
/plugin marketplace add MTRCio/wp2next
/plugin install wp2next@mtrcnpx skills add MTRCio/wp2next -g -a codex
# Restart Codex.npx skills add MTRCio/wp2next -g -a cursor
# Restart Cursor.npx skills add MTRCio/wp2next -g -a <agent> # for example -a gemini-cliThe Claude desktop app and Claude Code also take the skills installer (npx skills add MTRCio/wp2next -g -a claude-code) if you
prefer it to the plugin.
Manual install from a git clone (update later with git pull). Link only the skills/wp2next
folder, never the whole repo:
The app's local sessions read ~/.claude/skills/, so link the skill there, as for Claude Code:
git clone https://github.com/MTRCio/wp2next.git ~/.local/share/wp2next
mkdir -p ~/.claude/skills
ln -s ~/.local/share/wp2next/skills/wp2next ~/.claude/skills/wp2nextgit clone https://github.com/MTRCio/wp2next.git "$HOME\wp2next-src"
New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null
New-Item -ItemType Junction -Path "$HOME\.claude\skills\wp2next" -Target "$HOME\wp2next-src\skills\wp2next"git clone https://github.com/MTRCio/wp2next.git ~/.local/share/wp2next
mkdir -p ~/.claude/skills
ln -s ~/.local/share/wp2next/skills/wp2next ~/.claude/skills/wp2nextgit clone https://github.com/MTRCio/wp2next.git "$HOME\wp2next-src"
New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null
New-Item -ItemType Junction -Path "$HOME\.claude\skills\wp2next" -Target "$HOME\wp2next-src\skills\wp2next"git clone https://github.com/MTRCio/wp2next.git ~/.local/share/wp2next
mkdir -p ~/.agents/skills
ln -s ~/.local/share/wp2next/skills/wp2next ~/.agents/skills/wp2nextgit clone https://github.com/MTRCio/wp2next.git "$HOME\wp2next-src"
New-Item -ItemType Directory -Force "$HOME\.agents\skills" | Out-Null
New-Item -ItemType Junction -Path "$HOME\.agents\skills\wp2next" -Target "$HOME\wp2next-src\skills\wp2next"git clone https://github.com/MTRCio/wp2next.git ~/.local/share/wp2next
mkdir -p ~/.agents/skills
ln -s ~/.local/share/wp2next/skills/wp2next ~/.agents/skills/wp2nextgit clone https://github.com/MTRCio/wp2next.git "$HOME\wp2next-src"
New-Item -ItemType Directory -Force "$HOME\.agents\skills" | Out-Null
New-Item -ItemType Junction -Path "$HOME\.agents\skills\wp2next" -Target "$HOME\wp2next-src\skills\wp2next"On Windows a directory junction stands in for the symlink (no admin rights or Developer Mode needed).
Where each agent reads skills from, and Codex's permission settings: AI environments.
How to type commands
This page writes wp2next <command>. In your agent:
/wp2next:init # plugin install: every command is namespaced
/wp2next init # npx skills or git-clone install/wp2next:init # plugin install: every command is namespaced
/wp2next init # npx skills or git-clone install$wp2next init/wp2next initwp2next init # or in plain words: "run wp2next init"All 22 commands, one page each: reference/commands.
init: save your defaults
Run once per machine, in any folder:
wp2next initIt asks about 15 questions in five batches (role, GitHub, plans, ownership and secrets, forms,
parity mode, tracking, quality, agent, folders, naming), each with the recommended answer first. It
writes only the user config, ~/.config/wp2next/config.json (or $XDG_CONFIG_HOME/wp2next/config.json;
on Windows C:\Users\<you>\.config\wp2next\config.json),
which never holds secrets, then offers companion skills and runs doctor. Nothing is created in any
account.
Defaults that fit most agencies and freelancers (the interview's recommendations, in config-key form):
| Setting | Key | Recommended | Why |
|---|---|---|---|
| Role | profile.role | agency or freelancer | Drives later recommendations |
| GitHub | github.ownerType, github.visibility | org, private | A free org makes teammates and repo handover easy |
| Vercel plan | vercel.plan | pro | Any client or business site needs Pro (checked 2026-12, Vercel fair use (external site)) |
| Sanity plan | sanity.plan | free | Fits most small marketing sites; Growth when you need more roles or private datasets (checked 2026-12, sanity.io, pricing (external site)) |
| Ownership | ownership | client-owned | The client keeps control if you part ways; maker-owned-transfer-later is the faster start |
| Secrets | secrets.backend | the manager you already use | 1password, keeper, bitwarden, doppler, infisical, keychain (macOS only), vercel or dotenv |
| Forms | forms.destinations | ["resend"] | Email is the safety net; HubSpot and monday.com go after it as CRM copies |
| Parity mode | parity.defaultMode | pixel | faithful and facelift are per-site choices too |
| Tracking | tracking.analytics, tracking.tagManager | GA4 + GTM | You confirm the stack per site in migrate |
| Quality | quality.wcag, quality.useImpeccable | 2.2-AA, true | impeccable powers critique, audit and polish |
| Naming | naming.*, secrets.namespace | repo {code}-site, Vercel {code}-web, Sanity {code}, Studio {code}.sanity.studio, secrets wp2next/{code} | {code} is the short site code |
Useful variants:
wp2next init secrets # re-ask one batch: ownership, secret store, forms, default mode (keywords: reference/commands/init.md)
wp2next init --reset # start from built-in defaults; the old file is kept as config.json.bakEvery key, its allowed values and the per-site overrides: Configuration reference.
The helper script behind it (config.py show|get|set|validate): Scripts.
doctor
Run it whenever something seems off:
wp2next doctorIt checks Node, pnpm, Python, Git, (on Windows) PowerShell, execution policy, winget and long paths, the gh/vercel/sanity logins, Local, your secret store, form
keys inside a project (names only), Playwright, Chrome for Lighthouse, companion skills, impeccable,
and whether wp2next is out of date or installed twice. It changes nothing and links each fix.
migrate
Open your agent in the folder where you keep projects (default ~/Sites; in the Claude desktop app,
a Local session with that folder) and run:
wp2next migrate mysite.local- Interview. Short code, name, domain, mode, blog, languages, editors, deadline, tracking stack, consent, form destinations. Answers your user config already fixes are pre-filled, not re-asked.
- Echo-back table. Every name it will create. Nothing happens until you say yes. The answers go to
wp2next.jsonin the new repo. - Twelve phases, each ending at a checkpoint. The agent stops before every resource it creates in an account (Sanity project, GitHub repo, Vercel project, webhook). Phase map: Concepts.
- Parity sign-off (phase 9). Until you sign off, nothing may change the look. After it, the agent
offers
optimize.
Stop any time; progress lives in wp2next.json. Pick up with wp2next status (add --dashboard for
a one-page HTML overview).
Side commands you will use during a build: tracking, content, critique, audit, polish,
optimize, facelift. See reference/commands.
Before launch
Go-live runs inside migrate phase 12 (CLAUDE.md and cutover). It turns tracking on in Vercel
Production while the site is still noindex, runs three gates on that production deployment with
tracking on, then sets NEXT_PUBLIC_SITE_INDEXABLE=true, adds the domain, moves DNS and re-scans
after launch. Have whoever controls DNS on hand (the interview asks who, in batch M3).
- Gate A: no open high-severity
compliancefinding. - Gate B: no Accessibility or SEO Lighthouse regression vs WordPress.
- Gate C: no unapproved
seo parityregression.
wp2next compliance # privacy, consent, accessibility, form consent; not legal advice
wp2next seo parity # titles, descriptions, canonicals, JSON-LD, sitemap: WordPress vs the Next buildDetails: SEO and AI search: keeping your rankings through the move, Compliance: privacy, consent, accessibility and form checks. The go-live steps in plain words are in Step 7: Go live; tracking and Search Console in Tracking and search: analytics, consent and Search Console.
Handoff
If the site belongs to a client:
wp2next handoff plan # your tailored step list; changes nothing
wp2next handoff # runs it, one confirmed step at a time; writes HANDOFF.md
wp2next handoff cleanup # removes your access, after the support periodFull runbook (analytics, GTM, Sanity, GitHub, Vercel, domain last, key rotation): Handing a site over to the client.
When the last phase passes, wp2next asks once whether to count the finished migration on the public counter. It shows the exact anonymous text first and sends nothing without a yes: Handing a site over to the client.
Keep up to date
wp2next update updates the skill the way you installed it. wp2next upgrade, run inside a site
built with an older version, brings that site forward on its own branch. See Updating wp2next and your sites.
Stuck? Run wp2next doctor, then Troubleshooting.