WP-CLI is the WordPress Command line tool. WP CLI helps the user like us to perform WordPress administration tasks and Scaffolding. For more detail of the WP CLI, Please go to the WP CLI handbook.
In this article, I will show how to install the WP CLI in Windows.
- Open the
D:drive in the “My PC” explorer.
- Make a new folder
- Now download the wp-cli.phar from the
- Move the downloaded wp-cli.phar to the
- Create a file named
with the following contents:
@ECHO OFF php "d:/wp-cli/wp-cli.phar" %*
- Then we should set the
D:/wp-clifor the path by running following command by the command line. Please note that I have used
d:\in the lower case
setx path "%path%;d:\wp-cli"
- Then run the wp command from anywhere and see the output.