I can't get WP-CLI to run on Windows.

  • Downloaded https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar to c:\wp-cli\wp-cli.phar,
  • Added c:\wp-cli\ to the System & User Path variable,
  • Opened a new CMD window, ran wp --info, received:

'wp' is not recognized as an internal or external command, operable program or batch file.

Help appreciated.

Added c:\wp-cli\ to the System & User Path variable

1 Answer 1


Per the documentation on make.wordpress.com, you need to create a file called wp.bat located in your C:\wp-cli folder, with the following contents:

php "c:/wp-cli/wp-cli.phar" %*

Once you have this set up, you should be able to use wp to execute WP-CLI, presuming you have PHP installed.

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.