Available commands
Following the list of all WP Setup available commands.
You can also see a full list running:
You can use the --help
flag in all commands to get a full list of options.
npx wp-setup --help
Init
npx wp-setup init [--tests]
The init setup create the necessary configuration files to start running your environment and tests. This command is fully explained at our getting started.
Option | Value Type | Description |
---|---|---|
–tests | Boolean | Create the WordPress tests files instead of the development environment. |
Start
npx wp-setup start [--xdebug]
Start the development environment. Optionally can start the environment with XDebug.
Option | Value Type | Description |
---|---|---|
–xdebug | Boolean | Enable XDebug for the development environment. |
Destroy
npx wp-setup destroy
Destroy the development environment (needs confirmation). This command fully delete all docker volumes used in current environment as the used for WordPress and MySQL datatbase.
WARNING: This will permanently delete any posts, pages, media, etc. in your environment.
Run
npx wp-setup run [--workdir] <service> <command...>
Run a command in the development environment. If the service is not running it will start just during execution.
Option | Value Type | Description |
---|---|---|
-w, –workdir | string | Can be a binded relative volume from host or an absolute path in the container (default to service workdir). |
service | string | The service to run the command on. |
command… | mixed | The command to run in the service. |
WP and WP-Test
npx wp-setup wp <command...>
# or
npx wp-setup wp-test <command...>
Run a WP_CLI command in the development or test environment.
Option | Value Type | Description |
---|---|---|
command… | mixed | The WP_CLI command to run. |
Code
npx wp-setup code [--editor] [--test] [workdir]
Open the code editor in development environment. Current only supports VSCode
Option | Value Type | Description |
---|---|---|
-e, –editor | string | The code editor to use (default to the one in the setup file). |
–test | string | Open the code editor in the test environment. |
workdir | string | Can be a binded relative volume from host or an absolute path in the container (default to service workdir). |