Enterprise WordPress tools for seriously demanding WordPress websites.
For quite a few years now we've been offering professional hosting and tools for Drupal. And although we've always been aware we were basically working on a LAMP stack environment that could be portable, we never really tested the water until recently. As the WordPress and Drupal communities begin to collaborate more and more, as major users of PHP, it makes sense we move to collaborate with WordPress developers as well. So I spent the last couple of weeks refactoring our devops scripts for Drupal so they work with WordPress.
This is possible thanks to the excellent WP-CLI tool (for Drupal readers, this is like drush for WordPress) which presents the kind of Linux command line commands you need to do things like install a site, backup a database, flush the object cache, and so on - automatically with a script. Knowing this would be essential for providing meaningful deployment tools and devops for WordPress developers, our first task was to get WP-CLI packaged so it could be deployed to our Debian servers by Puppet. To that end, our Argentina-based sysadmin, Adrian, created a deb package of the latest version (0.18 at time of writing) which is publicly available in the Code Enigma Debian repository. He also created a Puppet module, so we could quickly and easily add WP-CLI to any server with a single include on that server's manifest file (its DNA, stored as a text file in our Git repository).
Next stop was the scripts themselves. We have pretty advanced Drupal deployment scripts which we've developed over 4 years of tweaking and fine-tuning. Happily, with WP-CLI at our fingetips my task was reasonably straightforward. I did my homework, understanding how WordPress deals with uploaded assets, configuration files and so on, and simply re-wrote our Drupal scripts, swapping drush commands for WP-CLI commands where applicable, and creating the correct symbolic links to configs and upload folders at build time. It took a few days to get it right, but the result is a fantastic time-saver for WordPress developers who deploy code often to remote servers.
There was a bit more to iron out, for example, finding a suitable Varnish VCL for the reverse proxy (our current VCL is Drupal specific) and working out which WordPress plugins support our in-built Memcached layer, but all that was reasonably simple to research, thanks to the strong WordPress developer community. But with i's dotted and t's crossed, all there is left to say is take a look: