Wp Playground
WordPressOfficialPublished by WordPress
- Skill
- Tool integration
- Software development
- GPL-2.0-or-later
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
WordPress Playground is a routing skill designed to help developers select the appropriate workflow for their WordPress environment needs. It acts as a central hub for managing WordPress instances running in WebAssembly with SQLite. Whether you are performing local development via the CLI, debugging with Xdebug, or configuring browser-based shareable links, this skill directs you to the correct reference material while ensuring that specialized tasks like Blueprint JSON authoring are handled by the dedicated blueprint skill.
What it does
- Routes users to the correct Playground workflow based on their specific development needs.
- Provides guidance for local CLI operations including server management and file mounting.
- Facilitates debugging sessions using Xdebug and runtime log inspection.
- Supports version switching for both WordPress and PHP to test compatibility.
- Assists in creating snapshots for shareable reproduction cases and CI artifacts.
- Integrates with browser-based Playground website workflows for quick site previews.
When to use it
- When you need to set up a local WordPress environment for plugin or theme development.
- When you need to reproduce a bug using specific WordPress or PHP versions.
- When you need to debug a WordPress instance running in a WebAssembly environment.
- When you need to create a shareable link or snapshot of a WordPress site configuration.
- When you are unsure which specific Playground tool or reference to use for a task.
Advantages
- Provides a unified interface for diverse Playground tasks.
- Ensures consistent handling of disposable, SQLite-backed WordPress environments.
- Simplifies complex tasks like local file mounting and version pinning.
- Prevents configuration errors by routing specialized tasks to dedicated skills.
- Enables efficient debugging of WebAssembly-based WordPress instances.
Usage examples
- “How do I start a local WordPress server for my plugin development?”
- The agent will guide you to use the CLI start command, ensuring your plugin is correctly mounted and the environment is persisted.
- “I need to debug a site running in Playground with Xdebug.”
- The agent will provide instructions on using the --xdebug flag with the CLI and configuring your IDE path mappings.
- “How can I test my theme against WordPress 6.5 and PHP 8.2?”
- The agent will show you how to use the server command with explicit --wp and --php version flags.
- “Create a snapshot of my current site for a bug report.”
- The agent will walk you through the build-snapshot command to generate a shareable ZIP file of your current site state.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wordpress/wp-playground/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip wp-playground.zip -d .agents/skills
Documentation by WordPress
WordPress Playground
This is a thin routing wrapper. Use it to pick the right Playground workflow, then load only the focused reference or skill needed for the task.
Procedure
Identify the user intent: Blueprint authoring/review, local CLI execution, browser-only website/share link workflow, Xdebug/stuck CLI run, or a mixed Playground request.
Route to the focused source below, loading more than one only when the request has multiple distinct parts.
For mixed requests, delegate Blueprint JSON work to
blueprint, then return here for runtime, CLI, debugging, or sharing guidance.
Blueprint JSON, schema, steps, resources, bundles, or Blueprint review: use the
blueprintskill directly. Do not duplicate Blueprint schema details here.Local CLI execution: read
references/cli.mdfor@wp-playground/cliserver,run-blueprint,build-snapshot, mounts, version switching, and local validation.Xdebug or stuck CLI runs: read
references/debugging.mdfor Xdebug, runtime logs, worker flags, and stuck CLI runs.Browser-only Playground website workflows: read
references/website.mdfor Query API and Blueprint URL setup, share links, and browser limitations. It routes existing-site operations to separate WebMCP, Playground MCP, and Sites API references; load only the selected method. Unless the user requests a specific connection method, prefer available WebMCP tools for supported browser operations.
Inputs required
The intended workflow: Blueprint authoring, local CLI run, website/share link, snapshot, or debugging.
Project or bundle path if local code must be mounted or packaged.
Desired WordPress/PHP versions if compatibility matters.
Port preference if a local server is needed.
Whether browser-only sharing or local filesystem access is required.
Guardrails
Playground instances are disposable, SQLite-backed environments; never point them at production data.
Keep Blueprint JSON guidance in
blueprintso the schema and examples have one source of truth.For local CLI work, verify Node.js 20.18+ and
npm/npxbefore running commands.Browser-only Playground cannot read local filesystem paths; use public URLs, hosted ZIP bundles, or inline Blueprint JSON.
Verification
For Blueprint content, validate against the published schema and follow the
blueprintskill verification.For local CLI runs, verify the mounted plugin/theme or Blueprint side effects in the Playground instance.
For share links, open the generated URL and confirm the expected landing page and installed assets load.
Failure modes
Blueprint work routed here: stop and use the
blueprintskill for schema keys, steps, resources, bundles, validation, or Blueprint review.Local filesystem needed in a browser-only workflow: use
references/cli.md;playground.wordpress.netcannot read local filesystem paths.Shareable browser link requested from a local CLI workflow: use
references/website.md; local server URLs are not portable share links.Debugging treated as a second-hop reference: read
references/debugging.mddirectly for Xdebug, logs, worker flags, and stuck CLI runs.
Escalation
If the task needs PHP extensions, native database access, persistence, or production-like infrastructure that Playground cannot provide, use a full WordPress stack such as wp-env, Docker, or the project-provided environment.
Files
- ATTRIBUTION.mdAdded by AutoGineer890 B
- LICENSELicence file added by AutoGineer750 B
- SKILL.md3.8 KiB
- references/cli.md4.5 KiB
- references/debugging.md975 B
- references/mcp.md1.5 KiB
- references/sites-api.md5.1 KiB
- references/webmcp.md2.3 KiB
- references/website.md6.3 KiB
references/sites-api.md
Sites API and active site client
Use this reference for browser JavaScript operations on the Playground website when selected by the interaction router.
window.playgroundSitesmanages saved browser sites and the active site selection.window.playgroundis thePlaygroundClientfor the active WordPress runtime;playgroundSites.getClient()returns that client after the site is ready.
Manage browser sites with window.playgroundSites
Use window.playgroundSites on the top-level https://playground.wordpress.net/ page. It is not available immediately during page load, so wait for the global and then call isReady() before site-manager work.
while (!window.playgroundSites) {
await new Promise((resolve) => setTimeout(resolve, 50));
}
await window.playgroundSites.isReady();Available site-manager operations:
list(): inspect known sites, active site, names, slugs, and storage types.createNewTemporarySite(slug?, settings?): create and switch to a fresh in-memory site. Settings usephpVersion,wpVersion,networking,language, andmultisite.setActiveSite(slug): switch to an existing site and wait for it to boot.isReady(): wait until the active site and its client are ready.getClient(): get the active site'sPlaygroundClient.saveInBrowser(name?): persist the active site to OPFS browser storage.saveToLocalFileSystem(name?, handle?): persist the active site to a user-selected local directory when the browser supports it.rename(newName): rename the active saved site.setPhpVersion(version): change PHP version and reboot the active saved site.setNetworking(enabled): toggle outbound networking and reboot the active saved site.delete(slug): delete a saved site when the user explicitly asked for deletion.
Storage behavior:
temporary: in memory only; resets on reload.opfs: saved in browser storage forplayground.wordpress.net; survives reloads.local-fs: saved to a user-selected local directory; Chromium/File System Access API only.
Important constraints:
createNewTemporarySite()accepts only version/site boot settings:phpVersion,wpVersion,networking,language, andmultisite. The JS names arephpVersionandwpVersion, notphpandwp.It does not install plugins/themes or run Blueprints; use a URL/Blueprint workflow for that.
saveInBrowser()andsaveToLocalFileSystem()are safe on already-saved sites.rename(),setPhpVersion(), andsetNetworking()operate on the active saved site. Switch withsetActiveSite(slug)first when targeting a specific site. Save a temporary site first.delete(slug)deletes a saved site's persisted data; do not call it unless the user asked for deletion.
Interact with the active WordPress site
Use the active PlaygroundClient after the site is booted. If the user says window.palyground, treat it as a typo for window.playground.
await window.playgroundSites?.isReady();
const client = window.playgroundSites?.getClient() || window.playground;
await client.isReady();Available active-site operations:
File inspection:
listFiles,readFileAsText,readFileAsBuffer,fileExists,isFile,isDir,isSymlink,readlink, andrealpathin the/wordpressvirtual filesystem.File mutation:
mkdir,mkdirTree,writeFile,mv,cp,chmod,symlink,unlink,rmdir, andunzip.mvmoves or renames files. unlink deletes files, whileplaygroundSites.delete(slug)deletes a saved site.rmdiris for empty directories.PHP execution: run PHP snippets with
run({ code }); inspect the returned output/status/error fields. Require/wordpress/wp-load.phpbefore using WordPress APIs such aswp_insert_post,get_option,get_stylesheet, orwp_get_theme.Web requests: call WordPress routes with
request({ path, method, headers, body })and inspect status/body. Use it for admin pages such as/wp-admin/and REST routes such as/wp-json/wp/v2/posts; remember admin/nonce behavior depends on login state.Browser navigation: send the visible Playground frame to a WordPress path with
goTo(path).State checks: verify installed/active plugins and themes through WordPress PHP APIs or filesystem checks before claiming setup succeeded.
MU plugins: write files under
/wordpress/wp-content/mu-plugins/, then request or navigate to a WordPress route to force loading.
Keep the distinction clear:
playgroundSitesmanages site records and persistence.window.playground/getClient()manipulates the active WordPress runtime.Query API /
blueprint-urlsets up a site at page load.
Verification
Before changes, inspect
window.playgroundSites.list()to confirm the intended active site.After site-manager operations, verify
window.playgroundSites.list()shows the expected active site and storage type.For client operations, run a harmless read first, such as
await client.listFiles('/wordpress'), before writing files or changing state. Verify the requested state after the operation.After switching sites or rebooting, wait for readiness and reacquire the active client before further operations.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
The author says: Targets WordPress 7.0+, PHP 7.4.0+. Playground CLI requires Node.js 20.18+; runs WordPress in WebAssembly with SQLite.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- WordPress
- Publisher
- WordPress (Official)
- Source
- WordPress/agent-skills · skills/wp-playground · commit 7374e6f
- Licence
- GNU General Public License v2.0 or later (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by WordPress.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download wp-playground.zip