Installing WP-CLI in Windows

1. Install Composer

Download and install the Composer

2. Verify Composer:

composer -V

3. Verify PHP

php -V

4. Download wp-cli phar file. Create a folder wp-cli in C:\ directory & put the phar file in the directory. Create a batch file & enter the following code. Save the file name as wp.bat

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

5. Set environment variable in advance system setting. Add the following path. Assumed you already have added the PHP & MySQL path, if not add those paths also.


6. Open CMD and verify the wp cli by entering this code

wp --info

Leave a Comment