A Framework for deploying WordPress sites with Capistrano 3

16/03/2014 by Aaron Thomas

Last year, I wrote extensively about how we use Capistrano to deploy WordPress projects via Git using Capistrano. It’s something that completely changed our workflow and massively increased the speed and productivity of our development team.

Since writing that post, our Capistrano workflow has evolved massively and with the release of Capistrano 3 which made a lot of what I wrote about obsolete, we decided to rebuilt our deployment framework from the ground up.

For lack of a better name, the framework is simply called “wp-deploy” and it available on GitHub: https://github.com/Mixd/wp-deploy

Here’s a few features of wp-deploy:

  • Automates WordPress deployments on any number of environments
  • Automates database migrations between environments
  • Removes all references to development URLs in production environments (and vice versa)
  • Sychronises your WordPress uploads/ directories between environments
  • Automatically prevents non-production environments from being crawled by search engines

The framework is pretty strict about how you work with Git and WordPress, so you’ll likely need to change your own workflow somewhat for it to be effective. I wrote up some brief notes on how and why these workflow chances are necessary.

We really hope people find wp-deploy as useful as we have here at Mixd, and it would be great to get some feedback and/or ideas for improvements so be sure to drop us a line if you’re using it in your projects!