I want to setup WP CLI. On the home page it says that it needs a UNIX like operating system.

I am running windows 7 for development but I could probably setup a virtual Ubuntu box or something. Would I run that alongside my existing ampps setup or would I need to setup a new local server inside the inux box or how would it work. And are there other options. I have seem that running it with composer seems to be an option, in fact as far as I can tell it's the only mention of windows on the website. Are there any tried and tested setups that would work for windows users.

  • Try installing msysgit or git bash, and install it (and run it) from there. Most features should work on a Windows machine Jan 20, 2015 at 21:07
  • Thanks ... I ended up going with vagrant, which might be a bit overkill but I can appreciate what you're suggesting ... might try it if vagrant gets the better of me ... not exactly windows friendly any of this stuff Jan 21, 2015 at 0:56

2 Answers 2


Installing wp-cli through Composer is the way to go. For instance:

  1. $ cd C:\
  2. $ composer create-project wp-cli/wp-cli --no-dev
  3. Copy the path to the bin directory inside the wp-cli directory (something along the lines of C:\wp-cli\bin)
  4. Add copied path to the Windows Path variable (tutorial)

Exit all CMD's (or git bash) and reopen them. Now go to one of your WordPress installs and type wp core version. You should get the WP version


It is possible to install Composer and then install wp-cli . Under Alternative-Install-Methods it says to use wp-cli/bin/wp.bat, although I didn't like typing that path.

After installing in the manner mentioned, I created a wp.bat in my WordPress root along side wp.phar with the following contents:

php "wp-cli/php/boot-fs.php" %*

Seems to work for what little I use it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.