Introducing Dictator
Dictator controls the State of WordPress, and is now available for you to use.
Strongly influenced by Salt provisioning and installable as a WP-CLI package, Dictator now allows you to:
- Export WordPress’ configuration to a human-readable YAML state file.
- Commit the state file to version control to share between environments, or with another developer.
- Compare the state of WordPress to the declared state file, with a colorized diff.
- Impose a state file onto WordPress.
Dictator understands WordPress in terms of states. States are collections of regions. Each state file has the state declaration along with tracked configuration details for each region. Regions have a defined schema which produces the translation between the human-readable YAML file and how WordPress stores state in the database.
One key idea Dictator adopted from provisioning systems: environments are ephemeral. WordPress no longer doing what you want it to? You should be able to destroy it and provision a brand new version.
For 0.1, Dictator packages two states: network and site. The network state comprises regions for network settings, users, and sites. The site state comprises regions for site settings, users, and terms. Management of widgets, roles, and more is just waiting for a pull request.
Think downloading the entirety of a production database is a messy way to get just a few configuration details? Me too — and with Dictator I can provision full WordPress environments without the bad assumptions that come with using production data.
Ever had a site launch that required a frantic amount of widget configuration right after changing DNS? More than I can remember — and I’m automating myself out of the problem.
Think non-posts data portability would be neat? So do I — and I built a tool for it that I’m very excited to share with you: Dictator. Try it out with wp dictator export site site-state.yml