Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automate Your Configuration: The Joys of WP-CFM

Automate Your Configuration: The Joys of WP-CFM

Throughout our workflows, no matter our hosting provider, we often have to reconfigure items such as General Settings or Active Plugins - and even items such as our Autoptimize settings, or FacetWP facets - per environment.

Fear not! That is where WP-CFM comes in. It allows you to push your configuration from your local development, include it in your version control, and pull it in your higher environments. You can even take it one step further, and include some post-deploy hooks in your CircleCI, or via Pantheon Quicksilver.

We'll touch on what WP-CFM is, why it's awesome, and showcase some examples of how it will save you time, and sanity.

Avatar for Miriam Goldman

Miriam Goldman

May 26, 2021
Tweet

More Decks by Miriam Goldman

Other Decks in Technology

Transcript

  1. Kanopi Studios Automate Your Configuration | 3 Pain Points If

    we work across multiple development environments, we have to re-do our WordPress configuration each time. Plugins, settings, the whole thing.
  2. Kanopi Studios Automate Your Configuration | 4 It Takes Too

    Much Time Build in a buffer to do the work and also to correct it too! Human error is sadly a real thing This is likely all of us when we forget to activate a plugin, or we do a configuration setting wrong
  3. Kanopi Studios Automate Your Configuration | 7 What can WP-CFM

    do for you? Copy DB settings to the filesystem This way, you don’t have to copy the entire database, which is never ideal. Similar to Drupal If you’ve used the Features module in Drupal, you’ll know. In the wp_options table? No problem! Any and all settings saved in this table can be captured. WP-CLI support Comfortable with the command line? You can push and pull - provided you know what you named your bundles.
  4. Kanopi Studios Automate Your Configuration | 8 But how does

    this all work you ask? Create a bundle (group) of settings Push: Export database settings to the filesystem Pull: Import file-based settings into the database Uses JSON
  5. Kanopi Studios Automate Your Configuration | 17 Even more automation!

    • Ties into code sync, deployment, and more • Allows you to integrate with other platforms • Many examples are available, beyond WP-CFM, at https://github.com/pantheon-systems/quicksilver-examples
  6. Kanopi Studios Automate Your Configuration | 19 Not on Pantheon?

    No problem! • WP-CLI is all you need (like love) • Set up Git post-deploy hooks, or SSH into the server • Configure this all with your CI/CD tool of choice
  7. Kanopi Studios Automate Your Configuration | 21 It’s not 100%

    automatic You still need to trigger the push when you are doing a git push. 1 2 Additional Settings May Need Configuration While out of the box, you can support a lot - you may have to extend. 3 Open Source = Ever Changing While this is the state of WP-CFM now, it will only continue to evolve. Keep in Mind
  8. Kanopi Studios Automate Your Configuration | 22 Resources 1. https://en-ca.wordpress.org/plugins/wp-cfm/

    2. https://forumone.github.io/wp-cfm/ 3. https://pantheon.io/docs/quicksilver 4. https://github.com/pantheon-systems/quicksilv er-examples