Block Starter Kit
A boilerplate / starter kit for WordPress Editor (Gutenberg) blocks.
Currently very much Work In Progress
This starter kit aims to give a 'keep only what you need' approach to block building that works for PHP only WordPress plugins, Block driven plugins, or a mixure of both.
The kit is full of useful code snippets and tutorials. Every folder will contain a README.md file that will contain an explanation and a usage example.
It also contains serveral 'starter blocks' with plenty of inline documentation.
- Download the plugin into your 'plugins' folder.
- cd into the folder
composer installto install PHPCS
npm installto install the project dependancies
npm run buildto compile the plugin assets
Find and Replace
You can find and replace the following strings to make the plugin fit for your organisation:
Author of the plugin, eg:
Matt Watson or
Author email address of the plugin, eg:
Comma seperated list of WordPress.org usernames to add them as contributors if/when the plugin is uploaded into the repository, eg:
mwtsn, davegreen, mkdo.
Author URL, eg:
Lowercase underscored short version of your company name, eg:
Uppercase underscored short version of your company name, eg:
Link to donate to the plugin (or remove this if not applicable).
Plugin name, eg
Block Starter Kit.
Lowercase underscored short version of your plugin name, eg:
Lowercase dashed short version of your plugin name, eg:
Uppercase underscored short version of your plugin name, eg:
Description of your plugin.
Link to the location of the plugin. eg.
The following details the high level structure of the plugin, and detail the purpose of each folder and file.
Note that there will be README.md files in most folders, describing the purpose of the code within.
/assets— The assests folder.
/images— Images that are used within the blocks
/css— The compiled CSS for the plugin
/scss— The uncompiled (non block specific) CSS for the plugin
/blocks— WordPress Editor (Gutenberg) Blocks
/examples— Block based code examples with documentation
deploy- Tools to deploy to the WordPress.org plugin repository
/wp-org— Assets for the WordPress plugin repository (header, icon and screenshots go here), uploaded with deploy script
.deploy.sh— Script to deploy to WordPress plugin repository
/docs- Files and images that support the documentation
/php— Non block specific PHP plugin code
/examples— Non block based code examples with documentation
.babelrc— The configuration for the webpack
.gitignore— Tells Git not to commit certain files
composer.json- Installs all PHPCS
index.php— Start Here - The 'Main' class, that loads all other classes, functions and assets.
LICENSE— The Open Source licence for the plugin
package.json— The npm dependancies for the project, and npm scripts.
README.md— This file!
readme.txt— Starter WordPress plugin repository readme file.
webpack.config.js— The webpack configruation for the project
Original webpack configuration (before modifications) from Zac Gordon's Gutenberg Course.
Original deploy script (before modifications) from Garry Jones.