Slide 1

Slide 1 text

CONFIGURATION MANAGEMENT INTRO TO

Slide 2

Slide 2 text

ABOUT ME Agency & Community Engineer 
 Instructor Founder

Slide 3

Slide 3 text

REACH OUT @tessak22
 [email protected] tessakriesel.com Find me at other WordPress events!

Slide 4

Slide 4 text

SCENARIO A team of developers is working on a that is already live, adding additional functionality.

Slide 5

Slide 5 text

SCENARIO Each developer is working in their own feature branch, all likely needing to make database changes.

Slide 6

Slide 6 text

SCENARIO Content from the live environment needs to be tested against new features being created.

Slide 7

Slide 7 text

SCENARIO Overwriting the live database is not an option. The content is constantly changing and untrackable.

Slide 8

Slide 8 text

SCENARIO Branches Joe (Theme) Joanna (Page Cache Setup) John (MailChimp) Environments Dev Test Live

Slide 9

Slide 9 text

WHAT IS SITE CONFIGURATION?

Slide 10

Slide 10 text

SITE CONFIGURATION Your site’s configuration includes items configurable in the CMS dashboard not related to content.

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

SO WHAT IS CONFIGURATION MANAGEMENT?

Slide 13

Slide 13 text

CONFIGURATION MANAGEMENT Configuration management is the act of managing your site configuration in code through version control.

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

WP-CFM CONFIGURATION MANAGEMENT PLUGIN

Slide 16

Slide 16 text

PERKS OF WP-CFM ➤Less need to copy the database. ➤No need to manually apply database setting changes. ➤ Track and migrate configuration files using git, subversion, etc.

Slide 17

Slide 17 text

WHAT CAN IT TRACK wp_options is the only table that can be tracked by the plugin. This table is populated by the following sources: ➤ Default settings (/wp-admin/options-general.php ➤ Theme options - includes customizer options stored in the row theme_mods_yourthemename ➤ Settings and option pages for plugins

Slide 18

Slide 18 text

TERMINOLOGY Bundle: A group of settings to track. This could be a single setting, or all the site's available settings.
 Push: Export configuration from your database to the filesystem.
 Pull: Import configuration from the filesystem into your database.

Slide 19

Slide 19 text

SCENARIO Branches Joe (Theme) Joanna (Page Cache Setup) John (MailChimp) Environments Dev Test Live

Slide 20

Slide 20 text

DEMO LET’S SEE HOW IT WORKS!

Slide 21

Slide 21 text

STEPS TO CONFIGURE WP-CFM 1. Install WP-CFM plugin 2. Activate plugin 3. Go to Settings > WP-CFM 4. Click Add Bundle 5. Check the settings you would like included in each bundle. 6. Save Changes 7. Push your bundle 8. Commit your code changes (the newly created json file) 9. From your other environment, follow steps 1-3, where you should see the bundle someone else setup. Click Pull. 10.Repeat!

Slide 22

Slide 22 text

TIPS & TRICKS ‣ WordPress Codex for Option Reference
 https://codex.wordpress.org/ Option_Reference ‣ View Settings on Your Site
 http://yoururl.com/wp-admin/ options.php ‣ Create as many bundles as makes sense for you. I like to see WordPress settings in one and plugins in a different bundle.

Slide 23

Slide 23 text

MAJOR SECURITY CONSIDERATION WP-CFM, by default, will store bundles in a directory called “config” within wp-content. This directory, by default is usually web accessible. Your bundles can include API keys - change permissions on this directory!

Slide 24

Slide 24 text

WP-CLI WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, configure multisite installs and much more, without using a web browser. http://wp-cli.org/

Slide 25

Slide 25 text

WP-CFM + 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]

Slide 26

Slide 26 text

CHEAT SHEET: SETTINGS > GENERAL Site Title: blogname Tagline: blogdescription Email Address: admin_email Membership: users_can_register New User Default Role: default_role Timezone: timezone_string Date Format: date_format Time Format: timezone_string Week Starts On: start_of_week

Slide 27

Slide 27 text

CHEAT SHEET: SETTINGS > WRITING Default Post Category: default_category Default Post Format: default_post_format Mail Server: mailserver_url Port: mailserver_port Login Name: mailserver_login Password: mailserver_pass Default Mail Category: default_email_category Update Services: ping_sites

Slide 28

Slide 28 text

CHEAT SHEET: SETTINGS > READING Front page displays: show_on_front Front page: page_on_front Posts page: page_for_posts Blog pages show at most: posts_per_page Syndication feeds show the most recent: posts_per_rss For each article in a feed, show: rss_use_excerpt Search Engine Visibility: blog_public

Slide 29

Slide 29 text

CHEAT SHEET: SETTINGS > MEDIA Thumbnail Width: thumbnail_size_w Thumbnail Height: thumbnail_size_h Crop thumbnails to exact dimensions: thumbnail_crop Medium Width: medium_size_w Medium Height: medium_size_h Large Width: large_size_w Large Height: large_size_h Organize my uploads into month and year based folders: 
 uploads_use_yearmonth_folders

Slide 30

Slide 30 text

CHEAT SHEET: SETTINGS > PERMALINKS Permalink Common Settings: permalink_structure Category Base: category_base Tag Base: tag_base

Slide 31

Slide 31 text

CHEAT SHEET: THEMES, WIDGETS & PLUGINS Theme Settings (Customizer settings): theme_mods_themename Widgets: widget_nameofwidget Plugins (Activated): active_plugins 3rd party plugins may include their own set of settings. Check WP-CFM after installing a plugin to see if there are any new/applicable name options. For example: Yoast SEO has it’s own settings that can be included in a bundle.

Slide 32

Slide 32 text

OTHER HELPFUL RESOURCES ➤ Pantheon Documentation
 https://pantheon.io/docs/wp-cfm/ ➤ WP-CFM Documentation
 http://forumone.github.io/wp-cfm/ ➤ WordPress Codex Options Reference
 https://codex.wordpress.org/Option_Reference ➤ Advanced Custom Fields Synchronized JSON
 https://www.advancedcustomfields.com/resources/synchronized-json/

Slide 33

Slide 33 text

FEEDBACK I would love to hear what you think! http://tessakriesel.com/feedback/ Anonymous feedback is a-okay, none of the form fields are required.