Boilerplate starting point for WordPress block-based themes with support for a container-based local development workflow.
  • HTML 68.6%
  • Dockerfile 16.7%
  • CSS 14.7%
Find a file
2026-05-23 16:09:52 -07:00
parts Simplify boilerplate. 2026-05-22 14:43:13 -07:00
templates Add a main tag wrapper around the query loop (#726) 2026-05-22 14:43:13 -07:00
.cliff.toml ci(git-cliff): add release notes configuration 2026-05-23 16:08:18 -07:00
.containerignore build(container): add basic container stack for local development 2026-05-22 16:56:48 -07:00
.dockerignore build(container): add basic container stack for local development 2026-05-22 16:56:48 -07:00
CHANGELOG.md chore(release): 0.0.1 2026-05-23 16:09:52 -07:00
compose.dev.yaml build(container): add create-block-theme plugin to local dev stack 2026-05-22 17:08:04 -07:00
compose.yaml build(container): add basic container stack for local development 2026-05-22 16:56:48 -07:00
Containerfile build(container): remove default plugins 2026-05-23 16:05:43 -07:00
LICENSE chore(release): initial commit 2026-05-22 14:41:47 -07:00
README.md docs(README): add quickstart guide 2026-05-23 15:55:38 -07:00
screenshot.png compress screenshot 2026-05-22 14:43:13 -07:00
style.css chore(release): 0.0.1 2026-05-23 16:09:52 -07:00
theme.json update blank themes theme json version (#700) 2026-05-22 14:43:13 -07:00

WordPress Boilerplate Block Theme

Boilerplate starting point for WordPress block-based themes with support for a container-based local development workflow.

Local development environment

Note

While this environment is developed using docker-compose with rootless podman as docker context, any properly configured compose setup should work. For example, docker compose could be installed using Docker Desktop--but please beware that there are many considerations, including security and licensing, worth evaluating when picking a container engine.

Prerequisites

  • Knowledge of git best practices and workflows.
  • Container engine of your choice (podman, docker, etc.).
  • Compose provider configured properly for your container engine.

Quickstart

1. Building and starting local development containers

docker compose build
docker compose -f compose.dev.yaml up --detach
docker compose logs -f db

2. Configuring WordPress in local development containers

After /usr/sbin/mysqld: ready for connections appears in the logs, you should be ready to complete your setup.

  • Navigate to http://localhost:8080/wp-admin/install.php.
  • Follow the on-screen prompts to set site details for your development site. Note: This site is configured to be removed entirely when you stop your local development containers.
  • Navigate to http://localhost:8080/wp-admin/themes.php and activate your boilerplate theme.

3. Developing your theme

Tip

Looking for something more in-depth? Any edits you make manually should be reflected straight to WorpPress when using the compose.dev.yaml configuration! If needed, I recommend Full Site Editing's guides for a quick primer on block themes. The rest of this quickstart will focus on best practices for developing a theme using the WordPress UI.

  • Navigate to http://localhost:8080/wp-admin/plugins.php to enable the "Create Block Theme" plugin.
  • Navigate to http://localhost:8080/wp-admin/site-editor.php to edit styles, navigation, templates, patterns, etc.
  • Navigate to http://localhost:8080/wp-admin/site-editor.php?canvas=edit when you're ready to save your changes to the repository.
  • Select the "Create Block Theme" panel in the upper right of the editor.
  • Select "Save Changes to Theme" and ensure all appropriate options are selected.
  • Commit the changes to your repository using git.

4. Stopping local development containers

Tip

By default, data is not persisted in your local development containers. This means that when you stop your containers, any changes not saved to the repository will be deleted. If you wish to persist data between restarts of your development containers, consider mounting a volume or local directory to /var/lib/mysql on the db service.

docker compose down

Resources used in this theme

Create Block Theme plugin, License: GNU General Public License v2.0 or later https://github.com/WordPress/create-block-theme