Your browser doesn't appear to support impress js, I sincerely suggest you come back in Chrome.

Jonathan D. Johnson

I am a Developer and Operations Engineer that is in love with building, learning, and teaching.

I help build things and automate processes at Crowd Favorite

The
Big Red
Button

Stress Free WordPress Deployment

A deployment is the process of moving code updates into your production environment.

Common deployment strategies include

Manual processes in the typical FTP deployment workflow

You select the files you are going to upload.

Stressors

You drag them over the server window of your FTP client.

Stressors

You release the files.

One by one, each file is transferred into place sequentially.

Stressors

What to do now?

Going forward, how do you minimize the risk?

Lets plan for a future where we're all just as stupid as we are today. Dan Milstein (@danmil)
allthethings

We're programmers, professional automators.

We can do better.

capistrano

Capistrano runs commands remotely via an SSH connection on one or more remote servers. These commands comprise a set of recipies that have been battle hardened to provide a reliable and repeatable process to confidently deploy your web site or application.

capistrano-wp

A Capistrano plugin used for deploying WordPress specifically.

$> cap deploy
$> cap deploy:rollback

Releases

A release is the result of a Capistrano deployment, the resulting webroot containing your project and it's latest changes.

Capistrano builds up a new release directory for every deployment and retains a defined number of previous releases, each with their own self contained directories.

Symlinks

Capistrano uses the power of symlinks maintain directory structures that need to be shared accross all releases.

It also uses a symlink to specify the current release.

shared/

  • ███████████████

releases/

201308291323/

  • █████████████████████████
  • ██████████████████████

201310292312/

  • █████████████████████████
  • ██████████████████████

www

shared/

  • ███████████████

releases/

201308291323/

  • █████████████████████████
  • ██████████████████████

201310292312/

  • █████████████████████████
  • ██████████████████████

201311030421/

  • █████████████████████████
  • ██████████████████████

www

shared/

  • ███████████████

releases/

201308291323/

  • █████████████████████████
  • ██████████████████████

201310292312/

  • █████████████████████████
  • ██████████████████████

201311030421/

  • █████████████████████████
  • ██████████████████████

www

Additional Capistrano Features

Capistrano-WP Features

Requirements

Installation

capistrano-wp is distributed in the form of a Ruby Gem.

RubyGems is the standard package manager for Ruby and is included in Ruby 1.9 and later.

Ruby and RubyGems are pre-installed on the later versions of OSX and installers are available for Windows environments.

(sudo) gem install capistrano-wp

Setting up a project

cd path/to/project
capify-wp .

This will create a Capfile and a group of config files under the config/ directory.

There are a few items in these files that will need to be modified for your project and deployment targets.

These files should be commited to version control.

Demo

Takeaways

Slides - jondavidjohn.com/wcphx14

Capistrano-WP - github.com/crowdfavorite/gem-capistrano-wp



@jondavidjohn

Use spacebar, arrow keys or page up / down to navigate

Tweet