Title: Blueprints Examples
Published: July 15, 2026
Last modified: July 16, 2026

---

# Blueprints Examples

## In this article

 * [Install a Theme and a Plugin](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#install-a-theme-and-a-plugin)
 * [The meta object](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#the-meta-object)
    - [Properties](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#properties)
 * [Run custom PHP code](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#run-custom-php-code)
 * [Run Symfony without WordPress](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#run-symfony-without-wordpress)
 * [Enable an option on the Gutenberg Experiments page](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#enable-an-option-on-the-gutenberg-experiments-page)
 * [How to work with WP-CLI from the terminal and Playground](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#how-to-work-with-wp-cli-from-the-terminal-and-playground)
 * [Showcase a product demo](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#showcase-a-product-demo)
 * [Enable networking](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#enable-networking)
 * [Load PHP code on every request (mu-plugin)](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#load-php-code-on-every-request-mu-plugin)
 * [Code editor (as a Gutenberg block)](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#code-editor-as-a-gutenberg-block)
 * [Load an older WordPress version](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#load-an-older-wordpress-version)
 * [Run WordPress from trunk or a specific commit.](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#run-wordpress-from-trunk-or-a-specific-commit)
 * [Using Blueprint Bundles](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#using-blueprint-bundles)

[ Back to top](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#wp--skip-link--target)

Check the [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md)
to explore real-world code examples of using WordPress Playground to launch a WordPress
site with a variety of setups.

Let’s see some cool things you can do with Blueprints.

## 󠀁[Install a Theme and a Plugin](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#install-a-theme-and-a-plugin)󠁿

    ```language-json
    {
        "steps": [
            {
                "step": "installPlugin",
                "pluginData": {
                    "resource": "wordpress.org/plugins",
                    "slug": "coblocks"
                }
            },
            {
                "step": "installTheme",
                "themeData": {
                    "resource": "wordpress.org/themes",
                    "slug": "pendant"
                }
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJzdGVwcyI6W3sic3RlcCI6Imluc3RhbGxQbHVnaW4iLCJwbHVnaW5EYXRhIjp7InJlc291cmNlIjoid29yZHByZXNzLm9yZy9wbHVnaW5zIiwic2x1ZyI6ImNvYmxvY2tzIn19LHsic3RlcCI6Imluc3RhbGxUaGVtZSIsInRoZW1lRGF0YSI6eyJyZXNvdXJjZSI6IndvcmRwcmVzcy5vcmcvdGhlbWVzIiwic2x1ZyI6InBlbmRhbnQifX1dfQ==)

## 󠀁[The meta object](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#the-meta-object)󠁿

The optional `meta` object provides descriptive information about your Blueprint.
While it doesn’t affect how the Blueprint executes, this information is crucial 
for display purposes in galleries, Blueprint selectors, and integrated tools like
[WordPress Studio](https://developer.wordpress.com/studio/) and [Blueprints Gallery](https://wordpress.github.io/blueprints/).

### 󠀁[Properties](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#properties)󠁿

  |  Field |  Type |  Description |  
   |  **`title`** |  `string` |  A short, human-readable name for the Blueprint. |  
 |  **`description`** |  `string` |  A brief summary explaining the setup. |  
 |  **`author`** |  `string` |  The name or handle of the creator. |  
 |  **`categories`** |  `array<string>` |  Tags used for filtering and grouping Blueprints. |

    ```language-json
    {
        "$schema": "https://playground.wordpress.net/blueprint-schema.json",
        "meta": {
            "title": "Default Playground Setup",
            "description": "A basic setup for a new WordPress site with the latest versions.",
            "author": "Playground Team",
            "categories": ["starter", "default"]
        },
        "landingPage": "/wp-admin/",
        "preferredVersions": {
            "php": "8.3",
            "wp": "latest"
        }
    }
    ```

## 󠀁[Run custom PHP code](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#run-custom-php-code)󠁿

    ```language-json
    {
        "steps": [
            {
                "step": "runPHP",
                "code": "<?php require_once '/wordpress/wp-load.php'; wp_insert_post(array( 'post_title' => 'Post title', 'post_content' => 'Post content', 'post_status' => 'publish', 'post_author' => 1 )); "
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJzdGVwcyI6W3sic3RlcCI6InJ1blBIUCIsImNvZGUiOiI8P3BocCByZXF1aXJlX29uY2UgJy93b3JkcHJlc3Mvd3AtbG9hZC5waHAnOyB3cF9pbnNlcnRfcG9zdChhcnJheSggJ3Bvc3RfdGl0bGUnID0+ICdQb3N0IHRpdGxlJywgJ3Bvc3RfY29udGVudCcgPT4gJ1Bvc3QgY29udGVudCcsICdwb3N0X3N0YXR1cycgPT4gJ3B1Ymxpc2gnLCAncG9zdF9hdXRob3InID0+IDEgKSk7ICJ9XX0=)

## 󠀁[Run Symfony without WordPress](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#run-symfony-without-wordpress)󠁿

Blueprints can also skip the WordPress download and boot a standalone PHP app.
 
This example loads a bundled Symfony app with Composer dependencies already installed,
so it starts without cloning a Git repository or running a Node/Sass build in the
browser.

The app demonstrates Symfony attribute routes, autowired services, Twig, and
 HttpClient.
Its landing page also explains where to open the Playground file browser and Blueprint
viewer.

## 󠀁[Enable an option on the Gutenberg Experiments page](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#enable-an-option-on-the-gutenberg-experiments-page)󠁿

Here: Switch on the “new admin views” feature.

    ```language-json
    {
        "steps": [
            {
                "step": "runPHP",
                "code": "<?php require '/wordpress/wp-load.php'; update_option( 'gutenberg-experiments', array( 'gutenberg-dataviews' => true ) );"
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJzdGVwcyI6W3sic3RlcCI6InJ1blBIUCIsImNvZGUiOiI8P3BocCByZXF1aXJlICcvd29yZHByZXNzL3dwLWxvYWQucGhwJzsgdXBkYXRlX29wdGlvbiggJ2d1dGVuYmVyZy1leHBlcmltZW50cycsIGFycmF5KCAnZ3V0ZW5iZXJnLWRhdGF2aWV3cycgPT4gdHJ1ZSApICk7In1dfQ==)

## 󠀁[How to work with WP-CLI from the terminal and Playground](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#how-to-work-with-wp-cli-from-the-terminal-and-playground)󠁿

You can run WP-CLI commands on a Playground instance either from your terminal or
directly within a Blueprint.

To use your terminal, you must first mount the `/wordpress/` directory and ensure
the SQLite database integration is configured. This is because Playground’s internal
database doesn’t persist on a mounted site, so you must explicitly install the database
plugin via a Blueprint. This allows WP-CLI to recognize the WordPress installation
and connect to its database.

If you run WP-CLI commands as steps within your Blueprint file, this manual setup
is not needed.

The following Blueprint snippet handles this setup:

    ```language-json
    {
        "plugins": [
            "sqlite-database-integration"
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJwbHVnaW5zIjpbInNxbGl0ZS1kYXRhYmFzZS1pbnRlZ3JhdGlvbiJdfQ==)

For a detailed explanation of why this is needed, refer to the [Troubleshoot and Debug Blueprints](https://developer.wordpress.org/playground/blueprints/troubleshoot-and-debug#wp-cli-error-establishing-a-database-connection-on-mounted-sites)
section.

## 󠀁[Showcase a product demo](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#showcase-a-product-demo)󠁿

    ```language-json
    {
        "steps": [
            {
                "step": "installPlugin",
                "pluginData": {
                    "resource": "url",
                    "url": "https://your-site.com/your-plugin.zip"
                }
            },
            {
                "step": "installTheme",
                "themeData": {
                    "resource": "url",
                    "url": "https://your-site.com/your-theme.zip"
                }
            },
            {
                "step": "importWxr",
                "file": {
                    "resource": "url",
                    "url": "https://your-site.com/starter-content.wxr"
                }
            },
            {
                "step": "setSiteOptions",
                "options": {
                    "some_required_option_1": "your_favorite_values",
                    "some_required_option_2": "your_favorite_values"
                }
            }
        ]
    }
    ```

## 󠀁[Enable networking](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#enable-networking)󠁿

    ```language-json
    {
        "landingPage": "/wp-admin/plugin-install.php",
        "features": {
            "networking": true
        },
        "steps": [
            {
                "step": "login"
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJsYW5kaW5nUGFnZSI6Ii93cC1hZG1pbi9wbHVnaW4taW5zdGFsbC5waHAiLCJmZWF0dXJlcyI6eyJuZXR3b3JraW5nIjp0cnVlfSwic3RlcHMiOlt7InN0ZXAiOiJsb2dpbiJ9XX0=)

## 󠀁[Load PHP code on every request (mu-plugin)](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#load-php-code-on-every-request-mu-plugin)󠁿

Use the `writeFile` step to add code to a mu-plugin that runs on every request.

    ```language-json
    {
        "landingPage": "/category/uncategorized/",
        "features": {
            "networking": true
        },
        "steps": [
            {
                "step": "login"
            },
            {
                "step": "writeFile",
                "path": "/wordpress/wp-content/mu-plugins/rewrite.php",
                "data": "<?php add_action( 'after_setup_theme', function() { global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } );"
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJsYW5kaW5nUGFnZSI6Ii9jYXRlZ29yeS91bmNhdGVnb3JpemVkLyIsImZlYXR1cmVzIjp7Im5ldHdvcmtpbmciOnRydWV9LCJzdGVwcyI6W3sic3RlcCI6ImxvZ2luIn0seyJzdGVwIjoid3JpdGVGaWxlIiwicGF0aCI6Ii93b3JkcHJlc3Mvd3AtY29udGVudC9tdS1wbHVnaW5zL3Jld3JpdGUucGhwIiwiZGF0YSI6Ijw/cGhwIGFkZF9hY3Rpb24oICdhZnRlcl9zZXR1cF90aGVtZScsIGZ1bmN0aW9uKCkgeyBnbG9iYWwgJHdwX3Jld3JpdGU7ICR3cF9yZXdyaXRlLT5zZXRfcGVybWFsaW5rX3N0cnVjdHVyZSgnLyVwb3N0bmFtZSUvJyk7ICR3cF9yZXdyaXRlLT5mbHVzaF9ydWxlcygpOyB9ICk7In1dfQ==)

## 󠀁[Code editor (as a Gutenberg block)](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#code-editor-as-a-gutenberg-block)󠁿

    ```language-json
    {
        "landingPage": "/wp-admin/post.php?post=4&action=edit",
        "steps": [
            {
                "step": "login",
                "username": "admin",
                "password": "password"
            },
            {
                "step": "installPlugin",
                "pluginData": {
                    "resource": "wordpress.org/plugins",
                    "slug": "interactive-code-block"
                }
            },
            {
                "step": "runPHP",
                "code": "<?php require '/wordpress/wp-load.php'; wp_insert_post(['post_title' => 'WordPress Playground block demo!','post_content' => '<!-- wp:wordpress-playground/playground /-->', 'post_status' => 'publish', 'post_type' => 'post',]);"
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJsYW5kaW5nUGFnZSI6Ii93cC1hZG1pbi9wb3N0LnBocD9wb3N0PTQmYWN0aW9uPWVkaXQiLCJzdGVwcyI6W3sic3RlcCI6ImxvZ2luIiwidXNlcm5hbWUiOiJhZG1pbiIsInBhc3N3b3JkIjoicGFzc3dvcmQifSx7InN0ZXAiOiJpbnN0YWxsUGx1Z2luIiwicGx1Z2luRGF0YSI6eyJyZXNvdXJjZSI6IndvcmRwcmVzcy5vcmcvcGx1Z2lucyIsInNsdWciOiJpbnRlcmFjdGl2ZS1jb2RlLWJsb2NrIn19LHsic3RlcCI6InJ1blBIUCIsImNvZGUiOiI8P3BocCByZXF1aXJlICcvd29yZHByZXNzL3dwLWxvYWQucGhwJzsgd3BfaW5zZXJ0X3Bvc3QoWydwb3N0X3RpdGxlJyA9PiAnV29yZFByZXNzIFBsYXlncm91bmQgYmxvY2sgZGVtbyEnLCdwb3N0X2NvbnRlbnQnID0+ICc8IS0tIHdwOndvcmRwcmVzcy1wbGF5Z3JvdW5kL3BsYXlncm91bmQgLy0tPicsICdwb3N0X3N0YXR1cycgPT4gJ3B1Ymxpc2gnLCAncG9zdF90eXBlJyA9PiAncG9zdCcsXSk7In1dfQ==)

You can share your own Blueprint examples in [this dedicated wiki](https://github.com/WordPress/wordpress-playground/wiki/Blueprint-examples).

## 󠀁[Load an older WordPress version](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#load-an-older-wordpress-version)󠁿

Playground only ships with a few recent WordPress releases. If you need to use an
older version, this Blueprint can help you: change the version number in `"url":"
https://playground.wordpress.net/plugin-proxy.php?url=https://wordpress.org/wordpress-
6.2.1.zip"` from `6.2.1` to the release you want to load.

**Note:** the oldest supported WordPress version is `6.2.1`, following the SQLite
integration plugin.

    ```language-json
    {
        "landingPage": "/wp-admin",
        "preferredVersions": {
            "wp": "https://playground.wordpress.net/plugin-proxy.php?url=https://wordpress.org/wordpress-6.2.1.zip",
            "php": "8.3"
        },
        "features": {
            "networking": true
        },
        "steps": [
            {
                "step": "login",
                "username": "admin",
                "password": "password"
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJsYW5kaW5nUGFnZSI6Ii93cC1hZG1pbiIsInByZWZlcnJlZFZlcnNpb25zIjp7IndwIjoiaHR0cHM6Ly9wbGF5Z3JvdW5kLndvcmRwcmVzcy5uZXQvcGx1Z2luLXByb3h5LnBocD91cmw9aHR0cHM6Ly93b3JkcHJlc3Mub3JnL3dvcmRwcmVzcy02LjIuMS56aXAiLCJwaHAiOiI4LjMifSwiZmVhdHVyZXMiOnsibmV0d29ya2luZyI6dHJ1ZX0sInN0ZXBzIjpbeyJzdGVwIjoibG9naW4iLCJ1c2VybmFtZSI6ImFkbWluIiwicGFzc3dvcmQiOiJwYXNzd29yZCJ9XX0=)

## 󠀁[Run WordPress from trunk or a specific commit.](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#run-wordpress-from-trunk-or-a-specific-commit)󠁿

WordPress Playground can run `trunk` (the latest commit), the HEAD of a specific
branch or a specific commit from the [WordPress/WordPress](https://github.com/WordPress/WordPress)
GitHub repository.

You can specify the reference in `"url": "https://playground.wordpress.net/plugin-
proxy.php?build-ref=trunk"`.

To specify the latest commit of a particular branch, you can change the reference
to the branch version number, eg `6.6`. To run a specific commit, you can use the
commit hash from [WordPress/WordPress](https://github.com/WordPress/WordPress), 
eg `7d7a52367dee9925337e7d901886c2e9b21f70b6`.

**Note:** the oldest supported WordPress version is `6.2.1`, following the SQLite
integration plugin.

    ```language-json
    {
        "landingPage": "/wp-admin",
        "login": true,
        "preferredVersions": {
            "php": "8.3",
            "wp": "https://playground.wordpress.net/plugin-proxy.php?build-ref=trunk"
        }
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJsYW5kaW5nUGFnZSI6Ii93cC1hZG1pbiIsImxvZ2luIjp0cnVlLCJwcmVmZXJyZWRWZXJzaW9ucyI6eyJwaHAiOiI4LjMiLCJ3cCI6Imh0dHBzOi8vcGxheWdyb3VuZC53b3JkcHJlc3MubmV0L3BsdWdpbi1wcm94eS5waHA/YnVpbGQtcmVmPXRydW5rIn19)

## 󠀁[Using Blueprint Bundles](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#using-blueprint-bundles)󠁿

Here’s an example of a Blueprint that uses bundled resources from a Blueprint bundle:

    ```language-json
    {
        "landingPage": "/",
        "preferredVersions": {
            "php": "8.3",
            "wp": "latest"
        },
        "steps": [
            {
                "step": "installTheme",
                "themeData": {
                    "resource": "bundled",
                    "path": "/my-theme.zip"
                },
                "activate": true
            },
            {
                "step": "installPlugin",
                "pluginData": {
                    "resource": "bundled",
                    "path": "/my-plugin.zip"
                },
                "activate": true
            },
            {
                "step": "writeFile",
                "path": "/wordpress/custom-page.html",
                "data": {
                    "resource": "bundled",
                    "path": "/assets/custom-page.html"
                }
            }
        ]
    }
    ```

This Blueprint bundle would be zip file containing the following files:

 * `/blueprint.json` – The blueprint declaration outlined above
 * `/my-theme.zip` – A theme package
 * `/my-plugin.zip` – A plugin package
 * `/assets/custom-page.html` – A custom HTML file

You can use this Blueprint bundle by:

 1. Creating a ZIP file with these files and the blueprint.json
 2. Hosting the ZIP file on a server
 3. Loading it with `?blueprint-url=https://example.com/my-blueprint-bundle.zip`

For more information on Blueprint bundles, see the [Blueprint Bundles](https://developer.wordpress.org/playground/blueprints/bundles)
documentation.

First published

July 15, 2026

Last updated

July 16, 2026

Edit article

[ Improve it on GitHub: Blueprints Examples ](https://raw.githubusercontent.com/WordPress/wordpress-playground/trunk/packages/docs/site/docs/blueprints/08-examples.md)

Changelog

[ See list of changes: Blueprints Examples ](https://developer.wordpress.org/playground/blueprints/examples/?output_format=md#)

[  Previous: Blueprint Bundles](https://developer.wordpress.org/playground/blueprints/bundles/)

[  Next: Troubleshoot and debug Blueprints](https://developer.wordpress.org/playground/blueprints/troubleshoot-and-debug/)