SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
Configuration Management in WordPress
1. Intro
2. Data and WordPress & Configuration
3. Sync Codebase
4. Sync Uploads
5. Sync Database
6. Configuration Management
Agenda
•Sales Engineer - WP Engine
•Developer, Freelancer
•CMS Specialist
•Open Source
•Speaker
Edmund Turbin
WordCamp Stockholm - Nov 2016
Data and WordPress
&
Configuration
CONFIGURATION MANAGEMENT
The task of tracking and controlling
changes in the software
DATA AND WORDPRESS
• Core, plugin and theme files
• Data stored in a MySQL db
• Options/Transients/Object Caching
• Media Library assets and files
• Configuration wp-config.php
WHAT DATA DOES WORDPRESS USE?
DATA AND WORDPRESS
“Configuration varies across deploys,
code stays the same”
DATA AND WORDPRESS
• Database
• Files
• Uploads
WHAT DATA IS NEEDED FOR DEPLOYMENT?
DATA AND WORDPRESS
• wp-config.php - keeps site specific configuration
• Different when using multiple dev environments
• Has sensitive information
CONFIGURATION
DATA AND WORDPRESS
• Some settings apply to all environments
• Each environment has unique settings
• Credentials will be different each environment
• Keep credentials out of version control
CONFIGURATION WITH MULTIPLE ENVIRONMENTS
DATA AND WORDPRESS
• Allows you to keep variations of your wp-config.php
• Each environment has it’s own unique config
• Uses variables to include proper configuration file
DOTENV
https://m.dotdev.co/secure-your-wordpress-config-with-dotenv-d939fcb06e24
Sync Codebase
DEPLOYMENT
• SFTP/FTP
• Version Control - GIT, SVN
SYNC CODEBASE
DEPLOYMENT
• Version Control allows you to be sure that all changes are
pushed to environments
•Can ignore files and directories that are not needed
SYNC CODEBASE
Sync Uploads
DEPLOYMENT
• Typically not stored in version control
• Files can be large
• Will not change very much
UPLOADS DIRECTORY
DEPLOYMENT
• Copy all files
• Copy files you need
• Point to files on another server
SYNC UPLOADS METHODS
DEPLOYMENT
• FTP can be used to copy the entire uploads directory
• Can be done with client app
COPY ALL FILES
DEPLOYMENT
• rsync -avz --rsh=ssh user@host:/path/to/wp-content/uploads/* .
• Requires SSH some command line chops
• Not available on all hosting providers
COPY ALL FILES - RSYNC
DEPLOYMENT
• FTP can be used to copy only recent files
• WordPress organizes uploads by date if configured
COPY SOME FILES
DEPLOYMENT
COPY SOME FILES
PLUGIN: UPLOADS BY PROXY
https://wordpress.org/plugins/uploads-by-proxy/
PLUGIN: UPLOADS BY PROXY
WP-CONFIG.PHP SETTINGS
https://wordpress.org/plugins/uploads-by-proxy/
//** Uploads by Proxy */
define('WP_SITEURL', 'http://edmund.local');
define('UBP_IS_LOCAL', true);
define('UBP_SITEURL', 'http://www.edmundturbin.com');
Database Migration
DATA IN WORDPRESS
• WP-CLI
• SFTP/FTP & mysql import
• 3rd party plugins
MOVE DATABASE EXPORT ACROSS ENVIRONMENTS
DATABASE MIGRATION
• WP-CLI
• MySQL import
• PHPMyAdmin
DATABASE IMPORT
DATABASE MIGRATION
• Allow you to run remote wp-cli commands
• Connects via SSH behind the scenes
• @dev, @stage, @production
• Uses a prefix before wp-cli command
• wp @dev cli info
WP-CLI ALIASES
DATABASE MIGRATION
• wp @production db export > production_db_export.sql
• wp @dev db reset —yes
•wp @dev db import production_db_export.sql
• wp @dev search-replace example.com example.dev
SYNC DATABASE ACROSS ENVIRONMENTS
https://gist.github.com/retlehs/aa47003249623e52b95a3fcd6f69b8fb#file-sync-prod-sh
Configuration
Management
CONFIGURATION MANAGEMENT
• Save time by transferring only what we need
• Less data to be transferred
• Data does not need to be synced
WHAT IF WE ONLY NEED TO MAKE A FEW CHANGES?
CONFIGURATION MANAGEMENT
• Settings are unique - site_url, home_url
• Not all plugins are needed on production
• Site admins or user can make settings changes
WHAT IF SETTINGS ARE DIFFERENT IN EACH ENVIRONMENT?
PLUGIN: WP-CFM
https://wordpress.org/plugins/wp-cfm/
PLUGIN: WP-CFM
• Copy settings that you need, not entire DB
• Keep track of all settings in a single place
• Version Control
• Manage multiple environments
https://wordpress.org/plugins/wp-cfm/
BENEFITS
PLUGIN: WP-CFM
• Allows you to save options
• Can be saved as sets called Bundles
• Push changes to file
• Pull changes into database
https://wordpress.org/plugins/wp-cfm/
HOW DOES IT WORK?
PLUGIN: WP-CFM
• Data saved to disk as JSON array
• Can be committed to a repo
• Changes managed in WP Dashboard
• Permissions on settings?
https://wordpress.org/plugins/wp-cfm/
WORDPRESS CONFIGURATION MANAGEMENT
PLUGIN: WP-CFM
• WP settings (wp_options table)
• Multisite settings (wp_sitemeta table)
• Taxonomy terms
• Custom Field Suite field groups
https://wordpress.org/plugins/wp-cfm/
WHAT DATA CAN BE MANAGED?
PLUGIN: WP-CFM
wp config pull [bundle_name]
wp config push [bundle_name]
wp config diff [bundle_name]
wp config bundles
wp config show_bundle [bundle_name]
https://wordpress.org/plugins/wp-cfm/
WP-CLI COMMANDS
Codebase & Uploads
Version control ensures your
codebase is synced. Uploads
pulled down regularly
WP-CLI for DB Sync
WP-CLI can make it simple to keep
your content in sync across
multiple environments
Configuration
Can differ across different tiers,
but can still be managed centrally
within codebase.
Thank you!
@spicecadet
edmund.turbin@wpengine.com

Weitere ähnliche Inhalte

Was ist angesagt?

MES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesMES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesDylan Redfield
 
Serve like a boss (part one)
Serve like a boss (part one)Serve like a boss (part one)
Serve like a boss (part one)Hamed Nemati
 
WordPress Workflows
WordPress WorkflowsWordPress Workflows
WordPress WorkflowsPhill Brown
 
What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011Lenz Grimmer
 
Magento caching
Magento cachingMagento caching
Magento cachingYireo
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsAles Lichtenberg
 
Upgrading or migrating to a higher AEM version - Planning and process
Upgrading or migrating to a higher AEM version - Planning and processUpgrading or migrating to a higher AEM version - Planning and process
Upgrading or migrating to a higher AEM version - Planning and processAshokkumar T A
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with NginxBud Siddhisena
 
Debugging the Web with Fiddler
Debugging the Web with FiddlerDebugging the Web with Fiddler
Debugging the Web with FiddlerIdo Flatow
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsLetsConnect
 
Speeding Up The Snail
Speeding Up The SnailSpeeding Up The Snail
Speeding Up The SnailMarcus Deglos
 
What's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-PremisesWhat's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-PremisesGabriella Davis
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with luceeGert Franz
 
Setting up a local WordPress Environment
Setting up a local WordPress EnvironmentSetting up a local WordPress Environment
Setting up a local WordPress EnvironmentChris La Nauze
 
INF107 - Integrating HCL Domino and Microsoft 365
INF107 - Integrating HCL Domino and Microsoft 365INF107 - Integrating HCL Domino and Microsoft 365
INF107 - Integrating HCL Domino and Microsoft 365Dylan Redfield
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...ColdFusionConference
 
Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)Nicholas Dionysopoulos
 
Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging templateGert Franz
 

Was ist angesagt? (20)

MES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesMES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best Practices
 
Serve like a boss (part one)
Serve like a boss (part one)Serve like a boss (part one)
Serve like a boss (part one)
 
WordPress Workflows
WordPress WorkflowsWordPress Workflows
WordPress Workflows
 
What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011What's new in MySQL 5.5? FOSDEM 2011
What's new in MySQL 5.5? FOSDEM 2011
 
Magento caching
Magento cachingMagento caching
Magento caching
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tips
 
Upgrading or migrating to a higher AEM version - Planning and process
Upgrading or migrating to a higher AEM version - Planning and processUpgrading or migrating to a higher AEM version - Planning and process
Upgrading or migrating to a higher AEM version - Planning and process
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
 
Debugging the Web with Fiddler
Debugging the Web with FiddlerDebugging the Web with Fiddler
Debugging the Web with Fiddler
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
 
Linux Servers
Linux ServersLinux Servers
Linux Servers
 
Speeding Up The Snail
Speeding Up The SnailSpeeding Up The Snail
Speeding Up The Snail
 
What's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-PremisesWhat's New in Notes, Sametime and Verse On-Premises
What's New in Notes, Sametime and Verse On-Premises
 
HCL Sametime V11 - ENG
HCL Sametime V11 - ENGHCL Sametime V11 - ENG
HCL Sametime V11 - ENG
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with lucee
 
Setting up a local WordPress Environment
Setting up a local WordPress EnvironmentSetting up a local WordPress Environment
Setting up a local WordPress Environment
 
INF107 - Integrating HCL Domino and Microsoft 365
INF107 - Integrating HCL Domino and Microsoft 365INF107 - Integrating HCL Domino and Microsoft 365
INF107 - Integrating HCL Domino and Microsoft 365
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)
 
Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging template
 

Ähnlich wie Configuration Management in WordPress

wp-config Tips and Tricks
wp-config Tips and Trickswp-config Tips and Tricks
wp-config Tips and TricksJosh Harrison
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments Ohad Raz
 
Managing Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkManaging Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkWilliam Earnhardt
 
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...rtCamp
 
be the captain of your connections deployment
be the captain of your connections deploymentbe the captain of your connections deployment
be the captain of your connections deploymentSharon James
 
SolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
SolarWinds Federal User Group 2016 - Optimizing SolarWinds OrionSolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
SolarWinds Federal User Group 2016 - Optimizing SolarWinds OrionSolarWinds
 
WP-MU 101: How to Install and Avoid Common Mistakes
WP-MU 101: How to Install and Avoid Common MistakesWP-MU 101: How to Install and Avoid Common Mistakes
WP-MU 101: How to Install and Avoid Common MistakesCT Moore
 
Updating WordPress Themes, Plugins, and Core Safely
Updating WordPress Themes, Plugins, and Core SafelyUpdating WordPress Themes, Plugins, and Core Safely
Updating WordPress Themes, Plugins, and Core SafelyAngela Bowman
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress TrivandrumWordPress Trivandrum
 
Deployment and Management of Hadoop Clusters
Deployment and Management of Hadoop ClustersDeployment and Management of Hadoop Clusters
Deployment and Management of Hadoop ClustersAmal G Jose
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX, Inc.
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuis Rodríguez Castromil
 
January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12Howard Greenberg
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsAlessandro Pilotti
 
Soccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM ConnectionsSoccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM Connectionspanagenda
 
Week6 office-hours
Week6 office-hoursWeek6 office-hours
Week6 office-hoursRandall Rode
 
No more “cowboy coding”
No more “cowboy coding”No more “cowboy coding”
No more “cowboy coding”Jim True
 

Ähnlich wie Configuration Management in WordPress (20)

wp-config Tips and Tricks
wp-config Tips and Trickswp-config Tips and Tricks
wp-config Tips and Tricks
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
Managing Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkManaging Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large Network
 
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
 
be the captain of your connections deployment
be the captain of your connections deploymentbe the captain of your connections deployment
be the captain of your connections deployment
 
SolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
SolarWinds Federal User Group 2016 - Optimizing SolarWinds OrionSolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
SolarWinds Federal User Group 2016 - Optimizing SolarWinds Orion
 
WP-MU 101: How to Install and Avoid Common Mistakes
WP-MU 101: How to Install and Avoid Common MistakesWP-MU 101: How to Install and Avoid Common Mistakes
WP-MU 101: How to Install and Avoid Common Mistakes
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Updating WordPress Themes, Plugins, and Core Safely
Updating WordPress Themes, Plugins, and Core SafelyUpdating WordPress Themes, Plugins, and Core Safely
Updating WordPress Themes, Plugins, and Core Safely
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 
Deployment and Management of Hadoop Clusters
Deployment and Management of Hadoop ClustersDeployment and Management of Hadoop Clusters
Deployment and Management of Hadoop Clusters
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best Practices
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
 
January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12January OpenNTF Webinar - Backup your Domino Server - New Options in V12
January OpenNTF Webinar - Backup your Domino Server - New Options in V12
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
 
Soccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM ConnectionsSoccnx10: Best and worst practices deploying IBM Connections
Soccnx10: Best and worst practices deploying IBM Connections
 
Week6 office-hours
Week6 office-hoursWeek6 office-hours
Week6 office-hours
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
No more “cowboy coding”
No more “cowboy coding”No more “cowboy coding”
No more “cowboy coding”
 

Mehr von Edmund Turbin

Remote Control WordPress
Remote Control WordPressRemote Control WordPress
Remote Control WordPressEdmund Turbin
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDNEdmund Turbin
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017Edmund Turbin
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word pressEdmund Turbin
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIEdmund Turbin
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIEdmund Turbin
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
Word press gets responsive 4x3
Word press gets responsive 4x3Word press gets responsive 4x3
Word press gets responsive 4x3Edmund Turbin
 
Scaling WooCommerce on WP Engine
Scaling WooCommerce on WP EngineScaling WooCommerce on WP Engine
Scaling WooCommerce on WP EngineEdmund Turbin
 
Working in Harmony: Manchester - Optimize development and content workflows
Working in Harmony: Manchester - Optimize development and content workflowsWorking in Harmony: Manchester - Optimize development and content workflows
Working in Harmony: Manchester - Optimize development and content workflowsEdmund Turbin
 
Woo commerce scalability notes
Woo commerce scalability   notesWoo commerce scalability   notes
Woo commerce scalability notesEdmund Turbin
 
Just For You - How to drive better engagement with localisation-based insights.
Just For You - How to drive better engagement with localisation-based insights.Just For You - How to drive better engagement with localisation-based insights.
Just For You - How to drive better engagement with localisation-based insights.Edmund Turbin
 

Mehr von Edmund Turbin (14)

Remote Control WordPress
Remote Control WordPressRemote Control WordPress
Remote Control WordPress
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDN
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word press
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
The Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
 
Customize it.
Customize it.Customize it.
Customize it.
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
Word press gets responsive 4x3
Word press gets responsive 4x3Word press gets responsive 4x3
Word press gets responsive 4x3
 
Scaling WooCommerce on WP Engine
Scaling WooCommerce on WP EngineScaling WooCommerce on WP Engine
Scaling WooCommerce on WP Engine
 
Working in Harmony: Manchester - Optimize development and content workflows
Working in Harmony: Manchester - Optimize development and content workflowsWorking in Harmony: Manchester - Optimize development and content workflows
Working in Harmony: Manchester - Optimize development and content workflows
 
Working in harmony
Working in harmonyWorking in harmony
Working in harmony
 
Woo commerce scalability notes
Woo commerce scalability   notesWoo commerce scalability   notes
Woo commerce scalability notes
 
Just For You - How to drive better engagement with localisation-based insights.
Just For You - How to drive better engagement with localisation-based insights.Just For You - How to drive better engagement with localisation-based insights.
Just For You - How to drive better engagement with localisation-based insights.
 

Kürzlich hochgeladen

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Configuration Management in WordPress

  • 2. 1. Intro 2. Data and WordPress & Configuration 3. Sync Codebase 4. Sync Uploads 5. Sync Database 6. Configuration Management Agenda
  • 3. •Sales Engineer - WP Engine •Developer, Freelancer •CMS Specialist •Open Source •Speaker Edmund Turbin WordCamp Stockholm - Nov 2016
  • 5. CONFIGURATION MANAGEMENT The task of tracking and controlling changes in the software
  • 6. DATA AND WORDPRESS • Core, plugin and theme files • Data stored in a MySQL db • Options/Transients/Object Caching • Media Library assets and files • Configuration wp-config.php WHAT DATA DOES WORDPRESS USE?
  • 7. DATA AND WORDPRESS “Configuration varies across deploys, code stays the same”
  • 8. DATA AND WORDPRESS • Database • Files • Uploads WHAT DATA IS NEEDED FOR DEPLOYMENT?
  • 9. DATA AND WORDPRESS • wp-config.php - keeps site specific configuration • Different when using multiple dev environments • Has sensitive information CONFIGURATION
  • 10. DATA AND WORDPRESS • Some settings apply to all environments • Each environment has unique settings • Credentials will be different each environment • Keep credentials out of version control CONFIGURATION WITH MULTIPLE ENVIRONMENTS
  • 11. DATA AND WORDPRESS • Allows you to keep variations of your wp-config.php • Each environment has it’s own unique config • Uses variables to include proper configuration file DOTENV https://m.dotdev.co/secure-your-wordpress-config-with-dotenv-d939fcb06e24
  • 13. DEPLOYMENT • SFTP/FTP • Version Control - GIT, SVN SYNC CODEBASE
  • 14. DEPLOYMENT • Version Control allows you to be sure that all changes are pushed to environments •Can ignore files and directories that are not needed SYNC CODEBASE
  • 16. DEPLOYMENT • Typically not stored in version control • Files can be large • Will not change very much UPLOADS DIRECTORY
  • 17. DEPLOYMENT • Copy all files • Copy files you need • Point to files on another server SYNC UPLOADS METHODS
  • 18. DEPLOYMENT • FTP can be used to copy the entire uploads directory • Can be done with client app COPY ALL FILES
  • 19. DEPLOYMENT • rsync -avz --rsh=ssh user@host:/path/to/wp-content/uploads/* . • Requires SSH some command line chops • Not available on all hosting providers COPY ALL FILES - RSYNC
  • 20. DEPLOYMENT • FTP can be used to copy only recent files • WordPress organizes uploads by date if configured COPY SOME FILES
  • 22. PLUGIN: UPLOADS BY PROXY https://wordpress.org/plugins/uploads-by-proxy/
  • 23. PLUGIN: UPLOADS BY PROXY WP-CONFIG.PHP SETTINGS https://wordpress.org/plugins/uploads-by-proxy/ //** Uploads by Proxy */ define('WP_SITEURL', 'http://edmund.local'); define('UBP_IS_LOCAL', true); define('UBP_SITEURL', 'http://www.edmundturbin.com');
  • 25. DATA IN WORDPRESS • WP-CLI • SFTP/FTP & mysql import • 3rd party plugins MOVE DATABASE EXPORT ACROSS ENVIRONMENTS
  • 26. DATABASE MIGRATION • WP-CLI • MySQL import • PHPMyAdmin DATABASE IMPORT
  • 27. DATABASE MIGRATION • Allow you to run remote wp-cli commands • Connects via SSH behind the scenes • @dev, @stage, @production • Uses a prefix before wp-cli command • wp @dev cli info WP-CLI ALIASES
  • 28. DATABASE MIGRATION • wp @production db export > production_db_export.sql • wp @dev db reset —yes •wp @dev db import production_db_export.sql • wp @dev search-replace example.com example.dev SYNC DATABASE ACROSS ENVIRONMENTS https://gist.github.com/retlehs/aa47003249623e52b95a3fcd6f69b8fb#file-sync-prod-sh
  • 30. CONFIGURATION MANAGEMENT • Save time by transferring only what we need • Less data to be transferred • Data does not need to be synced WHAT IF WE ONLY NEED TO MAKE A FEW CHANGES?
  • 31. CONFIGURATION MANAGEMENT • Settings are unique - site_url, home_url • Not all plugins are needed on production • Site admins or user can make settings changes WHAT IF SETTINGS ARE DIFFERENT IN EACH ENVIRONMENT?
  • 33. PLUGIN: WP-CFM • Copy settings that you need, not entire DB • Keep track of all settings in a single place • Version Control • Manage multiple environments https://wordpress.org/plugins/wp-cfm/ BENEFITS
  • 34. PLUGIN: WP-CFM • Allows you to save options • Can be saved as sets called Bundles • Push changes to file • Pull changes into database https://wordpress.org/plugins/wp-cfm/ HOW DOES IT WORK?
  • 35. PLUGIN: WP-CFM • Data saved to disk as JSON array • Can be committed to a repo • Changes managed in WP Dashboard • Permissions on settings? https://wordpress.org/plugins/wp-cfm/ WORDPRESS CONFIGURATION MANAGEMENT
  • 36. PLUGIN: WP-CFM • WP settings (wp_options table) • Multisite settings (wp_sitemeta table) • Taxonomy terms • Custom Field Suite field groups https://wordpress.org/plugins/wp-cfm/ WHAT DATA CAN BE MANAGED?
  • 37. PLUGIN: WP-CFM wp config pull [bundle_name] wp config push [bundle_name] wp config diff [bundle_name] wp config bundles wp config show_bundle [bundle_name] https://wordpress.org/plugins/wp-cfm/ WP-CLI COMMANDS
  • 38. Codebase & Uploads Version control ensures your codebase is synced. Uploads pulled down regularly
  • 39. WP-CLI for DB Sync WP-CLI can make it simple to keep your content in sync across multiple environments
  • 40. Configuration Can differ across different tiers, but can still be managed centrally within codebase.