Environment commands
Commands that build, run, check, and tear down the environment. Global options and exit codes are on the CLI reference index.
wonderpress init
Clones the development environment, downloads WordPress, creates the database, installs theme Composer dependencies (including wonderpress-core) and Static Kit, and activates the theme.
| Flag | Description |
|---|---|
--yes, -y | Headless: take defaults, never prompt. |
--env <host|wp-env> | Backend. Recorded in .wonderpressrc. |
--dir <path> | Where to build (default: cwd). |
--theme <name> | Theme to activate (default: wonderpress). |
--namespace <slug> | Block namespace. Defaults to the theme slug. Set once; it is a commitment to content. |
--db-host, --db-user, --db-name, --db-password | Database. Host backend only. Password may come from WP_DB_PASSWORD. |
--wp-url <url> | Site URL. Host backend only. |
--wp-title <title> | Site title. |
--admin-user, --admin-email, --admin-password | First administrator. Password may come from WP_ADMIN_PASSWORD. --admin-user is refused on wp-env (the first user is always admin). |
--skip-readme | Do not generate a project README. |
wonderpress init --yes --db-user root --db-name my_site \ --wp-url localhost:8080 --wp-title "My Site" \ --admin-user admin --admin-email me@example.comwonderpress init --env wp-env --yes --wp-title "My Site"
The wp-env backend cannot honor --db-* or --wp-url. Drop those flags, or use host.
wonderpress server / wonderpress server stop
Start or stop the local site for the backend this project was built with. Bare wonderpress server means start. On host, start blocks in the foreground until Ctrl-C.
wonderpress destroy
Tear the environment down (database or containers) while keeping the theme and project files.
wonderpress lint [-f, --fix]
Runs PHPCS against the Wonderpress coding standards (WordPress rules via the project phpcs.xml), plus partial check-drift and template validate, plus the token-bridge check between theme.json and Static Kit token files. --fix runs phpcbf on lightweight PHPCS issues; it does not repair drift (use wonderpress partial sync) and it does not edit page-template manifests or PHP.
--axe and --budget are reserved and currently skipped.
wonderpress acf install [--free] [--force]
Downloads and activates ACF from its official distribution. PRO is the default (repeaters require it); the key is read only from ACF_PRO_LICENSE in the environment. --free installs the latest free edition; --force reinstalls an edition that is already present. See Working with ACF.
wonderpress version
Print the installed CLI version.