Running WP CLI commands in v4?


I’ve checked the documentation and maybe I’ve missed something.

How do you run commands such as “wp media regenerate” in v4 the right way?

I seem to be able to do it in a hacky way by installing php7.2-mysql and wp-cli globally, but that is really not the ideal way to do it.


In V4 everything happens in virtual docker containers. So what you can do is open up an interactive shell and then use WP CLI through that shell… So you’ll do…

ee shell
wp plugin install buddypress --activate

More info:


Answer given by @bowefrankema is correct and hence I’m closing this thread