Hip Hop Virtual Machine (HHVM)

Hip Hop Virtual Machine (HHVM) is Facebook’s PHP replacement, and it’s faster than PHP. Since it doesn’t work perfectly with all WordPress themes and plugins, it’s an opt-in feature that you can enable by contacting support. Choosing HHVM disables your ability to choose PHP (and that means phprc files no longer apply). As of WordPress 3.9 and HHVM 2.0, there are no hacks needed to make WP and HHVM make beautiful music together.

HHVM is only available for DreamPress customers.


As of February 2017, HHVM is being phased out and is no longer available through the panel. If you wish to enable HHVM, please contact support.


At this time, ini.php customizations of HHVM, which are synonymous with phprc/php.ini changes, are not supported.

Common commands


[server]$ /etc/init.d/hhvm restart

Run command line scripts with HHVM

[server]$ hhvm whatever.php


To view any errors associated with HHVM, check your site's error.log file. View the following article for instructions on how to access this file:

HHVM has a debugger called hphpd that is can be used to debug a running program or used as a standalone line-by-line scratch pad for simple testing. Invoke hphpd by typing the following at the command line:

[server]$ hhvm -m debug [filename]

Using a filename is optional. Debugging HHVM and code conflicts is currently not provided as a part of DreamHost support.

For more information, see the GitHub Repository for the debugger.

Connecting to your database

Since PHP is disabled if you choose to enable HHVM, you CANNOT perform any of the following actions:

  • Create a custom PHP.ini file
  • Access your database via phpMyAdmin
  • Access your database using a PHP script

If you need to access your database, it must be done via SSH using the 'mysql' command-line tool. Visit the following tutorial for further details:



It’s fast. Faster than PHP by a mile.

Why Beta/Opt-in?

Because while it’s fast, it’s also not going to work with all WP plugins and themes, and not with all setups.

Is it compatible with PHP?

Right now, one of the goals is 100% compatibility with PHP, so all your existing PHP code will continue to function. There are no signs this will change in the future.

What will it help?

Sites where users are logged in, like bbPress and BuddyPress, or stores where caching is often sketchy at best. Since it processes faster than PHP, those get a kickstart.

Who should use it?

Only people who are comfortable debugging site errors. This is why it's an opt-in feature.

Who should NOT use it?

People who are not technical savvy should not be using HHVM.

How much will DreamHost support assist with errors?

It’s currently in beta. Users are expected to be able to troubleshoot any errors that may arise. DreamHost support may help you confirm if the issue is related to a plugin, however support cannot debug why a plugin is causing an error.

Is HHVM better than PHP 7?

Both PHP 7 and HHVM perform remarkably similar in most tests, including tests with WordPress. If you’re concerned about full compatibility with all plugins and themes, PHP 7 is the better choice at this time.

Advanced developer information

You may install HHVM on your own VPS if you like.

These packages are required to get HHVM to work properly. Default packages referenced are for packages that are available upstream and aren’t necessarily special. The non-default packages referenced are extremely custom packages that have been backported by various sources. They are only installed on the image for DreamPress and shouldn’t be needed in future versions of HHVM.

Default packages needed

git-core gawk cmake g++ libmysqlclient-dev libxml2-dev libmcrypt-dev libicu-dev openssl build-essential binutils-dev libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev autoconf automake libtool libcurl4-openssl-dev wget memcached libreadline-dev libncurses-dev libmemcached-dev libbz2-dev libc-client2007e-dev php5-mcrypt php5-imagick libgoogle-perftools-dev libcloog-ppl0 libelf-dev libdwarf-dev subversion python-software-properties libmagickwand-dev libxslt1-dev ocaml-native-compilers libevent-dev gawk libyaml-dev gperf

Non default packages needed

ndn-hhvm_3.5.2-1_amd64.deb google-glog_0.3.3-11_amd64.deb icu-doc_52.1-2_all.deb libicu52-dbg_52.1-2_amd64.deb libicu52_52.1-2_amd64.deb libicu-dev_52.1-2_amd64.deb 
icu-devtools_52.1-2_amd64.deb jemalloc_3.6.0-2_amd64.deb cpp-4.8_4.8.1-2ubuntu1~12.04_amd64.deb g++-4.8_4.8.1-2ubuntu1~12.04_amd64.deb gcc-4.8-base_4.8.1-2ubuntu1~12.04_amd64.deb
gcc-4.8_4.8.1-2ubuntu1~12.04_amd64.deb gcc-4.9-base_4.9.2-0ubuntu1~12.04_amd64.deb libasan0_4.8.1-2ubuntu1~12.04_amd64.deb libatomic1_4.9.2-0ubuntu1~12.04_amd64.deb
libcloog-isl4_0.18.2-1~12.04_amd64.deb libgcc-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb libisl10_0.12.2-2~12.04_amd64.deb libitm1_4.9.2-0ubuntu1~12.04_amd64.deb
libstdc++-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb libtsan0_4.9.2-0ubuntu1~12.04_amd64.deb binutils-gold_2.22-6ubuntu1.3_amd64.deb
cpp-4.8_4.8.1-2ubuntu1~12.04_amd64.deb libboost1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb
g++-4.8_4.8.1-2ubuntu1~12.04_amd64.deb libcloog-isl4_0.18.2-1~12.04_amd64.deb
gcc-4.8-base_4.8.1-2ubuntu1~12.04_amd64.deb libgcc-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
gcc-4.8-doc_4.8.1-2ubuntu1~12.04_all.deb libgcc1-dbg_1%3a4.9.2-0ubuntu1~12.04_amd64.deb
gcc-4.8-locales_4.8.1-2ubuntu1~12.04_all.deb libgcc1_1%3a4.9.2-0ubuntu1~12.04_amd64.deb
gcc-4.8_4.8.1-2ubuntu1~12.04_amd64.deb libgomp1-dbg_4.9.2-0ubuntu1~12.04_amd64.deb
gcc-4.9-base_4.9.2-0ubuntu1~12.04_amd64.deb libgomp1_4.9.2-0ubuntu1~12.04_amd64.deb
libasan0-dbg_4.8.1-2ubuntu1~12.04_amd64.deb libicu-dev_4.8.1.1-3ubuntu0.5_amd64.deb
libasan0_4.8.1-2ubuntu1~12.04_amd64.deb libicu48_4.8.1.1-3ubuntu0.5_amd64.deb
libatomic1-dbg_4.9.2-0ubuntu1~12.04_amd64.deb libisl10_0.12.2-2~12.04_amd64.deb
libatomic1_4.9.2-0ubuntu1~12.04_amd64.deb libitm1-dbg_4.9.2-0ubuntu1~12.04_amd64.deb
libboost-date-time1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb libitm1_4.9.2-0ubuntu1~12.04_amd64.deb
libboost-date-time1.49.0_1.49.0-2ubuntu1~precise3_amd64.deb libmudflap0-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
libboost-filesystem1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb libmudflap0-dbg_4.8.1-2ubuntu1~12.04_amd64.deb
libboost-filesystem1.49.0_1.49.0-2ubuntu1~precise3_amd64.deb libmudflap0_4.8.1-2ubuntu1~12.04_amd64.deb
libboost-program-options1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb libquadmath0-dbg_4.9.2-0ubuntu1~12.04_amd64.deb
libboost-program-options1.49.0_1.49.0-2ubuntu1~precise3_amd64.deb libquadmath0_4.9.2-0ubuntu1~12.04_amd64.deb
libboost-regex1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb libstdc++-4.8-dev_4.8.1-2ubuntu1~12.04_amd64.deb
libboost-regex1.49.0_1.49.0-2ubuntu1~precise3_amd64.deb libstdc++-4.8-doc_4.8.1-2ubuntu1~12.04_all.deb
libboost-serialization1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb libstdc++6-4.8-dbg_4.8.1-2ubuntu1~12.04_amd64.deb
libboost-serialization1.49.0_1.49.0-2ubuntu1~precise3_amd64.deb libstdc++6_4.9.2-0ubuntu1~12.04_amd64.deb
libboost-system1.49-dev_1.49.0-2ubuntu1~precise3_amd64.deb libtsan0-dbg_4.9.2-0ubuntu1~12.04_amd64.deb
libboost-system1.49.0_1.49.0-2ubuntu1~precise3_amd64.deb libtsan0_4.9.2-0ubuntu1~12.04_amd64.deb

See also

Did this article answer your questions?

Article last updated .