/wordpress-skills:wp-envfrom wordpress-skills
Sets up, configures, and troubleshoots local WordPress development environments using @wordpress/env (wp-env). Guides through Docker-based setup, wp-env.json configuration, and common commands.
Ships in wordpress-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Zero-config, Docker-based local WordPress development environment for plugins, themes, and core.
.wp-env.json filewp-env, @wordpress/env, or Docker-based WordPress developmentwp-env or wp-playground? For a quick local WordPress, prefer the wp-playground skill by default — it's faster, disposable, and needs no Docker. Use wp-env when the task actually requires it:
.wp-env.jsonwp db commands, data that survives restarts)wp-env run)wp-env can also run without Docker by using Playground as its runtime (npx @wordpress/env start --runtime=playground, experimental). That is still wp-env, driven by the same .wp-env.json, so treat it as a Docker-free fallback for a project that already carries wp-env config, not as a third option. It swaps MySQL for SQLite and drops wp-env run and the separate tests environment, which are most of the reasons to pick wp-env in the first place. For a quick Docker-free WordPress with no wp-env config, use the wp-playground skill directly.
docker infonode -v.wp-env.json, plugin headers, or style.css theme headers).wp-env.json and .wp-env.override.json if present# Global (recommended)
npm -g install @wordpress/env
# Or project-local
npm i @wordpress/env --save-dev
# Then use: npx wp-env start
wp-env start
Default credentials:
adminpasswordCommon start options:
wp-env start --update -- pull latest sources and reconfigurewp-env start --xdebug -- enable Xdebug (debug mode)wp-env start --xdebug=profile,trace -- multiple Xdebug modeswp-env start --auto-port -- find available ports when defaults are busyWhen no .wp-env.json exists, wp-env scans the current directory:
| Detected type | How detected | Auto-config |
|---|---|---|
| Plugin | Plugin Name: header in a root .php file | { "plugins": ["."] } |
| Theme | Theme Name: header in style.css | { "themes": ["."] } |
| Core | wp-includes/version.php exists | { "core": "." } |
.wp-env.jsonPlace at the project root. All fields are optional.
{
"core": null,
"phpVersion": "8.1",
"plugins": [
".",
"https://downloads.wordpress.org/plugin/akismet.zip",
"WordPress/classic-editor"
],
"themes": [],
"port": 8888,
"multisite": false,
"phpmyadmin": false,
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true
},
"mappings": {
"wp-content/mu-plugins": "./mu-plugins"
},
"lifecycleScripts": {
"afterStart": "wp-env run cli wp rewrite structure /%postname%/"
}
}
core, plugins, themes, mappings)| Format | Example |
|---|---|
| Local path | ".", "./path", "../path" |
| GitHub shorthand | "WordPress/classic-editor", "owner/repo#branch" |
| ZIP URL | "https://downloads.wordpress.org/plugin/akismet.zip" |
| Git SSH | "ssh://user@host/repo.git#ref" |
GOTCHA: WordPress.org plugin/theme slugs (bare names like "akismet") do NOT work. Use the full ZIP URL.
.wp-env.override.jsonCreate .wp-env.override.json next to .wp-env.json for personal settings (gitignored). Only config and mappings are merged -- all other fields (including plugins and themes arrays) fully replace the base.
# WP-CLI commands
wp-env run cli wp user list
wp-env run cli wp plugin list
wp-env run cli wp option update blogname "My Site"
wp-env run cli "wp rewrite structure /%postname%/"
# Run commands in a specific directory
wp-env run cli --env-cwd=wp-content/plugins/my-plugin composer install
# PHPUnit tests
wp-env run cli --env-cwd=wp-content/plugins/my-plugin vendor/bin/phpunit
# Pass flags with -- separator
wp-env run cli php -- --version
# MySQL access
wp-env run mysql mysql -- --user=root --password=password wordpress
Available containers: mysql, wordpress, cli, composer, phpmyadmin.
wp-env stop # Stop and free ports
wp-env reset development # Reset dev database (keeps test)
wp-env reset all # Reset all databases
wp-env logs # Stream PHP/Docker logs
wp-env logs --no-watch # Print logs and exit
wp-env status # Show URLs, ports, config
wp-env status --json # Machine-readable status
wp-env cleanup # Remove containers/volumes (keep images)
wp-env destroy # Remove everything including images
wp-env start --xdebug # Enable debug mode
wp-env start --xdebug=coverage # For code coverage
wp-env start # Disable Xdebug (restart without flag)
Modes: debug, profile, trace, develop, coverage.
IDE listens on port 9003. VS Code launch.json needs:
{
"type": "php",
"request": "launch",
"name": "Listen for Xdebug",
"port": 9003,
"pathMappings": {
"/var/www/html/wp-content/plugins/your-plugin": "${workspaceFolder}"
}
}
{ "multisite": true, "plugins": ["."] }
wp-env status shows running containers with correct portshttp://localhost:8888/wp-admin/ loads the WordPress adminwp-env run cli wp plugin list shows expected pluginswp-env reset development| Symptom | Cause | Fix |
|---|---|---|
| "Cannot connect to Docker daemon" | Docker not running | Start Docker Desktop |
| "Port 8888 already in use" | Port conflict | Use --auto-port or set custom port in .wp-env.json |
| Plugin not appearing | Missing Plugin Name: header in main PHP file | Add standard plugin header comment |
| "Could not find a valid source" | Invalid source string in config | Use full ZIP URL for wp.org plugins, not bare slugs |
| Stale environment after source changes | Cached Docker volumes | wp-env start --update or wp-env destroy && wp-env start |
| White screen / PHP errors | Corrupted database | wp-env reset all && wp-env start |
| Override not taking effect | Wrong merge behavior | plugins/themes in override replace base arrays; only config/mappings merge |
| Tests environment not accessible | Wrong port | Test environment runs on port 8889 by default |
| Xdebug not connecting | IDE not listening or wrong port | Ensure IDE listens on port 9003 with correct pathMappings |
| npm global install permission error | Node installed to a system path | Use nvm, or install locally: npm i -D @wordpress/env and run via npx wp-env |
--runtime=playground) is experimental and has limited feature parityWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sugarfunk/skills-marketplace --plugin wordpress-skills19 skills in this plugin
/blueprintUse when the deliverable is WordPress Playground Blueprint JSON or a Blueprint bundle, including creating, editing, reviewing, validating schema keys, choosing steps/resources, and debugging Blueprint files. For only running or sharing a Playground environment, use wp-playground./wordpress-routerUse when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly classify the repo and route to the correct workflow/skill (blocks, theme.json, REST API, WP-CLI, performance, security, testing, release packaging)./wp-abilities-apiUse when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients./wp-abilities-auditAudit a WordPress plugin's REST surface and produce a standardized audit document proposing Abilities API registrations. Produces a markdown doc with a YAML schema and prose sections that humans and agents can both consume when planning a registration rollout. Works on any WP plugin./wp-abilities-verifyVerify a WordPress plugin's Abilities API registrations: enumerate abilities, check that callback behavior matches each annotation's claim (the adversarial readonly-but-writes detection), validate permissions and schemas, and validate audit documents produced by wp-abilities-audit./wp-block-developmentUse when developing WordPress (Gutenberg) blocks: block.json metadata, register_block_type(_from_metadata), attributes/serialization, supports, dynamic rendering (render.php/render_callback), deprecations/migrations, viewScript vs viewScriptModule, and @wordpress/scripts/@wordpress/create-block build and test workflows.5 plugins ship this exact skill · first indexed Sep 24, 2026
Other plugins' skills for the same job