Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Using WP CLI
Clone this wiki locally
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
php flag can be used along with the
xdebug flag if needed.