Manage and deploy WordPress configuration changes
WP-CFM lets you copy database configuration to / from the filesystem. Easily deploy configuration changes without needing to copy the entire database. WP-CFM is similar to Drupal's Features module.
wp_options table)wp_sitemeta table)WP-CFM supports [pull / push / diff] of bundles from the command-line using WP-CLI:
wp config pull [bundle_name] wp config push [bundle_name] wp config diff [bundle_name] wp config bundles wp config show_bundle [bundle_name]
You can optionally set bundle_name to "all" to include all bundles.
Append the --network flag to include multisite bundles.
add_filter( 'wpcfm_configuration_items', 'my_configuration_items' );
add_filter( 'wpcfm_pull_callback', 'my_pull_callback' );
/**
* Register custom settings
*
* @param array $items Associative array of configuration items
* @return array
*/
function my_configuration_items( $items ) {
$items['myprefix_data'] = array(
'value' => 'YOUR CONFIGURATION DATA',
'label' => 'The value label', // optional
'group' => 'The Group Name', // optional
);
return $items;
}
/**
* Tell WP-CFM how to import custom settings
*
* $params['name'] The option name
* $params['group'] The option group
* $params['old_value'] The current DB value that will get overwritten
* $params['new_value'] The new DB value
*/
function my_pull_callback( $params ) {
if ( 'myprefix_data' == $params['name'] ) {
// Import the data
}
}
Requires: 4.0 or higher
Compatible up to: 4.5.4
Last Updated: ago
Active Installs:
1, 000+
Got something to say? Need help?