Production Ready WordPress #WPLDN

Edmund Turbin
Edmund TurbinSales Engineer II at WP Engine
Deploy your code using version control and continuous integration
PRODUCTION-READY WORDPRESS
• Presenter
• Front End Developer
• Senior Sales Engineer - WP Engine
• Music Technology
Edmund Turbin
@spicecadet
Production
Ready Wordpress
Contents
The Problem
The Solution
The Script
Demonstration
Learnings
Deployment, version control and continuous
integration
The Problem
Deploy your
site
• Manage the way code is deployed
• Automate repetitive tasks for devs, admins when changes
go live
• Make it easy to use best practices
• Allow for flexibility, multiple deploy processes, safe testing
The Solution
The Solution
• Develop Locally
• Distributed Version Control
• Don’t keep plugins and WP core in repository
• Deploy to testing environment prior to production
• Automate build and testing
Continuous
Integration
• Multiple developers share code
• Several pushes per day
• Each push verified by automated build
• Avoids “integration hell”
• Teams can detect problems early
Workflow
• Local Development
• Central Version Control
• Continuous Integration Pipelines
• Build Script
• Dependencies
• Push to server
Version
Control
Repo
Workflow
Install
&
Build
Repo Deps Push
Deployment
Initial Setup
Setup
Clone
Repo
Install
Apps
Configure
Env
Build
Build
Build ConcatUglify
Compile
Sass/Less
JS Lint
Dependencies
Dependencies PluginsWPackagist
Testing
Test
Automated
Testing
Tools
Theme
Local
Development
Build
Collaboration/
VCS
Dependencies
Continuous
Integration Tool
Continuous
Integration Tool
Continuous
Integration Tool
Continuous
Integration Tool
Continuous
Integration Tool
Automated
Testing
Automated
Testing
The Script
#	Set	Constants	
INSTALL="edmund"	
EMAIL="edmund.turbin@wpengine.com"	
ENVIRONMENT=“production"	
#	Use	Node	8.7.0	
nvm	use	stable	
#	Disable	Xdebug	
rm	-f	/home/rof/.phpenv/versions/$(phpenv	version-name)/etc/conf.d/
xdebug.ini
#	Codeship	project	root	is	the	~/clone	directory	
cd	~/clone	
#	Set	production	remote	and	config	
git	config	--global	user.name	"Codeship	Deploy"	
git	config	--global	user.email	"$EMAIL"	
git	remote	add	$ENVIRONMENT	git@git.wpengine.com:$ENVIRONMENT/
$INSTALL.git	
#	Codeship	initially	runs	a	shallow	fetch.	This	allows	us	to	fetch	
origin	and	get	all	file	revisions	
git	fetch	--unshallow	||	true	
git	fetch	origin	"+refs/heads/*:refs/remotes/origin/*"
#	Run	Composer	to	install	dependencies	
cd	wp-content/themes/sage	
composer	install	--prefer-source	—no-interaction	
#	Run	build	tasks	
npm	install	
bower	install	
gulp	—production
#	Remove	unnecessary	files	
rm	~/clone/.gitignore	
#	Git	Commit	and	Push	
git	add	--all	
git	commit	-m	"Codeship	Deployment"	
git	push	$ENVIRONMENT	HEAD:master	--force
#	Assertible	Tests	
curl	-u	DLI7uFTdkcpfcXdQ:	"https://assertible.com/deployments"	-d'{	
				"service":	"43994ec7-41e0-4d7f-9155-6945816333f1",	
				"environmentName":	"production",	
				"version":	"v1"	
}'
DemonstratioN
Learnings
Codeship
• Uses a virtual machine at time of deploy
• Has many common binaries installed, possible to install more
• Caches NPM packages
• Can be used in Debug mode which allows you to SSH into the
virtual machine and run commands until happy
Git Integration
• Understanding how to move files from Codeship was
difficult
• A few different attempts to make this happen
• Possible to use FTP, but Git is more streamlined and quicker
• git push — force option important - not all files in the repo
are needed in production
Build
• Gulp, Grunt, Webpack.js, etc. can all be run during
deployment
• Local development can use it’s own build script
• Possible to use different tasks or build scripts for each
branch
• Allows for release management - deploy different branches
to their own server environments (stage, test, production)
Next Steps
• Do more testing with Assertible 😁
• Remove all source files and unnecessary files like readme 😎
• Create automated rollback functionality, look at symlinks 😵
• Wishlist: Visual Regression Testing with NPM/Wraith, Backstop.js 👊
Production Ready WordPress #WPLDN
Reference
Team Collaboration with Github
7 Easy Steps to Continuous Deployment
Optimize Local Development
Codeship Deployment Script
Post Deployment Smoke-Testing with Assertible
Questions
@spicecadet
edmund.turbin@wpengine.com
1 of 43

Recommended

Production Ready WordPress - WC Utrecht 2017 by
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017Edmund Turbin
1.3K views43 slides
Production ready word press by
Production ready word pressProduction ready word press
Production ready word pressEdmund Turbin
576 views43 slides
Continuous delivery with open source tools by
Continuous delivery with open source toolsContinuous delivery with open source tools
Continuous delivery with open source toolsSebastian Helzle
5.4K views24 slides
Continuous deployment steve povilaitis by
Continuous deployment   steve povilaitisContinuous deployment   steve povilaitis
Continuous deployment steve povilaitisSteve Povilaitis
380 views35 slides
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 by
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 Tikal Knowledge
2.5K views79 slides
Aiming for automatic updates - Drupal Dev Days Lisbon 2018 by
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018hernanibf
453 views27 slides

More Related Content

What's hot

Ice breaker with dev ops by
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev opsMukta Aphale
1.3K views24 slides
Magento Continuous Integration & Continuous Delivery @MM17HR by
Magento Continuous Integration & Continuous Delivery @MM17HRMagento Continuous Integration & Continuous Delivery @MM17HR
Magento Continuous Integration & Continuous Delivery @MM17HRDenis Ristic
913 views31 slides
Codecoon - A technical Case Study by
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case StudyMichael Lihs
3.7K views43 slides
Continuous Integration with Bamboo for Salesforce by
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceKlea Kolaric
5.2K views17 slides
Jenkins introduction by
Jenkins introductionJenkins introduction
Jenkins introductionGourav Varma
209 views22 slides
Bamboo Continuous Integration Server - Brief by
Bamboo Continuous Integration Server - BriefBamboo Continuous Integration Server - Brief
Bamboo Continuous Integration Server - BriefEllen Feaheny
2.6K views2 slides

What's hot(20)

Ice breaker with dev ops by Mukta Aphale
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
Mukta Aphale1.3K views
Magento Continuous Integration & Continuous Delivery @MM17HR by Denis Ristic
Magento Continuous Integration & Continuous Delivery @MM17HRMagento Continuous Integration & Continuous Delivery @MM17HR
Magento Continuous Integration & Continuous Delivery @MM17HR
Denis Ristic913 views
Codecoon - A technical Case Study by Michael Lihs
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case Study
Michael Lihs3.7K views
Continuous Integration with Bamboo for Salesforce by Klea Kolaric
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for Salesforce
Klea Kolaric5.2K views
Jenkins introduction by Gourav Varma
Jenkins introductionJenkins introduction
Jenkins introduction
Gourav Varma209 views
Bamboo Continuous Integration Server - Brief by Ellen Feaheny
Bamboo Continuous Integration Server - BriefBamboo Continuous Integration Server - Brief
Bamboo Continuous Integration Server - Brief
Ellen Feaheny2.6K views
Continuous integration using atlassian bamboo by Alexander Masalov
Continuous integration using atlassian bambooContinuous integration using atlassian bamboo
Continuous integration using atlassian bamboo
Alexander Masalov1.8K views
A Personal Journey by Michael Lihs
A Personal JourneyA Personal Journey
A Personal Journey
Michael Lihs1.2K views
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20 by Michael Lihs
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs4.5K views
Jenkins by Roger Xia
JenkinsJenkins
Jenkins
Roger Xia3.9K views
Provisioning environments. A simplistic approach by Eder Roger Souza
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
Eder Roger Souza1.6K views
Jenkins advance topic by Gourav Varma
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Gourav Varma182 views
Continuous integration & Continuous Delivery @DeVz by Denis Ristic
Continuous integration & Continuous Delivery @DeVzContinuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVz
Denis Ristic312 views
Supermondays: Jenkins CI lightning talk by Michael Peacock
Supermondays: Jenkins CI lightning talkSupermondays: Jenkins CI lightning talk
Supermondays: Jenkins CI lightning talk
Michael Peacock1.5K views
Continuous Integration, the minimum viable product by Julian Simpson
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
Julian Simpson4.3K views
Docker Best Practices Workshop by Ahmed AbouZaid
Docker Best Practices WorkshopDocker Best Practices Workshop
Docker Best Practices Workshop
Ahmed AbouZaid1.3K views
Gozengo sauce presentation by Daniel Straus
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentation
Daniel Straus149 views

Similar to Production Ready WordPress #WPLDN

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench by
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
220 views37 slides
Vagrant for Effective DevOps Culture by
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
1.6K views36 slides
Task runners + theming automating your workflow by
Task runners + theming  automating your workflowTask runners + theming  automating your workflow
Task runners + theming automating your workflowJoshua Gilmer
101 views11 slides
Deploying software at Scale by
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
2.5K views44 slides
Continuous Integration as a Way of Life by
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of LifeMelissa Benua
1.3K views24 slides
Smarter deployments with octopus deploy by
Smarter deployments with octopus deploySmarter deployments with octopus deploy
Smarter deployments with octopus deployThibaud Gravrand
1.7K views29 slides

Similar to Production Ready WordPress #WPLDN(20)

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench by Howard Greenberg
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg220 views
Vagrant for Effective DevOps Culture by Vaidik Kapoor
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
Vaidik Kapoor1.6K views
Task runners + theming automating your workflow by Joshua Gilmer
Task runners + theming  automating your workflowTask runners + theming  automating your workflow
Task runners + theming automating your workflow
Joshua Gilmer101 views
Deploying software at Scale by Kris Buytaert
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
Kris Buytaert2.5K views
Continuous Integration as a Way of Life by Melissa Benua
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of Life
Melissa Benua1.3K views
Smarter deployments with octopus deploy by Thibaud Gravrand
Smarter deployments with octopus deploySmarter deployments with octopus deploy
Smarter deployments with octopus deploy
Thibaud Gravrand1.7K views
Quality code in wordpress by Ran Bar-Zik
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
Ran Bar-Zik515 views
Magento 2 Workflows by Ryan Street
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
Ryan Street4.7K views
Build automation best practices by Code Mastery
Build automation best practicesBuild automation best practices
Build automation best practices
Code Mastery4.3K views
Introduction to jenkins by Abe Diaz
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz12.9K views
MyHeritage - QA Automations in a Continuous Deployment environment by MatanGoren
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environment
MatanGoren647 views
Continuous Integration by XPDays
Continuous IntegrationContinuous Integration
Continuous Integration
XPDays123 views
The WP Engine Developer Experience. Increased agility, improved efficiency. by WP Engine
The WP Engine Developer Experience. Increased agility, improved efficiency.The WP Engine Developer Experience. Increased agility, improved efficiency.
The WP Engine Developer Experience. Increased agility, improved efficiency.
WP Engine1.5K views
Working in Harmony: Manchester - Optimize development and content workflows by Edmund Turbin
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
Edmund Turbin1.8K views

More from Edmund Turbin

Remote Control WordPress by
Remote Control WordPressRemote Control WordPress
Remote Control WordPressEdmund Turbin
414 views52 slides
The Themer's Guide to WP-CLI by
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIEdmund Turbin
1.6K views61 slides
Configuration Management in WordPress by
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPressEdmund Turbin
2.4K views41 slides
The Themer's Guide to WP-CLI by
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLIEdmund Turbin
714 views56 slides
Customize it. by
Customize it.Customize it.
Customize it.Edmund Turbin
665 views42 slides
Theming in WordPress - Where do I Start? by
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
3.2K views41 slides

More from Edmund Turbin(10)

Remote Control WordPress by Edmund Turbin
Remote Control WordPressRemote Control WordPress
Remote Control WordPress
Edmund Turbin414 views
The Themer's Guide to WP-CLI by Edmund Turbin
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
Edmund Turbin1.6K views
Configuration Management in WordPress by Edmund Turbin
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
Edmund Turbin2.4K views
The Themer's Guide to WP-CLI by Edmund Turbin
The Themer's Guide to WP-CLIThe Themer's Guide to WP-CLI
The Themer's Guide to WP-CLI
Edmund Turbin714 views
Theming in WordPress - Where do I Start? by Edmund Turbin
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
Edmund Turbin3.2K views
Word press gets responsive 4x3 by Edmund Turbin
Word press gets responsive 4x3Word press gets responsive 4x3
Word press gets responsive 4x3
Edmund Turbin1.5K views
Scaling WooCommerce on WP Engine by Edmund Turbin
Scaling WooCommerce on WP EngineScaling WooCommerce on WP Engine
Scaling WooCommerce on WP Engine
Edmund Turbin975 views
Woo commerce scalability notes by Edmund Turbin
Woo commerce scalability   notesWoo commerce scalability   notes
Woo commerce scalability notes
Edmund Turbin1.5K views
Just For You - How to drive better engagement with localisation-based insights. by Edmund 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.
Edmund Turbin433 views

Recently uploaded

Design Driven Network Assurance by
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
15 views42 slides
virtual reality.pptx by
virtual reality.pptxvirtual reality.pptx
virtual reality.pptxG036GaikwadSnehal
14 views15 slides
Mini-Track: AI and ML in Network Operations Applications by
Mini-Track: AI and ML in Network Operations ApplicationsMini-Track: AI and ML in Network Operations Applications
Mini-Track: AI and ML in Network Operations ApplicationsNetwork Automation Forum
10 views24 slides
PRODUCT LISTING.pptx by
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptxangelicacueva6
14 views1 slide
Future of Indian ConsumerTech by
Future of Indian ConsumerTechFuture of Indian ConsumerTech
Future of Indian ConsumerTechKapil Khandelwal (KK)
22 views68 slides
Zero to Automated in Under a Year by
Zero to Automated in Under a YearZero to Automated in Under a Year
Zero to Automated in Under a YearNetwork Automation Forum
15 views23 slides

Recently uploaded(20)

Future of AR - Facebook Presentation by ssuserb54b561
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
ssuserb54b56115 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays17 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker40 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10300 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson92 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely25 views

Production Ready WordPress #WPLDN