A structured, modular WordPress framework powered by Symfony Dependency Injection.
BackTo Framework brings Clean Architecture, DDD patterns, and a compiled service container to WordPress theme and plugin development.
composer require backto/frameworkRequirements: PHP 8.1+
// functions.php (theme) or plugin.php (plugin)
require_once __DIR__ . '/vendor/autoload.php';
$kernel = new MyTheme\Kernel('production', false);
$kernel->setTextDomain('my-theme');
$kernel->load();// src/Kernel.php
namespace MyTheme;
use BackTo\Framework\Theme\ThemeKernel;
class Kernel extends ThemeKernel {}See the Build a Theme tutorial for a complete walkthrough.
The documentation follows the Diataxis framework:
| Section | Purpose |
|---|---|
| Tutorials | Step-by-step lessons to get started |
| How-to Guides | Practical guides for specific tasks |
| Reference | Technical descriptions of modules and contracts |
| Explanation | Design decisions and architectural concepts |
- Register custom post types
- Register custom taxonomies
- Register block styles
- Register post meta fields
- Use the cache system
- Integrate SEO plugins
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.