PHPackages                             wp-cli-confmaps/wp-cli-confmaps - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wp-cli-confmaps/wp-cli-confmaps

ActiveWp-cli-package[Utility &amp; Helpers](/categories/utility)

wp-cli-confmaps/wp-cli-confmaps
===============================

ConfMaps configuration management for WordPress - Tame your wp\_options using WP-CLI and git

1.0.7(3y ago)19GPL-2.0-onlyPHPPHP &gt;=7.4.0

Since Oct 29Pushed 3y ago2 watchersCompare

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

READMEChangelogDependencies (2)Versions (4)Used By (0)

ConfMaps configuration management for WordPress WP-CLI - Tame your wp\_options using WP-CLI and git
===================================================================================================

[](#confmaps-configuration-management-for-wordpress-wp-cli---tame-your-wp_options-using-wp-cli-and-git)

This is a [CLI](https://wp-cli.org/)-based tool for managing [WordPress](https://wordpress.org/) settings defined in the [wp\_options](https://codex.wordpress.org/Database_Description#Table:_wp_options)database table.

TL;DR:

- This is a WP-CLI package
- It manages options in your `wp_options` table
- Source of truth are PHP files (called "conf maps")
- Multiple conf maps can be merged into the final desired configuration (think per-environment overrides)
- You can dump database values back into the conf maps

In short, if your answer to the question "Do I want to track my WordPress configuration that is stored in the `wp_options` table by storing it in a git repository?" is "Yes, definitely!", then this tool is what you're looking for.

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

[](#installation)

Prerequisites:

- [WordPress](https://wordpress.org/)
- [WP-CLI](https://wp-cli.org/)
- Shell access to your WP instance(s)

Install the `wp-cli-confmaps` package:

```
wp package install wp-cli-confmaps/wp-cli-confmaps

```

Initial (basic) configuration
-----------------------------

[](#initial-basic-configuration)

To start using this tool, at least one conf map needs to be created. The simplest way to get started is to generate a conf map from your current `wp_options` content:

```
wp confmaps generate --from-db

```

This will dump out your first conf map, in a form of PHP code. It should look something like this:

```
