A WordPress plugin to create block themes https://wordpress.org/plugins/create-block-theme/
Find a file
Sarah Norris 3c99bf3da3
Some checks failed
Run checks / Lint (push) Failing after -8h1m22s
Run checks / Compute previous WordPress version (push) Successful in -8h1m22s
Run checks / PHP 7.4 (push) Failing after -8h1m22s
Run checks / PHP 7.4 (WP previous major version) (push) Failing after -8h1m22s
Run checks / PHP 8.0 (push) Failing after -8h1m22s
Run checks / PHP 8.0 (WP previous major version) (push) Failing after -8h1m22s
Run checks / PHP 8.1 (push) Failing after -8h1m22s
Run checks / PHP 8.1 (WP previous major version) (push) Failing after -8h1m22s
Run checks / E2E Tests (push) Failing after 7s
Run checks / PHP 8.2 (push) Failing after -8h1m22s
Run checks / PHP 8.2 (WP previous major version) (push) Failing after -8h1m22s
Run checks / PHP 8.3 (WP previous major version) (push) Failing after -8h1m22s
Run checks / PHP 8.3 (push) Failing after 5s
Add basic e2e tests (#811)
* Add e2e tests

* Add e2e tests to CI

* Fix lint errors

* Use psge.once()

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unnecessary test

* Attempt to fix linting error

* Remove last()

* Delete test theme in afterAll

* Add @playwright/test

* Also delete the theme in the beforeAll step

* Test the theme was activated

* Also test opening the plugin sidebar

* Attempt to fix landing-page timeout

* Test that zip file was downloaded

* Align test scripts closer to GB

* Update specs/landing-page.spec.js

Co-authored-by: Jerry Jones <jones.jeremydavid@gmail.com>

* Revert "Update specs/landing-page.spec.js"

This reverts commit b0e688fea0.

* Only run delete theme command if theme exists

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jerry Jones <jones.jeremydavid@gmail.com>
2026-02-27 16:05:51 +00:00
.github/workflows Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
.husky Code Quality: Migrate to husky v9 format (#800) 2026-02-24 16:23:38 +00:00
.wordpress-org update url for blueprint (#658) 2024-06-03 11:19:35 +02:00
assets Add a main tag wrapper around the query loop (#726) 2024-09-20 09:42:40 +01:00
includes i18n: Localise content attribute of the Read More block (#810) 2026-02-24 11:31:21 +00:00
specs Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
src Bump minimum required WordPress version to 6.8 (#803) 2026-02-24 16:29:52 +00:00
test/unit Add quotes to font family names (#476) 2023-11-15 13:06:27 -03:00
tests Use wp-env for PHP unit test (#802) 2026-02-25 09:43:31 +00:00
.browserslistrc Add browserlist config 2023-02-01 10:45:13 +00:00
.distignore PHPCS: Remove unused files and adjust release files (#754) 2025-04-10 18:39:38 +09:00
.editorconfig Add browserlist config 2023-02-01 10:45:13 +00:00
.eslintignore Add browserlist config 2023-02-01 10:45:13 +00:00
.eslintrc.json Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
.gitignore Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
.markdownlintignore Add AGENTS.md file (#808) 2026-02-24 13:07:51 +00:00
.nvmrc Update Node version to 20 (#617) 2024-05-06 13:55:15 -03:00
.prettierignore Make prettier and stylelint ignore dirs consistent 2023-02-07 12:08:05 +00:00
.prettierrc.js Add prettier and stylelint config files 2023-02-01 10:39:16 +00:00
.stylelintignore Make prettier and stylelint ignore dirs consistent 2023-02-07 12:08:05 +00:00
.stylelintrc.json Clean up package.json and update libraries (#781) 2025-09-16 00:55:58 +09:00
.wp-env.json wp-env: remove mappings field (#774) 2025-05-29 18:23:46 -04:00
AGENTS.md Add AGENTS.md file (#808) 2026-02-24 13:07:51 +00:00
babel.config.js Use npm:wp-prettier instead of prettier 2023-02-02 15:25:35 +00:00
CLAUDE.md Add AGENTS.md file (#808) 2026-02-24 13:07:51 +00:00
composer.json Add integration tests (#393) 2024-03-11 12:48:34 -04:00
composer.lock Rename font assets when theme is saved and/or exported (#712) 2024-09-05 10:22:01 -03:00
CONTRIBUTING.md README markdown formatting (#702) 2024-08-16 17:03:58 +01:00
create-block-theme.php [Automation] New minor Release: 2.8.0 (#792) 2025-12-09 14:38:52 +00:00
index.php Results of lint:php:fix 2023-01-27 17:27:18 +00:00
LICENSE Initial commit 2021-10-29 13:39:09 +01:00
package-lock.json Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
package.json Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
phpcs.xml.dist PHPCS: enalbe VariableAnalysis.CodeAnalysis.VariableAnalysis rule (#782) 2025-09-16 01:07:34 +09:00
phpunit.xml.dist Refactor Theme_Readme (readme.txt) PHP class (#626) 2024-05-13 10:47:39 -03:00
playwright.config.js Add basic e2e tests (#811) 2026-02-27 16:05:51 +00:00
README.md Update README.md disclaimer wording and formatting (#703) 2024-08-28 15:12:02 -03:00
readme.txt Bump minimum required WordPress version to 6.8 (#803) 2026-02-24 16:29:52 +00:00
update-version-and-changelog.js ESLint: Add new rules (#616) 2024-05-06 12:49:30 +09:00
webpack.config.js ESLint: Add new rules (#616) 2024-05-06 12:49:30 +09:00

Create Block Theme

Welcome to Create Block Theme - a WordPress plugin to create block themes from within the Editor.

It works alongside features that are already available in the Editor to enhance the workflow for creating block themes. After being tested in this plugin, some of the features included here may be moved into the Editor itself.

Important

Disclaimer: The Create Block Theme plugin offers critical developer-friendly features; you can think of it as a Development Mode for WordPress, and you should keep in mind that changes made through this plugin could change your site and/or theme permanently.

(Make sure you know what you're doing before hitting that 'Save' button 😉)

This plugin allows you to:

  • Export your existing theme with all customizations made in the Editor
  • Create a new theme, blank theme, child theme, or style variation from the Editor

This plugin also makes several changes to the contents of an exported theme, including:

  • Adds all images used in templates to the theme's assets folder.
  • Ensures the block markup used in templates and patterns is export-ready.
  • Ensures most strings used in templates and patterns are translate-ready.

Learn more about Create Block Theme:

User Support

If you have run into an issue, you should check the Support Forums first. The forums are a great place to get help. If you have a bug to report, please submit it to this repository as an issue. Please search prior to creating a new bug to confirm its not a duplicate.

Plugin Features

Theme Creation Options

There are six options the plugin provides to create a new theme:

1. Export

Export the activated theme including the user's changes.

2. Create a child theme

Creates a new child theme with the currently active theme as a parent.

3. Clone the active theme

Creates a new theme by cloning the activated theme. The resulting theme will have all of the assets of the activated theme combined with the user's changes.

4. Overwrite theme files

Saves the user's changes to the theme files and deletes the user's changes from the site.

5. Generate blank theme

Generate a boilerplate "empty" theme inside of the current site's themes directory.

6. Create a style variation

Saves user's changes as a style variation of the currently active theme.

Embed Fonts

Save fonts in your theme that have been installed with the Font Library (found in WordPress 6.5+, more information).

How to Use the Plugin

Step 1: Setup

To use the latest release of the Create Block Theme plugin on your WordPress site: install from the plugins page in wp-admin, or download from the WordPress.org plugins repository.

There will be a new panel accessible from the WordPress Editor, which you can open by clicking on a new icon to the right of the "Save" button, at the top of the Editor.

In the WordPress Admin Dashboard, under Appearance there will also be a new page called "Create Block Theme".

Step 2: Styles and templates customizations

Make changes to your site styles, fonts and templates using the Editor.

Step 3: Save

Still in the WordPress Editor, navigate to the Create Block Theme menu at the top of the Editor.

To save recent changes made in the Editor to the currently active theme or export the theme:

  • Select "Save Changes to Theme" and select any options to customize what is saved
  • Check "Save Fonts" to copy the assets for any fonts installed and activated through the Font Library to the active font
  • Check "Save Style Changes" to copy your style changes made to the theme.json file
  • Check "Save Template Changes" to copy template changes made in the Editor to your activated theme.
  • With "Save Template Changes you may also select the following:
  • Check "Localize Text" to copy content to patterns from templates so that they can be localized for internationalization.
  • Check "Localize Images" to copy any images referenced in templates to the theme asset folder and reference them from a pattern.
  • Check "Remove Navigation Refs" to remove any navigation ref IDs from templates.
  • Click "Save Changes" to save any recent changes to the currently active theme.

To export your theme to a zip file ready to import into another system:

  • Select "Export Zip"

To edit the theme metadata:

  • Select "Edit Theme Metadata" to edit the metadata for the theme. These details will be used in the style.css file.

To create a new blank theme:

  • Select "Create Blank Theme"
  • Supply a name for the new theme (and optional additional Metadata)
  • Click "Create Blank Theme"

The theme will be created and activated.

To create a variation:

  • Select "Create Theme Variation"
  • Provide a name for the new Variation
  • Click "Create Theme Variation"

A new variation will be created.

To create a new Clone of the current theme or to create a Child of the current theme:

  • Click "Create Theme"
  • Click "Clone Theme" to create a new Theme based on the active theme with your changes
  • Click "Create Child Theme" to create a new Child Theme with the active theme as a parent with your changes

To inspect the active theme's theme.json contents:

  • Select "Inspect Theme JSON"

Many of these options are also available under the older, deprecated Create Block Theme page under Appearance > Create Block Theme.

To install and uninstall fonts:

  • Install and activate a font from any source using the WordPress Font Library.
  • Select "Save Changes" to save all of the active fonts to the currently active theme. These fonts will then be activated in the theme and deactivated in the system (and may be safely deleted from the system).
  • Any fonts that are installed in the theme that have been deactivated with the WordPress Font Library will be removed from the theme.

How to Contribute

We welcome contributions in all forms, including code, design, documentation, and triage. Please see our Contributing Guidelines for more information.