HHVM for Varying Vagrant Vagrants: WordPress Development on Speed

hhvmhack

Are you looking to add HHVM to Varying Vagrant Vagrants? HHVVVM is a new HHVM configuration for WordPress developers who currently have dev environments set up using VVV.

HHVVVM, though it sounds oddly similar to an STD, is a configuration created by John James Jacoby, which you can fork for your own use.

If you already have VVV up and running, you can set up a new HHVM-powered VVV site by following Jacoby’s directions in the readme.txt file of the project. The process is fairly straightforward:

  1. Create a __hhvvvm directory in the www directory of your VVV checkout
  2. Clone HHVVVM into the new __hhvvvm directory
  3. Create a jjj.dev directory in the www directory of your VVV checkout
  4. Install WordPress using the WP Skeleton approach by Mark Jaquith
  5. In terminal, cd to the www directory of your VVV checkout
  6. In terminal, run vagrant provision
  7. Visit jjj.dev/wp-admin/ in your favorite browser

Why HHVM?

HHVM (HipHop Virtual Machine) is a PHP execution engine based on the HipHop language runtime, created by Facebook in order to make their infrastructure more efficient. Facebook invented it out of necessity, with hopes of being able to mitigate the growing costs of hardware. The company was able to achieve ridiculous performance improvements in the neighborhood of 6X and released HHVM 3.0 in late March.

Kinsta, a WordPress managed hosting company, has an excellent article explaining the previous hurdles of running WordPress with HHVM, along with instructions for installing or compiling HHVM on Ubuntu and Nginx.

WordPress 3.9 greatly improves HHVM compatibility, so many developers have started to experiment with it and have achieved some insanely fast load times. Hold onto your hats, folks:

https://twitter.com/markjaquith/statuses/458294601129144320

https://twitter.com/markjaquith/statuses/458297336410951680

Hosting companies are gradually starting to adopt HHVM, as many believe that it will soon revolutionize PHP. It’s been tested with the top 25 Github PHP frameworks and the HHVM team has lofty goals to run all existing PHP code out in the wild. If you want to start testing WordPress with it now, VVV users can fork Jacoby’s HHVVVM configuration, or you can set it up manually on your server via the instructions from Kinsta.

9

9 responses to “HHVM for Varying Vagrant Vagrants: WordPress Development on Speed”

  1. HHVM is awesome! Fortunately there are a lot of awesome projects in the PHP world lately, HHVM is definitely one of them! The team’s choice to go the FastCGI way makes it easy enough to switch to Nginx+HHVM from an Nginx+PHP-FPM setup (for example).
    One thing I’d really like to see in the future, although I’m almost sure it won’t happen (at least not in the foreseeable future): to run child processes with a different user and group, it would be great for security on shared environments.
    And thanks for mentioning my blog post / tutorial, Sarah! :)

    • It’s not a different user or group, but I do have my test site setup to use PHP-FPM for my admin panel and HHVM for my front-end. I did this as I’m not sure how stable HHVM is just now, so I figured I may as well use the older slower PHP-FPM approach in the admin panel where performance isn’t as mission critical.

      • That’s true Bjørn, and it could be used as a workaround, however it takes around 500MB of RAM to start one process, even with a powerful dedicated server that would deplete resources quickly… :-/ And also based on my (somewhat limited) understanding of how HHVM works, this would actually be a lot less optimized because all processes would have to recreate the map of the translated code pieces instead of tapping the same database.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.