Zsh: command not found: wp

Which version of Local is being used?

Local 5.10.5+5403

What Operating System (OS) and OS version is being used?

macOS Big Sur 11.4, M1 MacBook Air

Issue Summary

wp cli commands not recognized in terminal. Right clicked site in Local site list, chose “Open Site Shell” and attempted to utilize any wp command. Always outputs: zsh: command not found: wp

The terminal shows that WP-CLI is installed. It just seems that the wp command is not recognized.

Setting Local environment variables...
WP-CLI:   WP-CLI 2.5.0-alpha
Composer: 1.10.8 2020-06-24
PHP:      7.3.5
MySQL:    mysql  Ver 8.0.16 for macos10.14 on x86_64 (MySQL Community Server - GPL)
Launching shell: /bin/zsh ...

Just upgraded to 6.0.0+5444, and this behavior persists.

Quick followup. When I discovered that zsh was working properly on one of my Macs I dug in and found that my .zshrc file (customized to support Home Brew) was conflicting on my laptop. After relocating that file the site shell worked once more – though it seems like some of the wp-cli database related commands are having issues. Now I just need to get that .zshrc file playing nice with everything. :expressionless:

Are they the “clean” “drop” “create” “reset” subcommands?

This is a bug with the db subcommands and needs to have some work done to refactor that wpcli code:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.