Using WP CLI - Pilothouse-App/Pilothouse GitHub Wiki
WP-CLI commands can be run directly from the command line without needing to SSH into the Docker container.
Change to a location in the site directory you wish to run the command against, and run the wp
command as normal.
wp command-to-run --flags
To run a WP-CLI command with Xdebug enabled, add the --xdebug
flag to your command:
wp command-to-run --flags --xdebug
WP-CLI will be run using the version of PHP defined in the site-specific configuration file, or the global PHP default if no site-specific configuration exists.
To override the default PHP version, add the --php
flag, specifying the PHP version like so:
wp command-to-run --flags --php=5.6
The php
flag can be used along with the xdebug
flag if needed.