PHPackages                             pressgang-wp/pressgang - 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. [Templating &amp; Views](/categories/templating)
4. /
5. pressgang-wp/pressgang

ActiveWordpress-theme[Templating &amp; Views](/categories/templating)

pressgang-wp/pressgang
======================

Package for the WordPress PressGang parent theme framework

v2.0.0(3mo ago)02.1kMITPHPPHP ^8.0CI failing

Since Feb 6Pushed 1mo agoCompare

[ Source](https://github.com/pressgang-wp/pressgang)[ Packagist](https://packagist.org/packages/pressgang-wp/pressgang)[ RSS](/packages/pressgang-wp-pressgang/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

[![PressGang](https://github.com/pressgang-wp/pressgang/raw/master/img/pressgang-banner.png)](https://github.com/pressgang-wp/pressgang/blob/master/img/pressgang-banner.png)

Hijacking Your WordPress Development Workflow
=============================================

[](#hijacking-your-wordpress-development-workflow)

**Ahoy there! Modernize your WordPress development and ship your WordPress themes faster than ever. PressGang anchors your workflow in modern development practices. Build cleaner, faster, smarter themes and navigate your development course to calmer seas.**

📖 **[Read the full documentation at docs.pressgang.dev](https://docs.pressgang.dev/)**

Overview
--------

[](#overview)

PressGang is a WordPress parent theme framework that gives you the architecture of a modern PHP application — Composer autoloading, Twig templating via Timber, config-driven bootstrapping, and a clear separation of concerns — without leaving the WordPress ecosystem. Build child themes on a solid, opinionated foundation and spend your time on features, not plumbing.

✨ Key Features
--------------

[](#-key-features)

- 🚀 **Rapid Development** — A solid foundation and conventions that accelerate theme development with clean, modern PHP.
- 🌲 **Timber + Twig** — Built on [Timber](https://timber.github.io/docs/v2/) to separate template markup from PHP logic through the [Twig](https://twig.symfony.com/) templating engine.
- 🎮 **Controller Architecture** — MVC-inspired controllers act as view models, preparing context for templates with a clear separation of concerns.
- ⚓ **Convention over Configuration** — Inspired by frameworks like Laravel, repetitive WordPress tasks are bootstrapped via declarative config files — less boilerplate, more building.
- 📦 **Composer &amp; PSR-4** — Dependency management via [Composer](https://getcomposer.org/) and PSR-4 autoloading for a consistent, modern codebase.
- 🔧 **Flexible by Design** — Keeps the core WordPress structure intact. Leverage everything you already know while gaining powerful tools and conventions.

🧭 Core Concepts
---------------

[](#-core-concepts)

### ⚙️ Config-Driven Bootstrapping

[](#️-config-driven-bootstrapping)

Everything in PressGang starts with a config file. Arrays in `config/` declare what gets registered — post types, taxonomies, sidebars, blocks, scripts, styles, and more. Each config file maps to a class in `src/Configuration/` by convention (e.g. `config/sidebars.php` → `Sidebars`). No queries, no side effects — just declarative registration.

### 🎮 Controllers

[](#-controllers)

Controllers live in `src/Controllers/` and are **view models**, not request handlers. Each controller extends `AbstractController`, gathers data via Timber, builds a context array, and selects a template. They must be side-effect free — no writes, no remote requests, no direct rendering.

### 🌍 Context Managers

[](#-context-managers)

Context managers enrich the global `Timber::context()` with data needed across many templates — menus, site info, theme mods, ACF option pages. They implement `ContextManagerInterface`, are registered via `config/context-managers.php`, and must be safe to run on every request (frontend, admin, AJAX, CLI).

### 🧩 Twig Extensions

[](#-twig-extensions)

All custom Twig functions, filters, and globals are registered through extension managers configured in `config/twig-extensions.php`. Twig remains a presentation-only layer — no database queries, no mutations, no business logic.

Timber Twig environment options (including compilation cache) are configured through `config/timber.php`, allowing child themes to opt in per project.

### 🧱 Blocks &amp; Snippets

[](#-blocks--snippets)

Gutenberg blocks are declared in `config/blocks.php` and live under `blocks//` with a `block.json` and Twig template. Snippets are reusable view partials registered via `config/snippets.php` — self-contained, explicitly parameterised UI components.

📋 Requirements
--------------

[](#-requirements)

- **PHP** 8.3+
- **WordPress** 6.4+
    - For **PHP 8.5** runtime support, use **WordPress 6.9+**
- **Timber** 2.0+
- **Composer**

🚀 Getting Started
-----------------

[](#-getting-started)

PressGang is a WordPress *parent theme* that acts as a framework for your [child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/).

### Quick Start with PressGang-Child

[](#quick-start-with-pressgang-child)

The fastest way to weigh anchor is with the [pressgang-child](https://github.com/pressgang-wp/pressgang-child) starter repo:

```
git clone https://github.com/pressgang-wp/pressgang-child your-theme-name
cd your-theme-name
composer install
```

Then follow the instructions in that repo's README to configure your child theme.

### Manual Setup

[](#manual-setup)

1. Clone PressGang into your `wp-content/themes/` directory:

    ```
    git clone https://github.com/pressgang-wp/pressgang
    ```
2. Create your own [child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/) that extends PressGang.

### Composer Installation

[](#composer-installation)

Require PressGang as a dependency in your child theme:

```
composer require pressgang-wp/pressgang
```

🧪 Testing
---------

[](#-testing)

```
composer install          # install dev dependencies
composer test             # run the unit test suite
composer test:compat      # run tests with strict PHP error reporting
```

Tests use PHPUnit + BrainMonkey — no WordPress installation required. See the [Testing docs](https://docs.pressgang.dev/TESTING) for details on writing new tests.

📖 Documentation
---------------

[](#-documentation)

Uncover the buried treasure at: **[docs.pressgang.dev](https://docs.pressgang.dev/)**

📄 License
---------

[](#-license)

PressGang is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance86

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 99.1% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0511394dd0016176489a9ac150d05d34e625fb85593a36a62498a524bcd7d8b0?d=identicon)[benedict-w](/maintainers/benedict-w)

---

Top Contributors

[![benedict-w](https://avatars.githubusercontent.com/u/1303610?v=4)](https://github.com/benedict-w "benedict-w (1238 commits)")[![tomsmallunfold](https://avatars.githubusercontent.com/u/48717988?v=4)](https://github.com/tomsmallunfold "tomsmallunfold (11 commits)")

---

Tags

mvcpressgangtimbertimber-themetwigwordpresswordpress-developmentwordpress-theme

### Embed Badge

![Health badge](/badges/pressgang-wp-pressgang/health.svg)

```
[![Health](https://phpackages.com/badges/pressgang-wp-pressgang/health.svg)](https://phpackages.com/packages/pressgang-wp-pressgang)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[twig/string-extra

A Twig extension for Symfony String

21946.0M133](/packages/twig-string-extra)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[vincentlanglet/twig-cs-fixer

A tool to automatically fix Twig code style

3348.4M67](/packages/vincentlanglet-twig-cs-fixer)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)

PHPackages © 2026

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