WordPress from PHP to HHVM

This blog was using nginx+php5.5+mysql and I’ve been reading about hhvm and it`s 100% compability with WordPress.

So it’s worth to test.

OK, what I was doing is basically installing hhvm using this guide

sudo apt-get install software-properties-common
sudo apt-key add --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
sudo add-apt-repository 'deb http://dl.hhvm.com/ubuntu trusty main'
sudo apt-get update
sudo apt-get install hhvm

Since hhvm is also fastcgi compatible, all I do is changing my nginx sites configuration to

location ~ \.(hh|php)$ {
    fastcgi_keep_conn on;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  $SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
 }

Restart hhvm and restart nginx to make sure the configuration got reloaded. And done!

3 Replies to “WordPress from PHP to HHVM”

  1. Raditya Kertiyasa says:

    have you ever benchmarked your new config? very curious to know what the before-and-after numbers are…

    • Erwin M Saputra says:

      using ab and siege, It’s 3-5x times better (no caching on WP side)

  2. 1nd1r4 says:

    You’re ‘on leave’ as well from blogsphere 😀

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: