Heroku WP: A Template for Installing and Running WordPress on Heroku

wp-and-heroku

Over the past few months, WordPress developers have been experimenting with speeding up PHP execution with HHVM (HipHop Virtual Machine) and have achieved some amazingly fast load times. HHVM compatibility with WordPress is gradually improving and more hosting companies are moving to adopt it, as many believe that HHVM will soon revolutionize PHP.

Changes in WordPress 3.9 helped to improve compatibility with HHVM and, as a result, a few WP + HHVM templates have popped up, including a new one for Heroku fans. Heroku WP is a template for installing and running WordPress on the Heroku cloud application platform with the official Heroku stack.

Automattic engineer Xiao Yu created Heroku WP with the goal of keeping it simple, fast, secure, and scalable. He used Heroku’s new PHP buildpack which incorporates nginx and HHVM. Heroku WP is built on top of the following:

  • nginx – For serving web content
  • HHVM – A virtual machine designed to serve Hack and PHP
  • MySQL – Provided by the ClearDB add-on
  • Memcached – Provided by the MemCachier add-on
  • Composer – A dependency manager to make installing and managing plugins easier

The Heroku WP template also bundles Jetpack, SendGrid, caching plugins, SSL Domain Alias to send WP admin traffic to Heroku over SSL directly, and a couple of other plugins. You can include additional plugins and/or upgrade versions by updating the composer.json file.

2.5X Improvement in WordPress Response Times with Heroku WP

Yu reports that with the new nginx + HHVM Heroku buildpack, his updated template for WordPress has seen more than 2.5X improvement in response times when compared to the old Heroku LAMP stack. His personal site is actually running on the template. “It feels a lot faster navigating WP admin and page generation times look much better,” he said.

The template is not just for small blogs. Yu built Heroku WP with cloud architecture in mind, so that the number of Dynos can scale without breaking. If you’ve been looking for a quick way to experiment with WordPress on NGINX + HHVM, the Heroku WP template is an excellent starting point. Follow Yu’s instructions for installing, configuring and deploying WordPress to Heroku.