Skip to content
wp2next, home
Skip to the page

Windows

Your AI tool

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

For everyone on a Windows PC: site owners and people running migrations. Moving your own site? The Move my site steps include the Windows commands; this page has the background, the advanced path and the Windows fixes.

wp2next runs on native Windows: the Claude desktop app (or another ), PowerShell 7 in Windows Terminal, and Local for the WordPress copy, all on the Windows side. That's the recommended setup for site owners. WSL2 (Linux inside Windows) is an advanced path for agencies and developers who want their Windows machines to behave like their team's Macs; it works, but it needs a network bridge to Local's database, so it has more parts that can go wrong.

Facts on this page were checked in December 2026. Sources are linked next to each one; follow them if something doesn't match.

Which path?

You areUseWhy
A site owner, or anyone new to thisNative WindowsLocal is a Windows app and its database is plain TCP on your own PC. Every tool installs with an installer or winget. No second file system, no network bridge
An agency or developer whose team works on MacsWSL2, with Local still on WindowsThe same shell scripts, line endings and case-sensitive paths as macOS and Linux; Claude Code's sandbox works there; Playwright installs its system packages itself

Whichever you choose, don't mix them inside one project: one Node.js, one and one Git for a repo, either all Windows or all WSL.

What works where

Native WindowsWSL2
Claude desktop app (Code tab)Yes: Windows x64 and ARM64 installers (quickstart⁠ (external site))It can run a session inside a WSL 2 distro, but plugins aren't available in WSL sessions (desktop docs⁠ (external site))
Claude Code in a terminalYes, Windows 10 1809+ (setup⁠ (external site))Yes (Linux installer)
Claude Code sandboxNo. Native Windows has no sandbox; you approve each command instead. An accepted trade-offYes, on WSL 2 (not WSL 1)
CodexYes: the ChatGPT desktop app or the Codex CLI, with OpenAI's Windows sandbox (Windows sandbox⁠ (external site))Yes (WSL2 only; WSL1 unsupported since Codex 0.115)
CursorYes (Windows installer)Through Cursor's own WSL extension (community reports; Not yet confirmed in Cursor's docs)
Local (the WordPress copy)Yes: Windows 10 or 11, 64-bit (install guide⁠ (external site))Local stays on Windows; WSL reaches it over mirrored networking
Playwright (screenshots, parity, compliance scan)Windows 11 or Windows Server 2019+. Windows 10 is not on Playwright's list (Playwright⁠ (external site))Yes (Ubuntu 22.04, 24.04, 26.04; Debian 12, 13)
macOS Keychain secret storeNo (Mac only). Use a password manager, Vercel or a .env file (Secrets)No

Windows 10: expect wp2next's screenshot and checks to fail, because they run on Playwright; use a Windows 11 PC, or the WSL2 path below.

Do these in order, once. Every command goes into in Windows Terminal (set up in the first two steps). After each winget install, close the Terminal window and open a new one so it finds the new program.

1. Windows Terminal and PowerShell 7

comes with Windows 11. On Windows 10, install it from the Microsoft Store (Microsoft⁠ (external site)).

Windows ships with Windows PowerShell 5.1. Install PowerShell 7 next to it (it doesn't replace 5.1). Open (press the Windows key, type Terminal, press Enter) and run (Microsoft⁠ (external site)):

POWERSHELL
winget install --id Microsoft.PowerShell --source winget

Then make it the default: in Terminal, open Settings → Startup → Default profile, pick PowerShell (not "Windows PowerShell", which is 5.1), and save (check in the UI). Open a new tab and check:

POWERSHELL
$PSVersionTable.PSVersion     # 7.x

Why it matters: Windows PowerShell 5.1 can't run a && b, and some fixes below differ between the two. If winget itself is missing (older Windows 10), install App Installer from the Microsoft Store.

2. Allow PowerShell scripts (execution policy)

On a Windows PC, PowerShell runs no .ps1 scripts until you allow it, and npm, pnpm and vercel start through small .ps1 scripts. Allow scripts you made and signed downloads, for your user only (no admin needed) (Microsoft⁠ (external site)):

POWERSHELL
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
powershell -NoProfile -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force"
Get-ExecutionPolicy -List                                    # PowerShell 7: CurrentUser shows RemoteSigned
powershell -NoProfile -Command "Get-ExecutionPolicy -List"   # Windows PowerShell 5.1: the same

The second line matters: PowerShell 7 keeps the CurrentUser policy in its own powershell.config.json, while Windows PowerShell 5.1 keeps it in the registry, so setting one leaves the other at Restricted (checked 2026-12, about_Execution_Policies⁠ (external site), about_PowerShell_Config⁠ (external site)). AI tools may run their commands in Windows PowerShell 5.1 (Codex's own installer line uses powershell, and which version the Claude app uses for ! commands isn't documented), and there npm, npx, pnpm and vercel fail with "running scripts is disabled" unless 5.1 allows them too.

On a work PC, a company policy may override this. If Get-ExecutionPolicy -List shows a MachinePolicy or UserPolicy value, ask your IT team.

3. Git for Windows and the GitHub CLI

POWERSHELL
winget install --id Git.Git -e --source winget
winget install --id GitHub.cli -e

is optional for the Claude desktop app itself, but install it anyway: with it, Claude uses Git Bash for its shell commands, and sessions that run in their own worktree need it (setup⁠ (external site), desktop docs⁠ (external site)). The GitHub.cli package ID is widely documented but wasn't re-checked this month (Not yet confirmed).

: wp2next repos (and every site it scaffolds) carry a .gitattributes file (* text=auto eol=lf), so files come out the same on Windows and Mac whatever your Git setting is. You don't need to change core.autocrlf.

4. Node.js 24

Use Node.js 24, not "LTS". Since 2026-10-28 the current LTS is Node 26, so winget install OpenJS.NodeJS.LTS and the "LTS" button on nodejs.org now give you 26 (Node.js releases⁠ (external site)). wp2next projects pin 24.

POWERSHELL
winget install --id OpenJS.NodeJS.24 -e

(The OpenJS.NodeJS.24 package exists in the repository: winget-pkgs⁠ (external site).)

Use the winget package if you use the Claude desktop app. It puts Node on the Windows that every app sees. The desktop app doesn't read PowerShell profiles (desktop docs⁠ (external site)), so a Node set up only in your profile (as fnm does) is invisible to it.

, for developers who switch Node versions and work from a terminal. Don't install both: pick winget or fnm, never mix Node managers (nvm-windows included).

POWERSHELL
winget install Schniz.fnm
# Add this line to your PowerShell 7 profile (notepad $PROFILE), save, open a new tab:
#   fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression
fnm install 24
fnm default 24

PowerShell 7 and Windows PowerShell 5.1 have different profile files (Documents\PowerShell\ and Documents\WindowsPowerShell\); $PROFILE opens the right one for the you're in (fnm⁠ (external site)).

5. pnpm 11.10.0

POWERSHELL
npm install -g pnpm@11.10.0

Use exactly this version: pnpm 12 is out, and pnpm@latest installs it (pnpm⁠ (external site)). pnpm recommends installing through npm on Windows because Windows Defender may block its standalone installer. Optional speed-up, from an admin PowerShell: Add-MpPreference -ExclusionPath $(pnpm store path).

6. Python 3

python.org now recommends the (Python on Windows⁠ (external site)):

POWERSHELL
winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity
py install --configure -y
py --version

It gives you the py and python commands. wp2next's choice on Windows is py (python.org calls python the everyday command; both work). The python3 command on Windows exists only to catch habits from other systems: it may open the Microsoft Store or print "Python was not found". wp2next tries python3, python and py -3 in turn and uses the first one that actually runs, so you don't need to fix python3.

If py or python misbehaves:

  • Open Settings → Apps → Advanced app settings → (check in the UI) and make sure Python (default) and Python install manager are on.
  • An old Python launcher from an earlier install can hide the new py: go to Start → Installed apps, search "Python launcher" and uninstall it.

7. Google Chrome

Install it from google.com, chrome⁠ (external site) if you don't have it. wp2next uses it for speed and accessibility runs.

8. Local on Windows

Install from localwp.com⁠ (external site). It needs Windows 10 (64-bit) or 11, 4 GB of RAM and 1.5 GB of disk space; 32-bit Windows was dropped in Local 8.3 (install guide⁠ (external site)).

Things that are different from a Mac:

  • Firewall prompts. On the first site, Windows Defender Firewall asks about Local's programs. Click Allow access on each. Dismissed one? Add Local under Windows Defender Firewall → Allowed apps.
  • The database is on a TCP port. On Windows, Local's MySQL listens on localhost at the port shown on the site's Database tab (Local⁠ (external site)). The port can change after Local restarts (community reports), so wp2next reads it fresh each time; you don't need to note it.
  • is cmd.exe, not PowerShell (community reports, Not yet confirmed in Local's docs). In it, quote values with double quotes: single quotes are passed through literally, so wp search-replace 'https://…' matches nothing.
  • Site folders. Sites are usually in C:\Users\<you>\Local Sites\<site>\app\public (community reports; Local's docs don't say). wp2next's default ~/Local Sites means the same folder.
  • The .local address works through entries Local writes to C:\Windows\System32\drivers\etc\hosts. That file must not be read-only. Local's own guide notes that a other than .local can be much faster on Windows (Local on Windows⁠ (external site)).

9. Your AI tool

For Claude desktop

Download the installer for your PC from claude.ai: Windows x64⁠ (external site) or Windows ARM64⁠ (external site), run it, open Claude from the Start menu, sign in, and click Code at the top of the sidebar (quickstart⁠ (external site)). It needs a Pro, Max, Ultra, Team or Enterprise plan. You don't need Node.js or the CLI for the app itself; wp2next's projects need the tools above.

  • Commands Claude runs: with Git for Windows installed, it uses Git Bash; without it, PowerShell (setup⁠ (external site); that the desktop app does the same is inferred from "the same underlying engine", Not yet confirmed in the desktop docs). Commands you type after ! run in PowerShell.
  • After installing any tool above, quit Claude completely and open it again, so it sees the new PATH.
  • No sandbox on native Windows: keep the permission mode on Manual or Accept edits and read what you approve.
  • "Another installation in progress" while installing, when none is running: run the installer as Administrator.

10. Check everything

Open a new Terminal tab and run:

POWERSHELL
node --version        # v24.x
pnpm --version        # 11.10.0
py --version          # Python 3.x
git --version
gh --version

Then, inside your AI tool, run wp2next doctor:

For Claude desktop
Text
/wp2next:doctor

On Windows it also checks your PowerShell version, , winget, the Python launcher, Git for Windows, Local's install, long paths and (on Windows 10) the Playwright warning.

Long paths (optional)

Windows limits most programs to 260-character paths. Deep node_modules folders can hit it. Keep projects in a short folder (the default C:\Users\<you>\Sites is fine). If you still see "path too long" errors, from an admin PowerShell run this, then restart (Microsoft⁠ (external site)):

POWERSHELL
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
git config --global core.longpaths true

It only helps programs that support long paths. (core.longpaths is a Git for Windows setting; Not yet confirmed this month.)

WSL2 (advanced)

You run the AI tool, Node, pnpm, Git and the project inside Linux, while Local keeps running on Windows. Check each item below.

Requirements

  • Windows 11 22H2 or later, for mirrored networking (WSL networking⁠ (external site)).
  • WSL 2 (not WSL 1). From an admin PowerShell: wsl --install (installs Ubuntu), then wsl --update now and then.

1. Turn on mirrored networking

In the default (NAT) mode, Linux can't reach Windows services on localhost, so it can't reach Local's MySQL. Mirrored mode lets Linux reach Windows at 127.0.0.1 (not ::1). Use the WSL Settings app from the Start menu, or add this to %USERPROFILE%\.wslconfig (WSL config⁠ (external site)):

INI
[wsl2]
networkingMode=mirrored

Then restart WSL from PowerShell: wsl --shutdown. Inbound connections may also need a Hyper-V firewall rule.

2. Install the toolchain inside Linux

Follow the Linux commands in Quick start → Toolchain inside the WSL terminal: fnm with Node 24, pnpm 11.10.0, Python 3 and Git from Ubuntu's packages, and a Linux mysql client (sudo apt install mysql-client, or default-mysql-client on Debian). Don't use the Windows Node, pnpm or Git from inside WSL.

3. Keep projects in the Linux file system

Put projects in ~/Sites inside Linux (/home/<you>/Sites), not under /mnt/c/.... Microsoft and OpenAI both advise this: /mnt/c is slower and causes symlink and permission problems (WSL file systems⁠ (external site), Codex in WSL⁠ (external site)). Windows can open them at \\wsl$\Ubuntu\home\<you>.

4. Point wp2next at Local

  • Local's sites folder is on the Windows side. During wp2next init, set the Local sites folder to /mnt/c/Users/<you>/Local Sites (saved as paths.localSitesDir; reading files from there is fine).
  • The database: with mirrored networking, wp2next's exporter connects to 127.0.0.1 on the port from the site's Database tab. In WSL it reads that port from Local's sites.json on the Windows side (/mnt/c/Users/<you>/AppData/Roaming/Local/sites.json), found through %APPDATA% or, if there is exactly one Windows user with Local, by looking under /mnt/c/Users. If it can't find it, tell it where: --local-data /mnt/c/Users/<you>/AppData/Roaming/Local (or set WP2NEXT_LOCAL_DATA to that folder), or pass --port N with the port from the Database tab (which can change after Local restarts). If Local's MySQL only listens on Windows' own loopback, NAT mode can't reach it at all; that's why mirrored mode is required (whether Local binds only to 127.0.0.1 is Not yet confirmed).
  • The .local name: by default (generateHosts = true) WSL rewrites /etc/hosts every time it starts, so a line you add by hand disappears after the next wsl --shutdown or reboot. Whether the generated file copies Local's entries from the isn't documented (Not yet confirmed; wsl.conf⁠ (external site), checked 2026-12). So:
    1. After you create or import the site in Local, run wsl --shutdown in PowerShell, open WSL again, and check with getent hosts mysite.local. If it prints 127.0.0.1 mysite.local, you're done.

    2. If it prints nothing, or an IPv6 address such as ::1 (mirrored mode can't reach Windows on ::1), stop WSL from rewriting the file, then add the line, which now stays:

      Terminal
      printf '[network]\ngenerateHosts = false\n' | sudo tee -a /etc/wsl.conf

      Run wsl --shutdown in PowerShell, open WSL again, then:

      Terminal
      echo "127.0.0.1 mysite.local" | sudo tee -a /etc/hosts
      getent hosts mysite.local

      With generateHosts = false, WSL no longer copies new Windows hosts entries either: add each new Local site's line the same way.

  • : Local's certificate is trusted in Windows, not in Linux, so Node and curl inside WSL will reject it (Not yet confirmed). Either use http://mysite.local, or point NODE_EXTRA_CA_CERTS at a copy of Local's certificate.

If the bridge keeps failing, run only the natively on Windows and do everything else in WSL.

5. Your AI tool in WSL

For Claude desktop

Pick the WSL environment in the Code tab's environment selector (quickstart⁠ (external site)). Plugins aren't available in WSL sessions (desktop docs⁠ (external site)), so the wp2next plugin won't load there. Install wp2next as a skill inside Linux instead (npx skills add MTRCio/wp2next -g -a claude-code) and type /wp2next init; whether WSL sessions read the Linux ~/.claude/skills is Not yet confirmed. If it doesn't work, use Claude Code in the WSL terminal.

6. Playwright

Inside the project: pnpm exec playwright install --with-deps installs Chromium and its Linux packages (Playwright⁠ (external site)).

Troubleshooting on Windows

You seeWhyFix
'irm' is not recognizedYou're in Command Prompt (the prompt reads C:\>), not PowerShell (PS C:\>)Open Terminal with the PowerShell profile
The token '&&' is not a valid statement separatorWindows PowerShell 5.1Use PowerShell 7 (step 1), or run each command on its own line
… cannot be loaded because running scripts is disabled on this systemThe execution policy, often only in Windows PowerShell 5.1 (it keeps its own setting)Both lines of step 2
python3 opens the Microsoft Store, or "Python was not found"The python3 alias stubUse py; check the aliases in step 6. wp2next skips a python3 that doesn't run
node --version shows v26You installed the LTS packagewinget uninstall --id OpenJS.NodeJS.LTS, then winget install --id OpenJS.NodeJS.24 -e, then open a new Terminal
Works in Terminal, but Claude desktop says node (or pnpm, py, gh) isn't foundThe app started before you installed it, or the tool is only in your PowerShell profileQuit Claude completely and open it again. If it still fails, install Node with winget, not fnm (step 4)
Claude desktop says "Git is required"Worktree sessions need Git; older app versions asked for it alwaysInstall Git for Windows (step 3), or update the app
Can't connect to MySQL server / the export can't reach the databaseThe Local site isn't started, or (WSL) mirrored networking is offStart the site in Local. In WSL, check mirrored networking
.local stops resolving in WSL after a restartWSL rewrote /etc/hosts (generateHosts)WSL step 4: generateHosts = false, then add the line again
WSL: the export says "cannot find the database … Pass --port N"Local's sites.json (on the Windows side) wasn't found--local-data /mnt/c/Users/<you>/AppData/Roaming/Local, or --port N (WSL step 4)
wp search-replace changes nothing in Site ShellSingle quotes in cmd.exeUse double quotes
"Filename too long" or ENAMETOOLONGThe 260-character limitLong paths and a shorter project folder
Screenshots or parity checks fail to start on Windows 10Playwright doesn't support Windows 10Use Windows 11 or WSL2
pnpm install is very slowDefender scans every fileThe optional Add-MpPreference line in step 5