PHPackages                             ralfhortt/wordpress-theme-boilerplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ralfhortt/wordpress-theme-boilerplate

ActiveWordpress-theme

ralfhortt/wordpress-theme-boilerplate
=====================================

A WordPress Boilerplate Theme by Ralf Hortt

3314[7 PRs](https://github.com/Horttcore/WordPress-Theme-Boilerplate/pulls)PHPCI passing

Since Nov 5Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Horttcore/WordPress-Theme-Boilerplate)[ Packagist](https://packagist.org/packages/ralfhortt/wordpress-theme-boilerplate)[ RSS](/packages/ralfhortt-wordpress-theme-boilerplate/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (11)Used By (0)

WordPress Theme Boilerplate
===========================

[](#wordpress-theme-boilerplate)

 [![WordPress](https://camo.githubusercontent.com/3113e6880bc8a9c3d262fec6ba4f09345c288e4e8a583a6112b092641f6c76b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576f726450726573732d362e382b2d3231373539423f7374796c653d666f722d7468652d6261646765266c6f676f3d776f72647072657373266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/3113e6880bc8a9c3d262fec6ba4f09345c288e4e8a583a6112b092641f6c76b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576f726450726573732d362e382b2d3231373539423f7374796c653d666f722d7468652d6261646765266c6f676f3d776f72647072657373266c6f676f436f6c6f723d7768697465) [![PHP](https://camo.githubusercontent.com/79b971ffbad852b1b665c8bcc8fa932b272bf356935237560f733fb071033570/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342b2d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/79b971ffbad852b1b665c8bcc8fa932b272bf356935237560f733fb071033570/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342b2d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![Node](https://camo.githubusercontent.com/8e0ed4a3cba39c7afe7e3f55a46a364474d070b41e4201e5eefdd807f61c116c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652d32322e31312b2d3333393933333f7374796c653d666f722d7468652d6261646765266c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/8e0ed4a3cba39c7afe7e3f55a46a364474d070b41e4201e5eefdd807f61c116c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652d32322e31312b2d3333393933333f7374796c653d666f722d7468652d6261646765266c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465) [![TypeScript 5.9.3](https://camo.githubusercontent.com/8b7de149b71e58e7e70484ddec7969908cb7161ac99ddbbef558112c6838a107/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970742d352e392e332d3331373843363f7374796c653d666f722d7468652d6261646765266c6f676f3d74797065736372697074266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/8b7de149b71e58e7e70484ddec7969908cb7161ac99ddbbef558112c6838a107/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970742d352e392e332d3331373843363f7374796c653d666f722d7468652d6261646765266c6f676f3d74797065736372697074266c6f676f436f6c6f723d7768697465) [![Rector v2.2.9](https://camo.githubusercontent.com/ac52c5db46793068693f9454e967cb78d8537f5603cfc0790fb3cc9278755633/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d76322e322e392d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/ac52c5db46793068693f9454e967cb78d8537f5603cfc0790fb3cc9278755633/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d76322e322e392d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![License](https://camo.githubusercontent.com/6e2148923f7b0f51e83954c648417c36a58065c5e6db384f025a87c3bba40b84/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d322e302b2d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/6e2148923f7b0f51e83954c648417c36a58065c5e6db384f025a87c3bba40b84/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d322e302b2d626c75653f7374796c653d666f722d7468652d6261646765)

---

🛠️ Technologies
---------------

[](#️-technologies)

**Frontend**

- [![SCSS](https://camo.githubusercontent.com/e13d697d086c965f94dde356834495653259434856049abca41626fcb8e38cf1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f534353532d4343363639393f7374796c653d666c61742d737175617265266c6f676f3d73617373266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/e13d697d086c965f94dde356834495653259434856049abca41626fcb8e38cf1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f534353532d4343363639393f7374796c653d666c61742d737175617265266c6f676f3d73617373266c6f676f436f6c6f723d7768697465)
- [![TypeScript](https://camo.githubusercontent.com/e6bc1b669fe5e0006c51b579cbaff8c7cad53e00fdbc4eeab90b19076a201a5d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970742d3331373843363f7374796c653d666c61742d737175617265266c6f676f3d74797065736372697074266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/e6bc1b669fe5e0006c51b579cbaff8c7cad53e00fdbc4eeab90b19076a201a5d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970742d3331373843363f7374796c653d666c61742d737175617265266c6f676f3d74797065736372697074266c6f676f436f6c6f723d7768697465)

**Build Tools**

- [![WordPress](https://camo.githubusercontent.com/0f5c55dae4c943f60f208fb5a8ef47d06811d0abb62425220b0f13799dd82d48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f40776f726470726573732f736372697074732d3231373539423f7374796c653d666c61742d737175617265266c6f676f3d776f72647072657373266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/0f5c55dae4c943f60f208fb5a8ef47d06811d0abb62425220b0f13799dd82d48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f40776f726470726573732f736372697074732d3231373539423f7374796c653d666c61742d737175617265266c6f676f3d776f72647072657373266c6f676f436f6c6f723d7768697465)
- [![Node.js](https://camo.githubusercontent.com/f6db27cb659b92a8cd7b20b984af6c920eebc8e81eb5d63fa2f855ef1c535ca6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652e6a732d3333393933333f7374796c653d666c61742d737175617265266c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/f6db27cb659b92a8cd7b20b984af6c920eebc8e81eb5d63fa2f855ef1c535ca6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6f64652e6a732d3333393933333f7374796c653d666c61742d737175617265266c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465)

**Code Quality**

- [![PHPStan](https://camo.githubusercontent.com/b5e6bbd6d7a07d4ea9e53dadae913251c24780948f1b314b68aefb27c302f8d7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/b5e6bbd6d7a07d4ea9e53dadae913251c24780948f1b314b68aefb27c302f8d7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)
- [![Rector](https://camo.githubusercontent.com/e3c2ed7eed3e4bfa5ce8479b2318d1132a479c0a66b201a5756177713111cb0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/e3c2ed7eed3e4bfa5ce8479b2318d1132a479c0a66b201a5756177713111cb0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)
- [![Stylelint](https://camo.githubusercontent.com/c3bea8cad8717396c2685c8c9ef574951994a9fddf348b497be4d1dfe41bf269/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c656c696e742d3236333233383f7374796c653d666c61742d737175617265266c6f676f3d7374796c656c696e74266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/c3bea8cad8717396c2685c8c9ef574951994a9fddf348b497be4d1dfe41bf269/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c656c696e742d3236333233383f7374796c653d666c61742d737175617265266c6f676f3d7374796c656c696e74266c6f676f436f6c6f723d7768697465)
- [![Pint](https://camo.githubusercontent.com/a8db64fb1e6f20bf28ba860258c6417d5cd64bcefc170b08996ae798f3e6c4e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50696e742d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/a8db64fb1e6f20bf28ba860258c6417d5cd64bcefc170b08996ae798f3e6c4e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50696e742d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)

---

---

📚 Documentation
---------------

[](#-documentation)

Comprehensive guides to help you get started and understand the project structure:

### 📦 [Installation Guide](INSTALLATION.md)

[](#-installation-guide)

Step-by-step installation instructions including requirements (Composer, Node.js) and setup process.

### 🎨 [Theme.json Workflow](THEME-JSON-WORKFLOW.md)

[](#-themejson-workflow)

Learn how to work with TypeScript-based theme.json configuration, including type safety benefits and daily development workflow.

### 📋 [Dependencies](DEPENDENCIES.md)

[](#-dependencies)

Detailed breakdown of all npm and Composer dependencies, explaining what each package does and why it's included.

### 📝 [Changelog](CHANGELOG.md)

[](#-changelog)

Track version history and changes to the project.

### 📁 Folder READMEs

[](#-folder-readmes)

Every major folder contains its own `README.md` with specific instructions for that section.

---

🚀 Installation
--------------

[](#-installation)

```
composer create-project ralfhortt/wordpress-theme-boilerplate
```

> 📖 Check `INSTALLATION.md` for detailed installation steps

---

💻 Development
-------------

[](#-development)

### ⚡ Quick Start

[](#-quick-start)

**🏗️ Production Build**

```
npm run build
```

Builds all assets and generates theme.json

**👀 Development Mode**

```
npm start
```

Starts file watchers with auto-rebuild

### 🔧 Commands

[](#-commands)

#### 🎨 Development Helpers

[](#-development-helpers)

CommandDescription`npm run make:block-config`Create TypeScript block configuration`npm run make:block-style`Create TypeScript block style variation`npm run make:block`Create a block pattern`npm run make:pattern`Create a block pattern`npm run make:starter-content`Scaffold a starter content pattern interactively`npm run make:query-loop`Scaffold a query loop pattern via interactive prompts`npm run css:clamp`Calculate CSS clamp values`npm run css:color`Convert color notations (rgb, hex, oklch)`npm run css:contrast`Calculate color contrast ratios`npm run generate:theme-types`Generate TypeScript types from WordPress schema#### 🏗️ Build Commands

[](#️-build-commands)

CommandDescription`npm run build:theme`Build theme.json from TypeScript files`npm run watch:theme`Watch and auto-rebuild theme files`npm run build`Production build (includes theme.json)`npm start`Development mode with file watchers#### 🔍 Linters

[](#-linters)

CommandDescription`npm run lint:css`Run Stylelint for CSS/SCSS`npm run lint:php`Run PHPStan analysis`composer run lint`Run PHPStan static analysis**Available Tools:**

- [![PHPStan](https://camo.githubusercontent.com/b5e6bbd6d7a07d4ea9e53dadae913251c24780948f1b314b68aefb27c302f8d7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/b5e6bbd6d7a07d4ea9e53dadae913251c24780948f1b314b68aefb27c302f8d7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [PHPStan](https://phpstan.org/) - Static analysis
- [![Stylelint](https://camo.githubusercontent.com/c3bea8cad8717396c2685c8c9ef574951994a9fddf348b497be4d1dfe41bf269/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c656c696e742d3236333233383f7374796c653d666c61742d737175617265266c6f676f3d7374796c656c696e74266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/c3bea8cad8717396c2685c8c9ef574951994a9fddf348b497be4d1dfe41bf269/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c656c696e742d3236333233383f7374796c653d666c61742d737175617265266c6f676f3d7374796c656c696e74266c6f676f436f6c6f723d7768697465) [Stylelint](https://stylelint.io/) - CSS/SCSS linting

#### 🔧 Fixers &amp; Formatters

[](#-fixers--formatters)

CommandDescription`npm run lint:css:fix`Auto-fix Stylelint issues`npm run lint:php:fix`Format PHP with Laravel Pint`composer run format`Format PHP code with Laravel Pint`composer run format:prettier`Format all files with Prettier`composer run refactor`Refactor PHP code with Rector`composer run refactor:dry`Preview Rector changes**Available Tools:**

- [![Pint](https://camo.githubusercontent.com/a8db64fb1e6f20bf28ba860258c6417d5cd64bcefc170b08996ae798f3e6c4e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50696e742d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/a8db64fb1e6f20bf28ba860258c6417d5cd64bcefc170b08996ae798f3e6c4e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50696e742d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [Laravel Pint](https://github.com/laravel/pint) - PHP formatter
- [![Rector](https://camo.githubusercontent.com/e3c2ed7eed3e4bfa5ce8479b2318d1132a479c0a66b201a5756177713111cb0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/e3c2ed7eed3e4bfa5ce8479b2318d1132a479c0a66b201a5756177713111cb0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [Rector](https://getrector.com/) - PHP refactoring
- [![Stylelint](https://camo.githubusercontent.com/c3bea8cad8717396c2685c8c9ef574951994a9fddf348b497be4d1dfe41bf269/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c656c696e742d3236333233383f7374796c653d666c61742d737175617265266c6f676f3d7374796c656c696e74266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/c3bea8cad8717396c2685c8c9ef574951994a9fddf348b497be4d1dfe41bf269/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c656c696e742d3236333233383f7374796c653d666c61742d737175617265266c6f676f3d7374796c656c696e74266c6f676f436f6c6f723d7768697465) [Stylelint](https://stylelint.io/) - Auto-fix CSS
- [![Prettier](https://camo.githubusercontent.com/97b1685089bbf97ec4767a3a33f00b63ba03ce5ac5c5da23ac81cd07d9ea2913/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726574746965722d4637423933453f7374796c653d666c61742d737175617265266c6f676f3d7072657474696572266c6f676f436f6c6f723d626c61636b)](https://camo.githubusercontent.com/97b1685089bbf97ec4767a3a33f00b63ba03ce5ac5c5da23ac81cd07d9ea2913/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726574746965722d4637423933453f7374796c653d666c61742d737175617265266c6f676f3d7072657474696572266c6f676f436f6c6f723d626c61636b) [Prettier](https://prettier.io/) - Code formatter

**Using Rector**

If you don't have dev dependencies installed, run:

```
composer install --no-interaction --prefer-dist
```

Preview Rector changes (recommended):

```
composer run refactor:dry
```

Apply Rector refactors:

```
composer run refactor
```

You can also run Rector directly with the vendor binary:

```
vendor/bin/rector process src --dry-run
```

#### ⚙️ Project Setup

[](#️-project-setup)

CommandDescription`composer run replace-textdomain`Replace textdomain with project name`composer run copy-env`Copy environment configuration files---

🏗️ Build Process
----------------

[](#️-build-process)

The theme uses **TypeScript** for theme.json configuration with full type safety:

### 📁 Project Structure

[](#-project-structure)

```
src/theme/
├── theme.ts                    # Main theme configuration
├── theme.d.ts                  # Auto-generated TypeScript types
└── blocks/core/*/              # Block-specific settings and styles
    ├── blockname.ts            # Block configuration
    └── blockname.stylename.ts  # Block style variations → styles/blockname.stylename.json

```

### ✨ Features

[](#-features)

- **🎯 Type Safety**: TypeScript types auto-generated from official WordPress theme.json schema
- **⚡ No Compilation**: Node.js loads TypeScript directly with `--experimental-strip-types` flag
- **🎨 Block Styles**: Style variations (files matching `blockname.*.ts`) automatically generate separate JSON files in `styles/` directory
- **🔄 Live Reload**: Watch mode automatically rebuilds when TypeScript files change

### 🚀 Workflows

[](#-workflows)

**Production**

```
npm run build
```

Complete production build with theme.json generation

**Development**

```
npm start
```

File watchers with automatic theme.json rebuild

###  Health Score

34

↑

LowBetter than 77% of packages

Maintenance59

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/45d54752dcf3da868ffe4a5ad2b876d6acb911fd914700b52e4d4777ff7d4a02?d=identicon)[Ralf Hortt](/maintainers/Ralf%20Hortt)

---

Top Contributors

[![Horttcore](https://avatars.githubusercontent.com/u/503252?v=4)](https://github.com/Horttcore "Horttcore (343 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")

---

Tags

boilerplateboilerplate-templatethemewordpress

### Embed Badge

![Health badge](/badges/ralfhortt-wordpress-theme-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/ralfhortt-wordpress-theme-boilerplate/health.svg)](https://phpackages.com/packages/ralfhortt-wordpress-theme-boilerplate)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
