Slide 1

Slide 1 text

A WordPress Development Workflow

Slide 2

Slide 2 text

Josh Betz UW - Madison, 2013 Code Wrangler, Automattic @joshbetz

Slide 3

Slide 3 text

Develop locally against trunk

Slide 4

Slide 4 text

git-svn git svn clone -s http://core.svn.wordpress.org git svn rebase

Slide 5

Slide 5 text

git in git Use a new repository for each theme or plugin

Slide 6

Slide 6 text

Automate your Environment

Slide 7

Slide 7 text

Goal: Quickly set up a dev environment that looks like a server

Slide 8

Slide 8 text

My solution: Vagrant + Puppet

Slide 9

Slide 9 text

Install VirtualBox https://www.virtualbox.org/wiki/Downloads

Slide 10

Slide 10 text

RVM curl -L https://get.rvm.io | bash -s stable

Slide 11

Slide 11 text

gem install vagrant Vagrant

Slide 12

Slide 12 text

Puppet gem install puppet

Slide 13

Slide 13 text

Vagrant::Config.run do |config| end Vagrantfile config.vm.box = "precise64” config.vm.network :hostonly, '10.10.4.20' config.vm.provision :puppet, :module_path => "puppet/modules" do |puppet| puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "base.pp" end

Slide 14

Slide 14 text

Vagrant::Config.run do |config| end Vagrantfile config.vm.box = "precise64” config.vm.network :hostonly, '10.10.4.20' config.vm.provision :puppet, :module_path => "puppet/modules" do |puppet| puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "base.pp" end

Slide 15

Slide 15 text

Vagrant::Config.run do |config| end Vagrantfile config.vm.box = "precise64” config.vm.network :hostonly, '10.10.4.20' config.vm.provision :puppet, :module_path => "puppet/modules" do |puppet| puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "base.pp" end

Slide 16

Slide 16 text

Vagrant::Config.run do |config| end Vagrantfile config.vm.box = "precise64” config.vm.network :hostonly, '10.10.4.20' config.vm.provision :puppet, :module_path => "puppet/modules" do |puppet| puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "base.pp" end

Slide 17

Slide 17 text

Vagrant::Config.run do |config| end Vagrantfile config.vm.box = "precise64” config.vm.network :hostonly, '10.10.4.20' config.vm.provision :puppet, :module_path => "puppet/modules" do |puppet| puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "base.pp" end

Slide 18

Slide 18 text

Vagrant Boxes http://vagrantbox.es

Slide 19

Slide 19 text

Puppet Script service { 'php5-fpm': ensure => running, require => Package['php5-fpm'] } package { 'nginx': ensure => present } service { 'nginx': ensure => running, require => Package['nginx'] } package { 'php5-fpm': ensure => present }

Slide 20

Slide 20 text

Puppet Script service { 'php5-fpm': ensure => running, require => Package['php5-fpm'] } package { 'nginx': ensure => present } service { 'nginx': ensure => running, require => Package['nginx'] } package { 'php5-fpm': ensure => present }

Slide 21

Slide 21 text

Puppet Script service { 'php5-fpm': ensure => running, require => Package['php5-fpm'] } package { 'nginx': ensure => present } service { 'nginx': ensure => running, require => Package['nginx'] } package { 'php5-fpm': ensure => present }

Slide 22

Slide 22 text

Puppet Script service { 'php5-fpm': ensure => running, require => Package['php5-fpm'] } package { 'nginx': ensure => present } service { 'nginx': ensure => running, require => Package['nginx'] } package { 'php5-fpm': ensure => present }

Slide 23

Slide 23 text

My Files https://github.com/joshbetz/WCMKE-2013-Vagrant-Puppet

Slide 24

Slide 24 text

Run It vagrant up

Slide 25

Slide 25 text

Why is this useful?

Slide 26

Slide 26 text

Automate your Development

Slide 27

Slide 27 text

Developer Plugin http://wordpress.org/extend/plugins/developer/

Slide 28

Slide 28 text

Theme Unit Test http://codex.wordpress.org/Theme_Unit_Test

Slide 29

Slide 29 text

Underscores http://underscores.me/

Slide 30

Slide 30 text

Thanks!

Slide 31

Slide 31 text

jbe.me/2f0 Slides