Skip to content

vip dev-env exec

Run a WP-CLI command against a local environment.

Usage

vip dev-env exec [options]

Options

OptionDescription
-d, --debug Generate verbose output during command execution to help identify or fix errors or bugs.
-f, --force Skip validation for a local environment to be in a running state.
-h, --help Retrieve a description, examples, and available options for a (sub)command.
-q, --quiet Suppress informational messages.
-s, --slug A unique name for a local environment. Default is “vip-local”.
-v, --version Retrieve the version number of VIP-CLI currently installed on the local machine.

Examples

- Run a WP-CLI command against a local environment named "example-site".
* A double dash ("--") must separate the arguments of "vip" from those of the "wp" command.
$ vip dev-env exec --slug=example-site -- wp post list

- Target the WP-CLI command against the network site "example.example-site.vipdev.lndo.site" of a local multisite environment.
$ vip dev-env exec --slug=example-site -- wp user list --url=example.example-site.vipdev.lndo.site

- Run the WP-CLI command "wp shell" against a local environment to open an interactive PHP console.
$ vip dev-env exec --slug=example-site -- wp shell

Last updated: July 11, 2024