wp-env / Docker
For a disposable, reproducible WordPress, use @wordpress/env
(Docker). The repo already ships a wp-env.json mapping the theme and plugins.
Prerequisites
Section titled “Prerequisites”- Docker Desktop running
npm installdone at the repo root (@wordpress/envis a dev dependency)
Start / stop
Section titled “Start / stop”npm run env:start # boots WordPress at http://localhost:8888 (admin/password)npm run env:stopwp-env mounts the mapped plugins/theme from wp-env.json, so your source edits are live
in the container.
Build assets + run WP-CLI
Section titled “Build assets + run WP-CLI”npm run build # compile blocks (SCSS + JS)npx wp-env run cli wp plugin list # WP-CLI inside the container