Blueprint
Use 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.
- Skill ID
- wordpress/agent-skills/blueprint
- Publisher
- wordpress
- Repository
- agent-skills
- Installs
- 0
- Files
- 1
- Requires
- WordPress 7.0+, PHP 7.4.0+. Optionally Playground CLI or a browser
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
wordpress/agent-skills/blueprintInstalls these files- SKILL.md
What this skill tells the agent
WordPress Playground Blueprints
Overview
A Blueprint is a JSON file that declaratively configures a WordPress Playground instance — installing plugins/themes, setting options, running PHP/SQL, manipulating files, and more.
Core principle: Blueprints are trusted JSON-only declarations. No arbitrary JavaScript. They work on web, Node.js, and CLI.
Quick Start Template
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/",
"preferredVersions": { "php": "8.3", "wp": "latest" },
"steps": [{ "step": "login" }]
}Top-Level Properties
All optional. Only documented keys are allowed — the schema rejects unknown properties.
| Property | Type | Notes |
|---|---|---|
$schema | string | Always "https://playground.wordpress.net/blueprint-schema.json" |
landingPage | string | Relative path, e.g. /wp-admin/ |
description | string | Deprecated optional top-level description. Prefer meta.description for new Blueprints |
meta | object | { title, author, description?, categories? } — title and author required |
preferredVersions | object | { php, wp } — both required when present |
features | object | { networking?: boolean, intl?: boolean } — only these two keys, nothing else. Networking defaults to true |
phpExtensionBundles | any | Deprecated/no longer used; the schema leaves the value unconstrained and says to remove it from Blueprints |
extraLibraries | array | ["wp-cli"] — auto-included when any wp-cli step is present |
constants | object | Shorthand for defineWpConfigConsts. Values: string/boolean/number |
plugins | array | Shorthand for installPlugin steps. Strings = wp.org slugs |
siteOptions | object | Shorthand for setSiteOptions |
login | boolean or object | true = login as admin. Object = { username?, password? } (both default to "admin"/"password") |
steps | array | Main execution pipeline. Runs after shorthands |
preferredVersions Values
- php: Major.minor only:
"7.4","8.0","8.1","8.2","8.3","8.4","8.5", or"latest". Patch versions like"7.4.1"are invalid. Check the schema for currently supported versions. - wp: Recent major versions,
"latest","beta","nightly"/"trunk", or a URL to a custom zip. The schema also acceptsfalsefor PHP-only Playground; do not combinewp: falsewith WordPress-only fields such asplugins,siteOptions,login, or WordPress-only steps.
Shorthands vs Steps
Shorthands (login, plugins, siteOptions, constants) are expanded and prepended to steps in an unspecified order. Use explicit steps when execution order matters.
Resource References
Resources tell Playground where to find files. Used by installPlugin, installTheme, writeFile, writeFiles, importWxr, etc.
| Resource Type | Required Fields | Example |
|---|---|---|
wordpress.org/plugins | slug | { "resource": "wordpress.org/plugins", "slug": "woocommerce" } |
wordpress.org/themes | slug | { "resource": "wordpress.org/themes", "slug": "astra" } |
url | url | { "resource": "url", "url": "https://example.com/plugin.zip" } |
git:directory | url, ref | See below |
literal | name, contents | { "resource": "literal", "name": "file.txt", "contents": "hello" } |
literal:directory | name, files | See below |
bundled | path | References a file within a blueprint bundle (e.g. { "resource": "bundled", "path": "/plugin.zip" }) |
zip | inner | Wraps another resource in a ZIP — use when a step expects a zip but your source isn't one (e.g. wrapping a url resource pointing to a raw directory) |
git:directory — Installing from GitHub
{
"resource": "git:directory",
"url": "https://github.com/WordPress/gutenberg",
"ref": "trunk",
"refType": "branch",
"path": "/"
}- When using a branch or tag name for
ref, you must setrefType("branch"|"tag"|"commit"|"refname"). Without it, only"HEAD"resolves reliably. pathselects a subdirectory (defaults to repo root).
literal:directory — Inline File Trees
{
"resource": "literal:directory",
"name": "my-plugin",
"files": {
"plugin.php": "<?php /* Plugin Name: My Plugin */ ?>",
"includes": {
"helper.php": "<?php // helper code ?>"
}
}
}filesuses nested objects for subdirectories — keys are filenames or directory names, values are plain strings (file content) or objects (subdirectories). Never use resource references as values.- Do NOT use path separators in keys (e.g.
"includes/helper.php"is wrong — use a nested"includes": { "helper.php": "..." }object).
Steps Reference
Every step requires "step": "<name>". Any step can optionally include "progress": { "weight": 1, "caption": "Installing..." } for UI feedback.
Plugin & Theme Installation
{
"step": "installPlugin",
"pluginData": { "resource": "wordpress.org/plugins", "slug": "gutenberg" },
"options": { "activate": true, "targetFolderName": "gutenberg" },
"ifAlreadyInstalled": "overwrite"
}{
"step": "installTheme",
"themeData": { "resource": "wordpress.org/themes", "slug": "twentytwentyfour" },
"options": { "activate": true, "importStarterContent": true },
"ifAlreadyInstalled": "overwrite"
}- Use
pluginData/themeData— NOT the deprecatedpluginZipFile/themeZipFile. pluginData/themeDataaccept any FileReference or DirectoryReference — a zip URL, awordpress.org/pluginsslug, agit:directory, or aliteral:directory(nozipwrapper needed).options.activatecontrols activation. No need for a separateactivatePlugin/activateThemestep when usinginstallPlugin/installTheme.ifAlreadyInstalled:"overwrite"|"skip"|"error"
Activation (standalone)
Only needed for plugins/themes already on disk (e.g. after writeFile/writeFiles):
{ "step": "activatePlugin", "pluginPath": "my-plugin/my-plugin.php" }{ "step": "activateTheme", "themeFolderName": "twentytwentyfour" }File Operations
{ "step": "writeFile", "path": "/wordpress/wp-content/mu-plugins/custom.php", "data": "<?php // code" }data accepts a plain string (as shown above) or a resource reference (e.g. { "resource": "url", "url": "https://..." }).
{
"step": "writeFiles",
"writeToPath": "/wordpress/wp-content/plugins/",
"filesTree": {
"resource": "literal:directory",
"name": "my-plugin",
"files": {
"plugin.php": "<?php\n/*\nPlugin Name: My Plugin\n*/",
"includes": {
"helpers.php": "<?php // helpers"
}
}
}
}`writeFiles` requires a DirectoryReference (literal:directory or git:directory) as filesTree — not a plain object.
Other file operations: mkdir, cp, mv, rm, rmdir, unzip.
Running Code
runPHP:
{ "step": "runPHP", "code": "<?php require '/wordpress/wp-load.php'; update_option('key', 'value');" }GOTCHA: You must require '/wordpress/wp-load.php'; to use any WordPress functions.
wp-cli:
{ "step": "wp-cli", "command": "wp post create --post_type=page --post_title='Hello' --post_status=publish" }The step name is wp-cli (with hyphen), NOT cli or wpcli.
runSql:
{ "step": "runSql", "sql": { "resource": "literal", "name": "q.sql", "contents": "UPDATE wp_options SET option_value='val' WHERE option_name='key';" } }Site Configuration
{ "step": "setSiteOptions", "options": { "blogname": "My Site", "blogdescription": "A tagline" } }{ "step": "defineWpConfigConsts", "consts": { "WP_DEBUG": true } }{ "step": "setSiteLanguage", "language": "en_US" }{ "step": "defineSiteUrl", "siteUrl": "https://example.com" }More from wordpress
Use this skill in a project
Open any RiverX project, search the Skills panel for wordpress/agent-skills/blueprint, and install it in one click.
