- Clone this repo into your project's folder, usually found under ~/Local Sites/.
git clone https://github.com/bigwing/local-wp-cli.git wp-cli
- Rename folder to
wp-cli
. (Hint: you can skip this step by specifyingwp-cli
as the destination directory when cloning initially.) - Open
wp-cli.local.yml
and edit the<project-url>
and<user>
fields to match your project. - Open
local.php
and edit theDB_HOST
ip:port to match the project's settings. Local uses the same IP but assigns a new port for each project. - Move the
wp-cli.local.yml
up one directory into the root of the project. This lets you runwp
commands directly from that folder, or any other folder inside the project. - Run wp-cli commands from within your active project without having to SSH into the machine first. Try
wp core version --extra
to test.
Licensed under MIT. Original idea and code from the VVV project, modified for Local use by BigWing.