This repository was archived by the owner on May 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DataReferences
adamziel
added a commit
to WordPress/wordpress-playground
that referenced
this pull request
May 30, 2025
# WordPress Extension Proposal: Blueprints v2 WordPress needs a first-class tool for creating new sites. The current Blueprints v1 format, while expressive, lacks conciseness and standardization. This proposal addresses these shortcomings to enable rapid Blueprint development by people and AI tools. ## What's included in the spec? This PR introduces WEP-1 (WordPress Extension Proposal 1) which defines version 2 of WordPress Blueprints. The proposal consists of: - **Blueprint Schema** — comprehensive set of TypeScript definitions with rationale and usage examples - **Blueprint Bundle format** — A standardized ways of bundling data with a Blueprint - **Blueprint Execution Algorithm** - **Blueprint Merging Algorithm** - A separation boundary between the Blueprint and the runner - A lot more! ## What's intentionally left out? - **Blueprints distribution workflow**. @akirk had an idea about an internal, WordPress-based platform that would play a similar role as the community [Blueprint Gallery](https://github.com/WordPress/blueprints/). There's also a case to make for storing Blueprints directly in a git repo. Whichever way it goes, this is a separate discussion. - **Static data format**. It is a rabbit hole that warrants another discussion. For sure we'll support block markup. There's also a case to make for Markdown, which is already supported by the [Data Liberation importer](https://github.com/Automattic/php-toolkit/tree/trunk/components/DataLiberation). How will we express metadata? Via `<meta>` tags? A custom block explored by @dmsnell? In an entirely different way? Who knows! It's out of scope here. - **Multisites**. They may require an entirely different schema. Let's leave that for v3 or v4. - **Tooling details**. While the spec defines requirement a runner must fulfill, it leaves out specific APIs and CLI commands these tools will expose. ## Next steps Please comment on this Pull Request with any thoughts and concerns. If you're unsure what to focus on, here's a few prompts: * **Expresiveness** – Does the v2 schema capture the 90 % of use‑cases your business cares about, without forcing custom workarounds? * **Bundle format** – Is there anything missing from the proposed Blueprint Bundle format? * **Security** – Does anything proposed in this spec stand out to you as a potential security issue? Once we're sufficiently aligned, this proposal will be merged and we'll move on to implementation. Note that even after merging we still may do minor adjustments until the reference implementation is ready. From there, we'll move the discussion focus over to the [Blueprints v2 runner PR](Automattic/php-toolkit#9) ## Other notes If this proposal model will stick, we might want to start a new repository similarly to how PSR documents [have their own repo](https://github.com/php-fig/fig-standards/tree/master/accepted).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blueprints v2 runner
Warning
This is an early alpha version. Proceed with caution!
This PR ships a reference implementation of a subset of the Blueprints version 2 spec. It consists of:
These tools are compatible with PHP 7.2+ on Mac, Linux, Windows and require no PHP extensions. Libraries for processing ZIP, HTTP, XML, HTML, and Git are included.
This huge PR also:
Splitting it into atomic changes and documenting them could easily take a week. Therefore I apologize, but I am not going to do that. Let's treat it as the new initial commit and apply atomic changes from this point forward.
Remaining work
First and foremost: stabilize this runner with a large and meaningful suite of tests.
Other than that:
In this PR
Independently of this PR
@TODO
comments in a way that can be discussed and trackedOut of scope until the baseline functionality works
Using it
Download blueprints.phar from the latest alpha release and follow the instructions there.
For running from source, use this command:
Here's an example of using it to create a new site (with a complex v1 Blueprint to showcase compatibility):
CleanShot.2025-05-12.at.21.17.02.mp4
The command above created a new WordPress site in a
newsite
directory. Here's what it did under the hood:With another Blueprint, you could also create new post types, source data directly from a git repo, and more.
Scripts
Bundle
blueprints.phar
To build a single
blueprints.phar
executable, install box and run:Regenerate JSON Schema based on TypeScript types
This PR ships a copy of the Blueprints v2 proposal including the TypeScript types. To regenerate the JSON schema used to validate input Blueprints, run: