PHPackages                             pressgang-wp/muster - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. pressgang-wp/muster

ActiveLibrary[Testing &amp; Quality](/categories/testing)

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

WordPress-native toolkit for deterministic content provisioning and development fixtures

0.2.0(1mo ago)01↓75%MITPHPPHP ^8.3CI passing

Since Feb 16Pushed 1mo agoCompare

[ Source](https://github.com/pressgang-wp/pressgang-muster)[ Packagist](https://packagist.org/packages/pressgang-wp/muster)[ Docs](https://pressgang.dev/)[ RSS](/packages/pressgang-wp-muster/feed)WikiDiscussions main Synced 1w ago

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

[![Muster](https://github.com/pressgang-wp/pressgang-muster/raw/main/assets/img/muster-banner.png)](https://github.com/pressgang-wp/pressgang-muster/blob/main/assets/img/muster-banner.png)

🍪Muster
=======

[](#muster)

[![Latest Stable Version](https://camo.githubusercontent.com/3889166919d9c15a82aec3a8bec62c5825368c13d41d40f7bdc3042c96bd0d32/68747470733a2f2f706f7365722e707567782e6f72672f707265737367616e672d77702f6d75737465722f762f737461626c65)](https://packagist.org/packages/pressgang-wp/muster)[![Total Downloads](https://camo.githubusercontent.com/ab777698430c33ac6e01a6697a7c4e6f2512158f3789e8f84529bd450eacd42b/68747470733a2f2f706f7365722e707567782e6f72672f707265737367616e672d77702f6d75737465722f646f776e6c6f616473)](https://packagist.org/packages/pressgang-wp/muster)[![License](https://camo.githubusercontent.com/8d3b4b94fd35ed8f461730a4008d70102f9c41c80502048add22b26f980c2122/68747470733a2f2f706f7365722e707567782e6f72672f707265737367616e672d77702f6d75737465722f6c6963656e7365)](https://packagist.org/packages/pressgang-wp/muster)

**Describe the content your WordPress site needs. Run it as often as you like. Get the same site every time.**

Muster turns development and test content into code you can review, re-run, and trust — without an ORM, without a database dump, and without ever wondering what a seed script is about to overwrite.

The problem
-----------

[](#the-problem)

Every WordPress project needs realistic content to build against, and the usual options all bite:

- **A database dump** goes stale the moment it lands, can't be reviewed in a pull request, and slowly drifts away from the code it exists to support.
- **An ad-hoc seed script** works once. Run it twice and you have duplicate pages — or it deletes something it didn't create.
- **Unseeded fake content** changes on every run, so a visual regression or a CI failure can't be reproduced or bisected.

Muster fixes all three: fixture content becomes a declarative, deterministic, re-runnable part of your codebase.

Why Muster
----------

[](#why-muster)

**Re-run it forever, safely.** Every resource carries a stable logical key, so a second run updates the page it made the first time instead of creating another one. Rename a slug or retitle a post and it still resolves — WordPress locators stay the native lookup layer, but identity doesn't depend on them.

**Same seed, same site.** Randomness and time are explicit inputs, not ambient state. `--seed=1234` fixes generated values; an epoch fixes every relative date. Two machines, two months apart, produce byte-identical content — which is what makes visual regression testing and reproducible bug reports possible.

**See it before it happens.** Every run plans first and shows you exactly what it will create, update, keep, or delete. `--dry-run` stops there. Any conflict stops the write entirely, so a surprise is a report rather than a support ticket.

**It only touches what it made.** Muster records what it owns. `resetOwned()` and `pruneOwned()` delete only that — never the client's real pages sitting in the same database. Claiming pre-existing content takes a deliberate `->adopt()`, and adoption can never steal a resource owned by someone else.

**WordPress-native, not an ORM.** Builders write through core APIs, so hooks fire, caches invalidate, and ACF, menus, and attachments behave exactly as they do in wp-admin. Nothing maps your posts to a foreign object model.

**Fixtures live in code review.** A colleague can read the diff of your content in a PR — which is not a sentence anyone has said about a `.sql` file.

Install
-------

[](#install)

```
composer require --dev pressgang-wp/muster
```

Requires PHP 8.3+, WordPress loaded when resources persist, and WP-CLI for the commands below. FakerPHP comes along automatically.

> **Pre-1.0.** The public API may still change between minor versions. Pin an exact version if that matters to you.

Install as a dev dependency for local work, CI, and disposable environments. If a controlled non-production runtime must seed after a `--no-dev` deploy, make it a regular dependency instead.

Quick start
-----------

[](#quick-start)

Muster classes live in a top-level `muster/` directory, mapped under your composer **`autoload-dev`** — they are development and test fixtures, not shipped code:

```
"autoload-dev": { "psr-4": { "App\\Muster\\": "muster/" } }
```

Describe what the site should contain:

```
