PHPackages                             boxuk/dictator - 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. [CLI &amp; Console](/categories/cli)
4. /
5. boxuk/dictator

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

boxuk/dictator
==============

The Dictator controls the state of WordPress

v1.0(3y ago)3236.9k↓18.1%1MITPHPPHP ^8.0 || ^8.1

Since Apr 1Pushed 3y ago8 watchersCompare

[ Source](https://github.com/boxuk/dictator)[ Packagist](https://packagist.org/packages/boxuk/dictator)[ Docs](https://github.com/boxuk/dictator)[ RSS](/packages/boxuk-dictator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (13)Used By (1)

Dictator
========

[](#dictator)

[![Linting status](https://github.com/boxuk/dictator/actions/workflows/linting.yml/badge.svg)](https://github.com/boxuk/dictator/actions/workflows/linting.yml)[![Testing status](https://github.com/boxuk/dictator/actions/workflows/testing.yml/badge.svg)](https://github.com/boxuk/dictator/actions/workflows/testing.yml)

Attribution
-----------

[](#attribution)

- This package was forked from [Dictator](https://danielbachhuber.com/2014/03/31/introducing-dictator/)with permission due to it seemingly falling into abandonment.

Overview
--------

[](#overview)

Dictator controls the State of WordPress. Strongly influenced by [Salt](http://www.saltstack.com/), Dictator permits configuration attributes stored in YAML state files to be *imposed* upon WordPress.

Dictator's primary concern is to permit the expression of how WordPress is configured as YAML state files. It understands WordPress in terms of *states*. States are collections of *regions*. Each state file has the state declaration, and any tracked configuration details for each region.

For example, the `site` state includes the `settings`, `users`, and `terms` regions. Running `wp dictator export site site-state.yml` against production data will export the production state into a human-readable state file:

```
state: site
settings:
  title: Dictator
  description: Just another WordPress site controlled by Dictator
  date_format: F j, Y
  time_format: g:i a
  active_theme: twentyfourteen

```

Apply the state file locally with `wp dictator impose site-state.yml` and you've replicated production without having to download the database.

Installation
------------

[](#installation)

### WP-CLI package

[](#wp-cli-package)

`wp package install boxuk/dictator`

### Composer package

[](#composer-package)

`composer req boxuk/dictator`

Usage
-----

[](#usage)

Dictator comprises these WP-CLI commands:

- `wp dictator compare ` - Compare a given state file to the State of WordPress. Produces a colorized diff if differences, otherwise empty output.
- `wp dictator export   [--regions=] [--force]` - Export the State of WordPress to a state file.
- `wp dictator impose  [--regions=]` - Impose a given state file onto WordPress.
- `wp dictator validate ` - Validate the provided state file against each region's schema.

First time user? Try Dictator out by calling `wp dictator export site site-state.yml`, making a change to the state file, and seeing a colorized diff of how it compares with `wp dictator compare site-state.yml`.

Extending
---------

[](#extending)

Even though Dictator is in its infancy, it was written with extensibility in mind. New states can be registered with `Dictator::addState();`, and can comprise a selection of existing or custom regions. Write a state / region for your plugin / theme to make it easy for your users to export / impose settings.

### Existing extensions

[](#existing-extensions)

- [Dictator WooCommerce](https://github.com/boxuk/dictator-woocommerce)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

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

Every ~287 days

Recently: every ~112 days

Total

12

Last Release

1265d ago

Major Versions

v0.8 → 2.x-dev2021-10-04

v0.9 → 1.0.0-alpha2022-03-14

PHP version history (4 changes)v0.2PHP &gt;=5.6

2.x-devPHP ^7.4 || ^8.0

1.0.0-alphaPHP ^7.4 || ^8.0 || ^8.1

v1.0PHP ^8.0 || ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c8c170d78af034f9aee1c84e279b97e5b61b549ce8b8519ed8da81402ac8e96?d=identicon)[BoxUK](/maintainers/BoxUK)

---

Top Contributors

[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (154 commits)")[![systemsathomesdotcom](https://avatars.githubusercontent.com/u/10618551?v=4)](https://github.com/systemsathomesdotcom "systemsathomesdotcom (9 commits)")[![jenkoian](https://avatars.githubusercontent.com/u/131355?v=4)](https://github.com/jenkoian "jenkoian (3 commits)")[![jmslbam](https://avatars.githubusercontent.com/u/145887?v=4)](https://github.com/jmslbam "jmslbam (3 commits)")[![jonny-bull](https://avatars.githubusercontent.com/u/53259768?v=4)](https://github.com/jonny-bull "jonny-bull (2 commits)")[![mattheu](https://avatars.githubusercontent.com/u/494927?v=4)](https://github.com/mattheu "mattheu (2 commits)")[![richardswain](https://avatars.githubusercontent.com/u/888319?v=4)](https://github.com/richardswain "richardswain (2 commits)")[![johnbillion](https://avatars.githubusercontent.com/u/208434?v=4)](https://github.com/johnbillion "johnbillion (1 commits)")[![grappler](https://avatars.githubusercontent.com/u/1785641?v=4)](https://github.com/grappler "grappler (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/boxuk-dictator/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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