ralfhortt / wordpress-theme-boilerplate
A WordPress Boilerplate Theme by Ralf Hortt
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 5
Open Issues: 2
Type:wordpress-theme
pkg:composer/ralfhortt/wordpress-theme-boilerplate
Requires
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- szepeviktor/phpstan-wordpress: ^2.0
This package is auto-updated.
Last update: 2025-10-22 12:53:18 UTC
README
Documentation
Every folder contains a README.md with further instructions
Installation
$ composer create-project ralfhortt/wordpress-theme-boilerplate
Check INSTALLATION.md for detailed installation steps
Development
Commands
Development Helpers
npm run make:block/composer run make:blockto interactively create a new json file for a block insrc/theme/blocks/blockname.npm run make:styleto interactively create a block style insrc/theme/namespace/blockname.npm run make:block-style/composer run make:block-styleto interactively create a block style.npm run make:pattern/composer run make:patternto interactively create a block pattern.npm run css:clamp/composer run css:clampto calculate CSS clamp values for responsive design based on viewport sizes.npm run css:color/composer run css:colorto show a color in different notations (i.e. rgb hex oklch …)npm run css:contrast/composer run css:contrastto calculate color contrast ratios and accessibility compliance.
Build Commands
npm run build:themeto build the theme.json file fromsrc/theme/and copying the block styles tostylesfoldernpm run watch:themeto watch and auto-rebuild theme files during development
Build Process
Production
- Run
npm run buildfor production build
Development
- Run
npm run start
Linters
npm run lint:css/composer run lint:css- Run stylelint for CSS/SCSS filesnpm run lint:php/composer run lint:php- Run PHP linters (phpcs, phpmd)composer run lint- Run PHPStan static analysis
Available linters:
Fixers
npm run lint:css:fix/composer run lint:css:fix- Auto-fix stylelint issuesnpm run lint:php:fix/composer run lint:php:fix- Auto-fix PHP formatting with phpcbfcomposer run format- Format PHP code with Laravel Pintcomposer run format:prettier- Format files with Prettier
Available fixers:
- stylelint
- phpcbf
- Laravel Pint - PHP code style fixer
Project Setup
composer run replace-textdomain- Replace textdomain placeholders with project namecomposer run copy-env- Copy environment configuration files