Local Community

Wp-cli in SSH Not Working on Windows in Local 5.5.3

Windows 10 Build 19401 with Local 5.5.3.

When I start a new SSH session and run basic wp-cli commands, I don’t get any return values and the commands themselves seem to have no impact.

image

I just updated to WSL2 which also broke the old Local (WSL2 requires Hyper-V which conflicts with VirtualBox), so I’m really deep in it right now.

It looks like WSL2 blocks any communication from linux going to localhost. That’s causing lots of problems with other applications as well, not just Local. I went through getting my workflow working from WSL2 this past week and wrote about it here: https://anchor.host/local-lightning-and-upgrading-to-wsl2/. Hope this is helpful.

Hey man, just read your post and artice, very nice stuff!

I’m using localwp in my Windows machine with WSL2 enabled. But, I have some question about your workflow:

  • Are you using the WSL2 filesystem or the standard NTFS?
  • Do you run cli commands from the Windows-side or WSL-side?
  • Did you setup composer for projects using local?

Anyway, thanks for the writeup and info!

So Local manages the WordPress sites on the Windows site under C:\Users<user>\Local Sites. I run all of my CLI commands using WSL using the equivalent \mnt\c\Users<user>\Local Sites. I use Composer lightly for a some plugin development which seems to work fine over WSL.