wordpress.org/environments
2026-04-14 02:44:43 +00:00
..
jobs Jobs: Sync FAQ from production, style list elements 2026-04-14 02:44:43 +00:00
mocks/mu-plugins Plugin Directory: Local Environment: Use less mounts in the local environment, to workaround a Docker Desktop bug that causes file mounts to be silently discarded. 2026-04-07 05:15:48 +00:00
plugin-directory Improve PHPUnit test infrastructure for the Plugin Directory. 2026-04-13 17:39:15 +00:00
.nvmrc Plugin Directory: Introduce a local development option for the plugin directory. 2026-03-16 05:00:45 +00:00
package-lock.json Plugin Directory: Introduce a local development option for the plugin directory. 2026-03-16 05:00:45 +00:00
package.json Improve PHPUnit test infrastructure for the Plugin Directory. 2026-04-13 17:39:15 +00:00
README.md Improve PHPUnit test infrastructure for the Plugin Directory. 2026-04-13 17:39:15 +00:00

WordPress.org Local Development Environments

Local development environments for WordPress.org projects, powered by wp-env.

Prerequisites

Setup

From the environments/ directory:

npm install

Available Environments

Plugin Directory

A local instance of the WordPress.org Plugin Directory with the plugin directory plugin, theme, and supporting mu-plugins.

Start:

npm run plugins:env start

Import a plugin by slug:

npm run plugins:import -- akismet

Re-seed plugins (clears import flag, then re-imports):

npm run plugins:refresh

Access: http://localhost:8888

WP CLI:

npx wp-env run cli wp <command>

Run tests:

npm run plugins:test

Jobs

A local instance of jobs.wordpress.net with the JobsWP plugin, theme, sample job categories, and sample job posts.

Start:

npm run jobs:env start

Access: http://localhost:8888

WP CLI:

npm run jobs:env -- run cli -- wp <command>

Handbook (in-plugin)

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 start

Run tests:

npx wp-env run phpunit phpunit -c /var/www/html/wp-content/plugins/handbook/phpunit.xml

Common Commands

# 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 logs

All commands should be run from the environments/ directory unless otherwise noted.