Skip to main content

What are Blueprints, and what can you do with them?

With WordPress Playground you can create a whole website, including plugins, themes, content (posts, pages, taxonomy, and comments), settings (site name, users, permalinks, and more), etc. They allow you to generate a WooCommerce store complete with products, a magazine populated with articles, a corporate blog with multiple users, and more.

Blueprints are JSON files that you can use to configure Playground instances.

Blueprints support advanced use cases, like file system and database manipulation, and give you fine-grained control over the instance you create. The WordPress Test Team has been using Playground in the 6.5 beta release cycle, creating a Blueprint that loads the latest version, several testing plugins, and dummy data.

A simple example

A Blueprint might look something like this:

{
"plugins": ["akismet", "gutenberg"],
"themes": ["twentynineteen"],
"settings": {
"blogname": "My Blog",
"blogdescription": "Just another WordPress site"
},
"constants": {
"WP_DEBUG": true
}
}

The Blueprint above installs the Akismet and Gutenberg plugins and the Twenty Nineteen theme, sets the site name and description, and enables the WordPress debugging mode.

The benefits of Blueprints

Blueprints are an invaluable tool for building WordPress sites via Playground

  • Flexibility: developers can make granular adjustments to the build process.
  • Consistency: ensure that every new site starts with the same configuration.
  • Lightweight: small text files that are easy to store and transfer.
  • Transparency: A Blueprint includes all the commands needed to build a snapshot of a WordPress site. You can read through it and understand how the site is built.
  • Productivity: reduces the time-consuming process of manually setting up a new WordPress site. Instead of installing and configuring themes and plugins for each new project, apply a Blueprint and set everything in one process.
  • Up-to-date dependencies: fetch the latest version of WordPress, a particular plugin, or a theme. Your snapshot is always up to date with the latest features and security fixes.
  • Collaboration: the JSON files are easy to review in tools like GitHub. Share Blueprints with your team or the WordPress community. Allowing others to use your well-configured setup.
  • Experimentation and Learning: For those new to WordPress or looking to experiment with different configurations, Blueprints provide a safe and easy way to try new setups without "breaking" a live site.
  • WordPress.org integration: offer a demo of your plugin in the WordPress plugin directory, or a preview in a Theme Trac ticket.
  • Spinning a development environment: A new developer in the team could download the Blueprint, run a hypothetical wp up command, and get a fresh developer environments—loaded with everything they need. The entire CI/CD process can reuse the same Blueprint.
More Resources

Visit these links to learn more about the (endless) possibilities of Blueprints: