Any good resources/advice on using Capistrano to deploy EE sites?

3 Answers 3


I've previously used Capistrano to deploy EE sites, though I've recently moved to using the web based DeployHQ as it doesn't require SSH access or for Git to be installed on the server, while still allowing rollbacks (based on SHAs/commits).

That said, here is a Gist of the last version of my cap recipe for deploying E via Git+SSH. This was based an amalgam the HiveLogic post linked in @Janvi's answer as well as This ShapeShed post and some bits from This GitHub repo too, all updated for EE2.

As such it also has a bunch of extra tasks for doing things like getting a SQL dump from the remote server, and importing it locally which you may or may not want. Feel free to make use of it if you can, but as I'm no longer using it I can't really help support it.

Link to Gist of Capistrano Recipe

NB This recipe assumes that you are bootstrapping your config and making full use of config vars to move all paths (inc uploads) out of the DB. I have an extended version somewhere which runs the SQL dump through a migration script to fix any missed paths and empty tables that aren't needed across imports, such as exp_sessions etc

EDIT: There's also this article on deploying EE 2 with Capistrano

  • 1
    Perhaps this is a little off topic, but I'd second the vote for DeployHQ. I wouldn't want to run Git on production servers and frequently have to work with client's servers where I couldn't if I wanted to. It's simple, reliable and also quite a bit more affordable than the likes of Beanstalk if you manage lots of sites.
    – Dom Stubbs
    Nov 27, 2012 at 12:35
  • A further nice trick with DeployHQ is that you can use a post-receive hook in GitHub/BitBucket/CodebaseHQ to trigger a deploy - super handy for staging servers.
    – Tom Davies
    Nov 27, 2012 at 12:56
  • Dom Stubbs, it's possible to run Capistrano without having Git installed on the production server. Capistrano is firstly an automation tool which has a lot of built in commands that make it easier to use than shell scripts. There's a lot you can do without using an SCM. Dec 2, 2012 at 5:38

FWIW, I wrote a blog post (and made a video) on the topic relatively recently. The resources already mentioned are really great, but perhaps my write-up will help too.



A quick google search lead me to this:

DEPLOYING EXPRESSIONENGINE FROM GITHUB WITH CAPISTRANO http://hivelogic.com/articles/deploying-expressionengine-github-capistrano

Seems like this should cover most of it.

  • That resource is for EE1.x and thus pretty out of date
    – Tom Davies
    Nov 27, 2012 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.