Local development environments for WordPress.org projects, powered by wp-env.
From the environments/ directory:
npm installA local instance of the WordPress.org Plugin Directory with the plugin directory plugin, theme, and supporting mu-plugins.
Start:
npm run plugins:env startImport a plugin by slug:
npm run plugins:import -- akismetRe-seed plugins (clears import flag, then re-imports):
npm run plugins:refreshAccess: http://localhost:8888
WP CLI:
npx wp-env run cli wp <command>Run tests:
npm run plugins:testA local instance of jobs.wordpress.net with the JobsWP plugin, theme, sample job categories, and sample job posts.
Start:
npm run jobs:env startAccess: http://localhost:8888
WP CLI:
npm run jobs:env -- run cli -- wp <command>A local instance of browsehappy.com with the theme.
Start:
npm run browsehappy:env startAccess: http://localhost:8888
A local instance of translate.wordpress.org with GlotPress, the wporg-gp-* plugins active on production, and the pub/wporg theme.
Start:
npm run translate:env startFirst start auto-imports hello-dolly (plugin) and twentytwenty (theme) so the WordPress Plugins and WordPress Themes project containers have real fixtures.
Access: http://localhost:8888
Import a plugin or theme's translations on demand:
npm run translate:import -- plugin akismet
npm run translate:import -- theme twentytwentyfourRe-seed (clears the seed flag so the next start re-imports fixtures):
npm run translate:refreshWP CLI:
npm run translate:env -- run cli -- wp <command>Local overrides: create translate/.wp-env.override.json (git-ignored) to override config values like WP_HOME / WP_SITEURL for testing behind a custom hostname.
The Handbook plugin has its own .wp-env.json in wordpress.org/public_html/wp-content/plugins/handbook/.
Start:
cd wordpress.org/public_html/wp-content/plugins/handbook
npx wp-env startRun tests:
npx wp-env run phpunit phpunit -c /var/www/html/wp-content/plugins/handbook/phpunit.xml# Stop an environment (replace plugins with jobs, etc.)
npm run plugins:env stop
npm run jobs:env stop
# Destroy an environment (removes all data)
npm run plugins:env destroy
npm run jobs:env destroy
# View logs
npm run plugins:env logs
npm run jobs:env logsAll commands should be run from the environments/ directory unless otherwise noted.