Back to Site

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.

OptionValue TypeDescription
–testsBooleanCreate 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.

OptionValue TypeDescription
–xdebugBooleanEnable 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.

OptionValue TypeDescription
-w, –workdirstringCan be a binded relative volume from host or an absolute path in the container (default to service workdir).
servicestringThe service to run the command on.
command…mixedThe 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.

OptionValue TypeDescription
command…mixedThe WP_CLI command to run.

Code

npx wp-setup code [--editor] [--test] [workdir]

Open the code editor in development environment. Current only supports VSCode

OptionValue TypeDescription
-e, –editorstringThe code editor to use (default to the one in the setup file).
–teststringOpen the code editor in the test environment.
workdirstringCan be a binded relative volume from host or an absolute
path in the container (default to service workdir).