Download wp-cli.phar from https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
wp-cli.phar file in C:\wp-cli\
wp.bat file in C:\wp-cli\ and write below code in it.
php "C:\wp-cli\wp-cli.phar" %*
Or download file from gist https://gist.github.com/maheshwaghmare/848b5a9f21f27239600cf08693a0bedb
Open system environment and set
C:\wp-cli as environment path.
Open Command Prompt and type command
wp and press Enter. It’ll show you the like the below screenshot.
In development, We spend a lot of time on the command line. We type a lot of commands on regularly.
I have created a shortcut for the most of the commands which I use on a daily basis some of them are below:
|wp theme list
|wp plugin list
Check all the available WP CLI commands etc. (all WP CLI commands list)
Example 1. Using shortcut
wpthl instead of
wp theme list
Example 2. Using shortcut
wppll instead of
wp plugin list
Some more commands with keyboard shortcuts/aliases are below:
|git add .
|git commit –message
|git pull origin
|git push origin
To create keyboard shortcuts using aliases is very simple. We can create any command shortcut/aliases.
Follow below simple steps:
- Open the file
.bashrc which is found in location
- Add below sample commands of Git & Grunt.
I found the article Terminal/Bash Command-Line Shortcuts with Aliases written by @jonsuh to create keyboard shortcuts for the Terminal/Git Bash.
I have added some more commands of Grunt, WP CLI & PHPCS on my local environment.
WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installs and much more, without using a web browser.
Below is the complete list of WP CLI commands generated with WP CLI Commands Cheat Sheet (Complete List of WP CLI Commands)