Windows
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 WSL2 path and the Windows fixes.
wp2next runs on native Windows: the Claude desktop app (or another AI tool), 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 are | Use | Why |
|---|---|---|
| A site owner, or anyone new to this | Native Windows | Local 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 Macs | WSL2, with Local still on Windows | The 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 pnpm and one Git for a repo, either all Windows or all WSL.
What works where
| Native Windows | WSL2 | |
|---|---|---|
| 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 terminal | Yes, Windows 10 1809+ (setup (external site)) | Yes (Linux installer) |
| Claude Code sandbox | No. Native Windows has no sandbox; you approve each command instead. An accepted trade-off | Yes, on WSL 2 (not WSL 1) |
| Codex | Yes: 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) |
| Cursor | Yes (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 store | No (Mac only). Use a password manager, Vercel or a .env file (Secrets) | No |
Windows 10: expect wp2next's screenshot and parity checks to fail, because they run on Playwright; use a Windows 11 PC, or the WSL2 path below.
Native Windows (recommended)
Do these in order, once. Every command goes into PowerShell 7 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
Windows Terminal 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 Terminal (press the Windows key, type Terminal, press Enter) and run
(Microsoft (external site)):
winget install --id Microsoft.PowerShell --source wingetThen 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:
$PSVersionTable.PSVersion # 7.xWhy 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)):
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 sameThe 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
winget install --id Git.Git -e --source winget
winget install --id GitHub.cli -eGit for Windows 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).
Line endings: 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.
winget install --id OpenJS.NodeJS.24 -e(The OpenJS.NodeJS.24 package exists in the winget repository: winget-pkgs (external site).)
Use the winget package if you use the Claude desktop app. It puts Node on the Windows PATH 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.
fnm, 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).
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 24PowerShell 7 and Windows PowerShell 5.1 have different profile files
(Documents\PowerShell\ and Documents\WindowsPowerShell\); $PROFILE opens the right one for the
shell you're in (fnm (external site)).
5. pnpm 11.10.0
npm install -g pnpm@11.10.0Use 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 install manager (Python on Windows (external site)):
winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity
py install --configure -y
py --versionIt 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 → App execution aliases (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 Lighthouse speed and accessibility runs.
8. Local on Windows
Install Local 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
localhostat 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. - Site Shell 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, sowp 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 Sitesmeans the same folder. - The
.localaddress works through entries Local writes toC:\Windows\System32\drivers\etc\hosts. That file must not be read-only. Local's own guide notes that a domain other than.localcan be much faster on Windows (Local on Windows (external site)).
9. Your AI tool
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.
irm https://claude.ai/install.ps1 | iex
claude --version
claude doctorNo admin rights needed; it updates itself. winget install Anthropic.ClaudeCode also works but
doesn't update itself (setup (external site)). Git for Windows is
recommended for the same reason as above. If Claude can't find Git Bash, set
"env": {"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"} in
~/.claude/settings.json.
Either the ChatGPT desktop app, which has Codex built in (Microsoft Store, or
winget install --id 9PLM9XGG6VKS -s msstore), or the Codex CLI:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"Both run in PowerShell with OpenAI's native Windows sandbox. The recommended sandbox mode, mxc,
needs Windows 11 24H2 (build 26100.9278) or 25H2 (build 26200.9278) or later and no admin setup;
older builds fall back to elevated, which needs an admin to approve setup once
(Windows sandbox (external site),
Windows app (external site)).
Download the Windows installer from cursor.com (external site). Open the agent chat with Ctrl+I and set the mode to Agent. Its built-in terminal uses PowerShell unless you change it.
10. Check everything
Open a new Terminal tab and run:
node --version # v24.x
pnpm --version # 11.10.0
py --version # Python 3.x
git --version
gh --versionThen, inside your AI tool, run wp2next doctor:
/wp2next:doctor/wp2next:doctor$wp2next doctor/wp2next doctorOn Windows it also checks your PowerShell version, execution policy, 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)):
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
git config --global core.longpaths trueIt 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), thenwsl --updatenow 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)):
[wsl2]
networkingMode=mirroredThen 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 aspaths.localSitesDir; reading theme files from there is fine). - The database: with mirrored networking, wp2next's exporter connects to
127.0.0.1on the port from the site's Database tab. In WSL it reads that port from Local'ssites.jsonon 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 setWP2NEXT_LOCAL_DATAto that folder), or pass--port Nwith 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
.localname: by default (generateHosts = true) WSL rewrites/etc/hostsevery time it starts, so a line you add by hand disappears after the nextwsl --shutdownor reboot. Whether the generated file copies Local's entries from the Windows hosts file isn't documented (Not yet confirmed; wsl.conf (external site), checked 2026-12). So:-
After you create or import the site in Local, run
wsl --shutdownin PowerShell, open WSL again, and check withgetent hosts mysite.local. If it prints127.0.0.1 mysite.local, you're done. -
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.confRun
wsl --shutdownin PowerShell, open WSL again, then:Terminal echo "127.0.0.1 mysite.local" | sudo tee -a /etc/hosts getent hosts mysite.localWith
generateHosts = false, WSL no longer copies new Windows hosts entries either: add each new Local site's line the same way.
-
- HTTPS: 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 pointNODE_EXTRA_CA_CERTSat a copy of Local's certificate.
If the bridge keeps failing, run only the database export natively on Windows and do everything else in WSL.
5. Your AI tool in WSL
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.
# inside the WSL terminal
curl -fsSL https://claude.ai/install.sh | bash
claudeDoesn't need Git for Windows. The sandbox works on WSL 2.
In the ChatGPT desktop app, switch the agent to WSL2 in Settings and restart the app. Or install the
CLI inside WSL: curl -fsSL https://chatgpt.com/codex/install.sh | sh.
Use Cursor's own WSL extension, anysphere.remote-wsl, and uninstall Microsoft's WSL extension if
both are installed (community advice; recurring breakages are reported, Not yet confirmed in Cursor's
docs).
6. Playwright
Inside the project: pnpm exec playwright install --with-deps installs Chromium and its Linux
packages (Playwright (external site)).
Troubleshooting on Windows
| You see | Why | Fix |
|---|---|---|
'irm' is not recognized | You'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 separator | Windows PowerShell 5.1 | Use PowerShell 7 (step 1), or run each command on its own line |
… cannot be loaded because running scripts is disabled on this system | The 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 stub | Use py; check the aliases in step 6. wp2next skips a python3 that doesn't run |
node --version shows v26 | You installed the LTS package | winget 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 found | The app started before you installed it, or the tool is only in your PowerShell profile | Quit 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 always | Install Git for Windows (step 3), or update the app |
Can't connect to MySQL server / the export can't reach the database | The Local site isn't started, or (WSL) mirrored networking is off | Start the site in Local. In WSL, check mirrored networking |
.local stops resolving in WSL after a restart | WSL 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 Shell | Single quotes in cmd.exe | Use double quotes |
"Filename too long" or ENAMETOOLONG | The 260-character limit | Long paths and a shorter project folder |
| Screenshots or parity checks fail to start on Windows 10 | Playwright doesn't support Windows 10 | Use Windows 11 or WSL2 |
pnpm install is very slow | Defender scans every file | The optional Add-MpPreference line in step 5 |