Created
October 17, 2016 11:08
-
-
Save k1sul1/1d77b751e13bfe6c1669d4c8b129eecc to your computer and use it in GitHub Desktop.
Vagrant enabled wp-cli in bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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