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
# Docker WP CLI command shortcut | |
# Step 1. Put this in your ~/.bashrc or ~/.zshrc file | |
wp() { | |
docker-compose exec php wp "$@" --allow-root | |
} | |
# Step 2. Open up a new shell to reload the config | |
# Step 3. Usage - type `wp post list` or any other standard wp cli command. |