Skip to content

Instantly share code, notes, and snippets.

@k1sul1
Created October 17, 2016 11:08
Show Gist options
  • Save k1sul1/1d77b751e13bfe6c1669d4c8b129eecc to your computer and use it in GitHub Desktop.
Save k1sul1/1d77b751e13bfe6c1669d4c8b129eecc to your computer and use it in GitHub Desktop.
Vagrant enabled wp-cli in bash
# Add to your .bashrc or whatever.
# Use wp-cli like you normally would: wp plugin activate duplicate-post
function wp {
if [ -f Vagrantfile ]; then
echo "Running wp-cli in Vagrant..."
vagrant ssh --command "wp $(echo $@)"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment