Automated WordPress deployment strategies
July 11, 2014 6:28 AM   Subscribe

I'm trying to help my team establish an automated workflow for managing WordPress sites (themes, plugins, databases, the whole shebang). This is going to be a long journey and I need advice on what tools will give us the easiest entry point to a long-term solution. Capistrano? Grunt? Other? Lots of special details inside.

My team is starting from hardcore cowboy coding practices: no team-wide source control, direct FTP uploads to production environments, etc. This is going to be a long journey, so I am looking for suggestions on the minimal toolset necessary to start building good habits. However, I am willing to push them over a slightly higher learning curve initially if necessary to avoid needing to dump our first toolset in a year once we've outgrown our current process.

For added difficulty, we need to be able to manage multiple WordPress multisite installations on multiple servers. Some code needs to eventually end up in production in several WordPress installations, while other elements (like a child theme) will only need to go to a single production destination.

Short-term, I'd like a toolset that allows us (forces us) to send code through a source control repository and push it to a staging server. Once testing is done there, code can be pushed to the live production environment. I'd also like the ability to do quick rollbacks if something breaks. The third short-term goal is automated database backups with the ability to do a quick redeploy of a recent copy of the database (say 24 hours old or less) if necessary.

Longer term, I'd like this workflow to expand to accomodate CSS preprocessing, JS minifying, etc. server maintenance, cloning production servers for testing purposes, etc. But for now, simply keeping track of what is live and controlling the live environment so we can respond quickly when something breaks is my highest priority.

My team has reached the point of admitting that our current workflow sucks, but there is not enough experience with all the options out there to start sorting through what makes sense. On the source control side, we are leaning towards Git repositories. For deployment tools, I've read about both Capistrano and Grunt, but I don't have enough technical knowledge to figure out if they are complimentary tools, two different tools providing the same functionality, or whether either meets our needs. So, I'm looking for recommendations on a solid, minimal toolchain that I can advocate for in order to solve some short-term problems and put us on solid footing for later expansion.
posted by philosophygeek to Computers & Internet (2 answers total) 6 users marked this as a favorite
Capistrano and Grunt

I haven't heard of either of those before, but they look somewhat language specific for Ruby and JS.

I'd recommend a general continuous integration (CI) system like Jenkins (née Hudson) or TeamCity. These tools can watch your source repositories and then run any numbers of tasks, ranging from simple file copy procedures to kicking off your preprocessing and minifying.

System administration is trending towards server automation with tools like Chef or Ansible. These tools treat your servers as commodities that can be replaced at any time - like viewing servers as livestock instead of a hand-raised pet. That's definitely a direction to aspire to, but may be a little out of reach for your purposes.

Coming from a similar situation you describe, I set up GitLab with TeamCity, and it's done wonders for us. I locked down any direct access to the servers, and now files can only be transferred via TeamCity builds. Git commits automatically trigger dev builds and deploys, and then we can manually launch production builds.
posted by Nonsteroidal Anti-Inflammatory Drug at 8:07 AM on July 11, 2014 [1 favorite]

There's a paid screencast about Deploying WThere's a paid screencast about Deploying WordPress with Capistrano.
ordPress with Capistrano.

The Bedrock Stack might also be worth looking into.
posted by Sharcho at 4:54 AM on July 12, 2014

« Older How do I get over deep anger at my spouse over...   |   Overnight stay in Redwoods near San Jose Newer »
This thread is closed to new comments.