- 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-clias the destination directory when cloning initially.) - Open
wp-cli.local.ymland edit the<project-url>and<user>fields to match your project. - Open
local.phpand edit theDB_HOSTip: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.ymlup one directory into the root of the project. This lets you runwpcommands 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 --extrato test.
Licensed under MIT. Original idea and code from the VVV project, modified for Local use by BigWing.
