Download the PHP package wp-php-toolkit/blueprints without Composer
On this page you can find all versions of the php package wp-php-toolkit/blueprints. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wp-php-toolkit/blueprints
More information about wp-php-toolkit/blueprints
Files in wp-php-toolkit/blueprints
Package blueprints
Short Description Blueprints component for WordPress.
License GPL-2.0-or-later
Homepage https://wordpress.github.io/php-toolkit/reference/blueprints.html
Informations about the package blueprints
slug: blueprints title: Blueprints install: wp-php-toolkit/blueprints
see_also:
- filesystem | Filesystem | Prepare files and fixtures before applying site setup steps.
- httpclient | HttpClient | Download packages or source data as part of provisioning workflows.
-
cli | CLI | Wrap repeatable blueprint operations in a small command.
Declarative WordPress site provisioning. Write a Blueprint JSON document for plugins, options, content, and setup steps; let the runner execute it.
Why this exists
A WordPress environment is more than a database dump. It can require a specific core version, plugins, themes, site options, uploaded files, content, and setup steps. Rebuilding that by hand makes demos, tests, bug reports, workshops, and CI fixtures drift over time.
The Blueprints component treats site setup as data. A blueprint JSON document describes the desired steps, and the runner applies them to either a new WordPress install or an existing one. The validator exists because user-authored JSON needs clear, path-specific errors rather than generic schema failures.
RunnerConfiguration separates the web root from the WordPress core directory, since real hosts often put them in different places. Both paths are explicit on the runner, never inferred.
Blueprints can create a new WordPress install (download core, set up the database, apply steps) or apply to an existing site. Creating a fresh install needs filesystem access this in-browser runtime doesn't have, so the runnable snippets focus on APPLY_TO_EXISTING_SITE.
Configure a runner for an existing site
RunnerConfiguration is a fluent builder. A real run also needs a blueprint reference; this snippet shows the site-target fields in isolation.
Generate blueprint JSON from PHP
CI jobs and tests stay clearer when PHP builds the blueprint from data instead of hand-writing JSON. Keep the structure plain: version, top-level collections such as plugins, and any imperative steps under the schema's step lists.
Validate before running
The schema validator returns a human-readable ValidationError instead of a generic "does not match schema" failure. Use it before handing user-authored JSON to a runner.
The Blueprint JSON shape
A Blueprint v2 document starts with a version field, then uses top-level declarations such as plugins, themes, content, and the schema's step lists. Imperative steps use a "step" discriminator plus step-specific fields.
{
"version": 2,
"plugins": [
{ "source": "gutenberg", "active": true }
],
"additionalStepsAfterExecution": [
{ "step": "setSiteOptions",
"options": {
"blogname": "Demo Site",
"permalink_structure": "/%postname%/"
} },
{ "step": "installPlugin",
"source": "https://downloads.wordpress.org/plugin/classic-editor.zip" },
{ "step": "activatePlugin",
"pluginPath": "classic-editor/classic-editor.php" }
]
}All versions of blueprints with dependencies
wp-php-toolkit/bytestream Version ^0.8.1
wp-php-toolkit/filesystem Version ^0.8.1
wp-php-toolkit/http-client Version ^0.8.1
wp-php-toolkit/xml Version ^0.8.1
wp-php-toolkit/zip Version ^0.8.1