Produces a ZIP you can load in Playground or attach to bug reports.
5) Debugging with Xdebug
Start with --xdebug (or --enable-xdebug depending on CLI release) to expose an IDE key, then connect VS Code/PhpStorm to the host/port shown in CLI output.
Combine with --auto-mount for plugin/theme debugging.
Checklist: references/debugging.md
6) Version switching
Use --wp= to pin WP (e.g., 6.9.0) and --php= to test compatibility.
If feature depends on Gutenberg trunk, prefer the latest WP release plus plugin if available; Playground images track stable WP plus bundled Gutenberg.
7) Browser-only workflows (no CLI)
Launch quick previews with URL fragments or query params:
1---2name: wp-playground3description: WordPress Playground4---5# WordPress Playground67## When to use89- Spin up a disposable WordPress to test a plugin/theme without full stack setup.10- Run or iterate on Playground Blueprints (JSON) locally.11- Build a reproducible snapshot of a site for sharing or CI.12- Switch WP/PHP versions quickly to reproduce issues.13- Debug plugin/theme code with Xdebug in an isolated Playground.1415## Inputs required1617- Host machine readiness: Node.js ≥ 20.18, `npm`/`npx` available.18- Project path to mount (`--auto-mount` or explicit mount mapping).19- Desired WP version/PHP version (optional; defaults to latest WP, PHP 8.3).20- Blueprint location/URL if running a blueprint.21- Port preference if 9400 conflicts.22- Whether Xdebug is needed.2324## Procedure2526### 0) Guardrails2728- Playground instances are ephemeral and SQLite-backed; **never** point at production data.29- Confirm Node ≥ 20.18 (`node -v`) before running CLI.30- If mounting local code, ensure it is clean of secrets; Playground copies files into an in-memory FS.3132### 1) Quick local spin-up (auto-mount)3334```bash35cd <plugin-or-theme-root>36npx @wp-playground/cli@latest server --auto-mount37```38- Opens on http://localhost:9400 by default. Auto-detects plugin/theme and installs it.39- Add `--wp=<version>` / `--php=<version>` as needed.40- For classic full installs already present, add `--skip-wordpress-setup` and mount the whole tree.4142### 2) Manual mounts or multiple mounts4344- Use `--mount=/host/path:/vfs/path` (repeatable) when auto-mount is insufficient (multi-plugin, mu-plugins, custom content).45- Mount before install with `--mount-before-install` for bootstrapping installer flows.46- Reference: `references/cli-commands.md`4748### 3) Run a Blueprint (no server needed)4950```bash51npx @wp-playground/cli@latest run-blueprint --blueprint=<file-or-url>52```53- Use for scripted setup/CI validation. Supports remote URLs and local files.54- Allow bundled assets in local blueprints with `--blueprint-may-read-adjacent-files` when required.55- See `references/blueprints.md` for structure and common flags.5657### 4) Build a snapshot for sharing5859```bash60npx @wp-playground/cli@latest build-snapshot --blueprint=<file> --outfile=./site.zip61```62- Produces a ZIP you can load in Playground or attach to bug reports.6364### 5) Debugging with Xdebug6566- Start with `--xdebug` (or `--enable-xdebug` depending on CLI release) to expose an IDE key, then connect VS Code/PhpStorm to the host/port shown in CLI output.67- Combine with `--auto-mount` for plugin/theme debugging.68- Checklist: `references/debugging.md`6970### 6) Version switching7172- Use `--wp=` to pin WP (e.g., 6.9.0) and `--php=` to test compatibility.73- If feature depends on Gutenberg trunk, prefer the latest WP release plus plugin if available; Playground images track stable WP plus bundled Gutenberg.7475### 7) Browser-only workflows (no CLI)7677- Launch quick previews with URL fragments or query params:78 - Fragment: `https://playground.wordpress.net/#<base64-or-json-blueprint>`79 - Query: `https://playground.wordpress.net/?blueprint-url=<public-url-or-zip>`80- Use the live Blueprint Editor (playground.wordpress.net) to author blueprints with schema help; paste JSON and copy a shareable link.8182## Verification8384- Verify mounted code is active (plugin listed/active; theme selected).85- For blueprints/snapshots, re-run with `--verbosity=debug` to confirm steps executed.86- Run targeted smoke (e.g., `wp plugin list` inside Playground shell via browser terminal if exposed) or UI click-path.8788## Failure modes / debugging8990- **CLI exits complaining about Node**: upgrade to ≥ 20.18.91- **Mount not applied**: check path, use absolute path, add `--verbosity=debug`.92- **Blueprint cannot read local assets**: add `--blueprint-may-read-adjacent-files`.93- **Port already used**: `--port=<free-port>`.94- **Slow/locked UI**: disable `--experimental-multi-worker` if enabled; or enable it to improve throughput on CPU-bound runs.9596## Escalation9798- If PHP extensions or native DB access are required, Playground may be unsuitable; fall back to full WP stack or wp-env/Docker.99- For browser-only embedding or VS Code extension specifics, consult the upstream docs: https://wordpress.github.io/wordpress-playground/
Run npx skillmds@latest add comeonoliver/wp-playground in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
WordPress Playground It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ComeOnOliver (@comeonoliver) published this skill. Their other Agent Skills are listed on their SkillMD profile.