Introduction to automated WordPress deployments
by
Carl Alexander
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Introduction to automated WordPress deployments
Slide 2
Slide 2 text
Carl Alexander
Slide 3
Slide 3 text
@twigpress
Slide 4
Slide 4 text
carlalexander.ca
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
Let’s play a game
Slide 7
Slide 7 text
What do you do when you have to update a WordPress site? Let’s play a game…
Slide 8
Slide 8 text
Press the upload button Let’s play a game…
Slide 9
Slide 9 text
Mash the refresh button Let’s play a game…
Slide 10
Slide 10 text
Sigh when everything loads! Let’s play a game…
Slide 11
Slide 11 text
Pretty stressful way to work Let’s play a game…
Slide 12
Slide 12 text
You should be able to deploy code as often as you want Let’s play a game…
Slide 13
Slide 13 text
That’s where automated WordPress deployment comes in Let’s play a game…
Slide 14
Slide 14 text
Makes updating WordPress safer Let’s play a game… (But not bulletproof!)
Slide 15
Slide 15 text
Focus on shipping bug fixes and new features Let’s play a game…
Slide 16
Slide 16 text
What is it?
Slide 17
Slide 17 text
Part of a larger set of practices called DevOps What is it?
Slide 18
Slide 18 text
Moves code between deployment environments What is it?
Slide 19
Slide 19 text
For us, that’s moving our code from our computer to a server What is it?
Slide 20
Slide 20 text
Been doing this from day 1 What is it? (Just by hand)
Slide 21
Slide 21 text
What is it?
Slide 22
Slide 22 text
Workflow
Slide 23
Slide 23 text
Tools are important Workflow
Slide 24
Slide 24 text
But so is your workflow Workflow
Slide 25
Slide 25 text
Just a set of good habits Workflow
Slide 26
Slide 26 text
Version control system
Slide 27
Slide 27 text
Lots of tools require it Version control system
Slide 28
Slide 28 text
Has a lot of other benefits Version control system
Slide 29
Slide 29 text
History of all your code changes Version control system
Slide 30
Slide 30 text
Version control system
Slide 31
Slide 31 text
Also stores your code Version control system
Slide 32
Slide 32 text
Version control system • Bitbucket • GitHub • GitLab
Slide 33
Slide 33 text
Necessary for some automated deployment systems Version control system
Slide 34
Slide 34 text
Better collaboration too Version control system
Slide 35
Slide 35 text
No need to share your files Version control system
Slide 36
Slide 36 text
Lets anyone deploy code Version control system
Slide 37
Slide 37 text
Scary, but removes gatekeepers Version control system
Slide 38
Slide 38 text
Testing
Slide 39
Slide 39 text
Common to have testing with automated deployment Testing
Slide 40
Slide 40 text
Unit tests, traditional QA or both Testing
Slide 41
Slide 41 text
Derisks your workflow Testing
Slide 42
Slide 42 text
Helps you deploy code more often Testing
Slide 43
Slide 43 text
Reminder: this isn’t bulletproof Testing
Slide 44
Slide 44 text
Automated deployment prevents error deploying code Testing
Slide 45
Slide 45 text
But not deploying bad code Testing
Slide 46
Slide 46 text
Multiple environments
Slide 47
Slide 47 text
Testing and staging environments Environments
Slide 48
Slide 48 text
Testing is for… testing Environments
Slide 49
Slide 49 text
Staging mirrors production Environments
Slide 50
Slide 50 text
Lets clients preview changes Environments
Slide 51
Slide 51 text
Also to test high-risk operations Environments
Slide 52
Slide 52 text
Requires almost no extra effort Environments
Slide 53
Slide 53 text
Run into fewer problems Environments
Slide 54
Slide 54 text
Questions
Slide 55
Slide 55 text
Implemention
Slide 56
Slide 56 text
Hosts
Slide 57
Slide 57 text
Easiest option Hosts
Slide 58
Slide 58 text
Also costliest Hosts
Slide 59
Slide 59 text
How does it work?
Slide 60
Slide 60 text
How does it work?
Slide 61
Slide 61 text
Push to host repository How does it work?
Slide 62
Slide 62 text
Deploys your code to server How does it work?
Slide 63
Slide 63 text
Available hosts
Slide 64
Slide 64 text
Can be narrow or broad category Available hosts
Slide 65
Slide 65 text
Lots of hosts offer git support Available hosts
Slide 66
Slide 66 text
Most aren’t set up by default Available hosts
Slide 67
Slide 67 text
Only covering the ones that have it set up for you Available hosts
Slide 68
Slide 68 text
Leaves us with two hosts Available hosts
Slide 69
Slide 69 text
Pantheon and WP Engine Available hosts
Slide 70
Slide 70 text
Services
Slide 71
Slide 71 text
Cheaper alternative Services
Slide 72
Slide 72 text
Flexibility to chose your host Services
Slide 73
Slide 73 text
How does it work?
Slide 74
Slide 74 text
How does it work?
Slide 75
Slide 75 text
Service like GitHub mandatory How does it work?
Slide 76
Slide 76 text
Push to GitHub repository How does it work?
Slide 77
Slide 77 text
Allows for complex deployments How does it work?
Slide 78
Slide 78 text
Available services
Slide 79
Slide 79 text
Lots of services out there Available services
Slide 80
Slide 80 text
Only focus on two Available services
Slide 81
Slide 81 text
DeployBot and DeployHQ Available services
Slide 82
Slide 82 text
Plugins
Slide 83
Slide 83 text
Final option Plugins
Slide 84
Slide 84 text
Different from what we’ve seen Plugins
Slide 85
Slide 85 text
Can’t deploy a WordPress site Plugins
Slide 86
Slide 86 text
Only plugins and themes Plugins
Slide 87
Slide 87 text
How does it work?
Slide 88
Slide 88 text
How does it work?
Slide 89
Slide 89 text
Connects plugins and themes How does it work?
Slide 90
Slide 90 text
Let’s you install or update by hand How does it work?
Slide 91
Slide 91 text
Webhook required for automation How does it work?
Slide 92
Slide 92 text
How does it work?
Slide 93
Slide 93 text
Plugin is blind without webhook How does it work?
Slide 94
Slide 94 text
Available plugins
Slide 95
Slide 95 text
GitHub updater and WP Pusher Available plugins
Slide 96
Slide 96 text
Both plugins are almost identical Available plugins
Slide 97
Slide 97 text
The big difference is the price Available plugins
Slide 98
Slide 98 text
Questions
Slide 99
Slide 99 text
Do it yourself
Slide 100
Slide 100 text
More complicated to do Do it yourself
Slide 101
Slide 101 text
But also free Do it yourself
Slide 102
Slide 102 text
Remote repository
Slide 103
Slide 103 text
Works like hosts seen earlier Remote repository
Slide 104
Slide 104 text
Push code to repository to deploy Remote repository
Slide 105
Slide 105 text
Offered by some WordPress hosts Remote repository
Slide 106
Slide 106 text
Webhook
Slide 107
Slide 107 text
Similar to the services from earlier Webhook
Slide 108
Slide 108 text
Install custom webhook endpoint Webhook
Slide 109
Slide 109 text
Push code to GitHub Webhook
Slide 110
Slide 110 text
Also supported by some hosts Webhook
Slide 111
Slide 111 text
Deployment tools
Slide 112
Slide 112 text
Almost every language has a tool Deployment tools
Slide 113
Slide 113 text
Deployment tools
Slide 114
Slide 114 text
Your computer does all the work Deployment tools
Slide 115
Slide 115 text
Also requires server configuration Deployment tools
Slide 116
Slide 116 text
Not possible with regular hosts Deployment tools
Slide 117
Slide 117 text
Two server configuration projects support this kind of deployment Deployment tools
Slide 118
Slide 118 text
DebOps and Trellis Deployment tools
Slide 119
Slide 119 text
Taking the stress out
Slide 120
Slide 120 text
Lots of options available to you! No stress
Slide 121
Slide 121 text
Most aren't that complicated No stress
Slide 122
Slide 122 text
Never fear deploying code again No stress
Slide 123
Slide 123 text
Questions
Slide 124
Slide 124 text
Thank you!