Create your WordPress theme faster with this boilerplate

Today I released a boilerplate on GitHub which helps you to start developing your wordpress theme… quite fast.

Using the boilerplate I created – link – you can create and develop your theme in zero time. Just clone the repository, install the dependencies and you are good to go.

The boilerplate even has a composer.json file in case you want to use PHP Composer in your development workflow (for example Bedrock).

The tools I’ve used in this repository are:

  • Gulp
  • TypeScript
  • Sass (scss)
  • Composer

Here is a full list of what you can do after just cloning the repository and installing the depencies:

  • You can use TypeScript immediately. If you want, you can import React, just make sure to install it via npm.
  • You can use Sass (scss). Many themes provide scss source files and some libraries (like bootstrap).
  • You can use Composer and dependencies – define your PHP dependencies easily in the composer.json file.

The template contains only one index.php which echoes a string when the template is installed. Except /assets/ there is no other specific folder structure the template provides – you are free to design your php code as you wish. Even /assets/ is adjustable in the gulpfile.js, in case you want even more flexibily or just to reorder the file structure.