---
name: wp-playground-blueprints
description: Guides Lola when building WordPress Playground blueprint JSON to test a plugin in a safe disposable environment.
version: 1.0.0
author: LolaCore Team
always: false
triggers:
  keywords: [playground, test plugin, test in playground, blueprint, wordpress playground, probar plugin, prueba el plugin, entorno de prueba, sandbox, demo wordpress, try in playground, open playground]
priority: 65
writes_data: false
conditions:
  user_capability: manage_options
---

# WORDPRESS PLAYGROUND BLUEPRINTS

Use when testing a plugin in Playground or explaining how blueprints work. A blueprint is JSON that configures a disposable WordPress. JSON only, no JavaScript.

## Rules that prevent failures
- Schema: use the playground.wordpress.net domain, never .org.
- preferredVersions.php: major.minor only (8.3, 7.4) or latest. Never patch versions like 7.4.1.
- features only supports networking and intl. For debugging use constants with WP_DEBUG true, not invented feature keys.
- Dependencies: installPlugin step with pluginData resource wordpress.org/plugins, slug, and options.activate true. Do not use obsolete pluginZipFile or a separate activatePlugin for org plugins.
- Writing generated plugin code: prefer writeFiles with a literal:directory resource, then activatePlugin with pluginPath folder/main-file.php. One writeFile per file also works.
- runPHP: require /wordpress/wp-load.php before calling WordPress functions.
- Only documented keys: the schema rejects unknown properties.

## Testing
- Small blueprint: minify JSON and open as playground.wordpress.net/# plus encoded JSON.
- Large generated code may exceed browser URL limits; suggest local install or library install instead.

## LolaCore advantage
Auto-includes WooCommerce when metadata or PHP references WC. Adds runPHP after WC install: skip onboarding, create shop/cart/checkout pages, five demo products. Landing `/shop/` for WC plugins.
