{"id":123,"date":"2017-04-05T21:00:03","date_gmt":"2017-04-06T00:00:03","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2017\/04\/instalando-hhvm-no-ubuntu\/"},"modified":"2026-09-08T02:41:28","modified_gmt":"2026-09-08T05:41:28","slug":"instalando-hhvm-no-ubuntu","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2017\/04\/instalando-hhvm-no-ubuntu\/","title":{"rendered":"Installing HHVM on Ubuntu"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro com a m\u00e3o apoiada no servidor ativo do caminho verde, apontando para o caminho cinza encerrado do HHVM\" src=\"\/wp-content\/uploads\/2026\/09\/hhvm-v3.webp\" width=\"1052\" height=\"652\" \/><\/p>\n<div style=\"background:#fff8e1;border-left:4px solid #8b1a1a;padding:.8em 1em;margin:1em 0\"><strong>Note (2026):<\/strong> the original text covered Ubuntu 14.04\/16.04 and HHVM 3.15.2 running PHP. HHVM <strong>dropped PHP<\/strong>: the 3.30 series (2018) was the last compatible one; 4.0 (11 February 2019) only runs Hack. On 27 October 2023, Meta stopped publishing official releases. For WordPress, Laravel, MediaWiki, and the rest of the PHP ecosystem, the current path is <strong>PHP 8.5 + PHP-FPM + OPcache<\/strong>. The 2017 commands remain at the end, only as history.<\/div>\n<p>In 2017, HHVM was the performance shortcut: Facebook's JIT, WordPress and Laravel faster than Ubuntu's PHP 5.6\/7.0. Nine years later, Zend Engine won the game \u2014 PHP 7, then 8, proper OPcache, JIT in 8.0, and in 2026, PHP 8.5.10 (27 August) already comes with built-in OPcache. Anyone still typing <code data-no-translation=\"\">apt install hhvm<\/code> with PHP in mind is installing a VM for another language.<\/p>\n<p><!-- more --><\/p>\n<h2>From HipHop to Hack: what HHVM was<\/h2>\n<p>Facebook grew tired of interpreting PHP in 2010. First came HPHPc: a PHP-to-C++ transpiler. Compiling the entire site at every deployment was slow, <code data-no-translation=\"\">eval()<\/code> did not exist, and the performance ceiling arrived. In 2011, Jason Evans announced the successor: HipHop Virtual Machine. Code becomes HHBC bytecode; the JIT translates it to x86-64 at runtime. In the first quarter of 2013, facebook.com abandoned HPHPc.<\/p>\n<p>Along with HHVM 3.0 (March 2014) came <strong>Hack<\/strong>: PHP with gradual typing, without <code data-no-translation=\"\">goto<\/code> and without variable variables. The VM began serving two languages. In September 2018, Fred Emmott stated the obvious \u2014 PHP 7 had diverged too far. 3.30 would be the last with PHP. On 11 February 2019, 4.0 removed <code data-no-translation=\"\">&lt;?php<\/code> from the map. Those who wanted fast WordPress stayed with PHP-FPM; HHVM remained for Meta's Hack (and, for a time, Slack's).<\/p>\n<h2>What changed since 2017<\/h2>\n<ul>\n<li>Ubuntu 14.04 and 16.04 ended. Current LTS releases: <strong>24.04<\/strong> (PHP 8.3 in the repositories) and <strong>26.04 Resolute<\/strong> (PHP 8.5 by default).<\/li>\n<li>PHP 8.5 shipped on 20 November 2025; the patch from 27 August 2026 is <strong>8.5.10<\/strong>. OPcache stopped being an optional extension \u2014 it is in the core. JIT with a default buffer of 64\u00a0MB.<\/li>\n<li>The repository <code data-no-translation=\"\">dl.hhvm.com<\/code> and the GPG key <code data-no-translation=\"\">0x5a16e7281be7a449<\/code> from this post no longer serve PHP. The later key (<code data-no-translation=\"\">0xB4112585D386EB94<\/code>) does not bring back an HHVM that runs Laravel either.<\/li>\n<li>On 27 October 2023, Paul Bissonette announced: no official releases, no GCC, the code remains on GitHub for those who compile it. There is no <code data-no-translation=\"\">apt<\/code> package reliable for PHP production.<\/li>\n<\/ul>\n<h2>2026: PHP 8.5 and PHP-FPM on Ubuntu<\/h2>\n<p>If the goal of the 2017 post was \u201cfaster PHP on Ubuntu,\u201d this is it today. On 26.04, PHP 8.5 is already in the official archive:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt update\nsudo apt install php-cli php-fpm php-mysql php-xml php-mbstring php-curl php-zip php-gd php-intl php-bcmath\nphp -v\n# PHP 8.5.x (cli) \u2026 with Zend OPcache v8.5.x\nsystemctl status php8.5-fpm --no-pager\n<\/code><\/pre>\n<p>On <strong>24.04 LTS<\/strong> the archive provides 8.3. For 8.5, Ond\u0159ej Sur\u00fd's PPA (the same one as always):<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej\/php\nsudo apt update\nsudo apt install php8.5-cli php8.5-fpm php8.5-{mysql,xml,mbstring,curl,zip,gd,intl,bcmath}\nsudo update-alternatives --set php \/usr\/bin\/php8.5\nphp -v\n<\/code><\/pre>\n<p>There is no package <code data-no-translation=\"\">php8.5-opcache<\/code>: OPcache is part of the runtime. FPM socket: <code data-no-translation=\"\">\/run\/php\/php8.5-fpm.sock<\/code>.<\/p>\n<h2>OPcache and JIT, what HHVM promised<\/h2>\n<p>The gains HHVM sold in 2016 (Kinsta, WordPress, Drupal) are delivered by PHP 8 with OPcache enabled and, for CPU workloads, with JIT. In FPM:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo tee \/etc\/php\/8.5\/fpm\/conf.d\/99-opcache.ini &lt;&lt;'EOF'\nopcache.enable=1\nopcache.memory_consumption=256\nopcache.interned_strings_buffer=32\nopcache.max_accelerated_files=20000\nopcache.validate_timestamps=0\nopcache.jit=tracing\nopcache.jit_buffer_size=64M\nEOF\nsudo systemctl restart php8.5-fpm\nphp -i | grep -E 'opcache.enable|opcache.jit'\n<\/code><\/pre>\n<p><code data-no-translation=\"\">validate_timestamps=0<\/code> in production: after deployment, restart FPM. JIT helps little with plain WordPress (database I\/O); it helps in CPU-bound sections. Do not enable Xdebug in front of JIT.<\/p>\n<h2>Nginx in front of FPM<\/h2>\n<p>HHVM spoke FastCGI. So does PHP-FPM. In Nginx, <code data-no-translation=\"\">fastcgi_pass<\/code> points to the version's socket:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-nginx\" data-no-translation=\"\">location ~ .php$ {\n    include snippets\/fastcgi-php.conf;\n    fastcgi_pass unix:\/run\/php\/php8.5-fpm.sock;\n}\n<\/code><\/pre>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt install nginx\nsudo nginx -t &amp;&amp; sudo systemctl reload nginx\n<\/code><\/pre>\n<p>Those hosting multiple sites on the same Ubuntu machine can still add a control panel on top \u2014 this blog's older coverage is in <a href=\"\/en\/2017\/04\/ispconfig3-no-debian\/\">ISPConfig on Debian<\/a> and in the <a href=\"\/en\/2017\/01\/a-historia-do-ispconfig\/\">history of ISPConfig<\/a>.<\/p>\n<h2>Still want Hack?<\/h2>\n<p>Then HHVM makes sense. Not for PHP. The runtime lives at <a href=\"https:\/\/github.com\/facebook\/hhvm\">facebook\/hhvm<\/a> (commits continue in 2026); the language at <a href=\"https:\/\/hacklang.org\">hacklang.org<\/a>. A ready-made package for current Ubuntu is not the production route: Meta no longer publishes releases. Compile from git, use an old Docker image or the company's internal binary. Extension <code data-no-translation=\"\">.hack<\/code>, typechecker <code data-no-translation=\"\">hh_client<\/code>, HTTP through built-in Proxygen or FastCGI. WordPress, Laravel, and Composer are not on that list.<\/p>\n<h2>Historical record: what this post installed in 2017<\/h2>\n<p>Ubuntu 14.04\/16.04, old GPG key, HHVM 3.15.2 speaking PHP 5 and part of 7. Do not run this on a new machine.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\"># N\u00c3O use em 2026 \u2014 chave e s\u00e9rie obsoletas\nsudo apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0x5a16e7281be7a449\nsudo add-apt-repository \"deb http:\/\/dl.hhvm.com\/ubuntu $(lsb_release -sc) main\"\nsudo apt-get update\nsudo apt-get install hhvm\nhhvm --version\n# HipHop VM 3.15.2 (rel)\n<\/code><\/pre>\n<p>The output at the time: compiler <code data-no-translation=\"\">tags\/HHVM-3.15.2<\/code>, repo schema <code data-no-translation=\"\">608339137764e8365964a1adaa7a27d125b6076f<\/code>. The original \u201cAbout HHVM\u201d still talked about \u201cHack and PHP.\u201d That phrase died in 4.0.<\/p>\n<h2>Wrap-up<\/h2>\n<p>HHVM won the argument of 2014\u20132017: JIT, Hack, facebook.com without HPHPc. PHP 7\/8 copied the performance lesson and kept the ecosystem. In 2026, on Ubuntu, <code data-no-translation=\"\">apt install php-fpm<\/code> is this how-to's successor. The orange H on the cover still belongs to the VM \u2014 but the VM now speaks Hack, not the <code data-no-translation=\"\">index.php<\/code> of your WordPress.<\/p>\n<p>The kernel underneath: <a href=\"\/en\/2026\/09\/linux-35-anos\/\">Linux turns 35<\/a>. A container around it, if applicable: <a href=\"\/en\/2026\/09\/a-historia-do-docker\/\">The history of Docker<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>In 2017, HHVM was the performance shortcut: Facebook\u2019s JIT, WordPress and Laravel running faster than Ubuntu\u2019s PHP 5.6\/7.0. Nine years later, Zend Engine won \u2014 PHP 7, then 8, a proper OPcache, \u2026 <a title=\"Installing HHVM on Ubuntu\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2017\/04\/instalando-hhvm-no-ubuntu\/\" aria-label=\"Read more about Instalando HHVM no Ubuntu\">Read more<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,2,3],"tags":[239,60,14,4,240,237,238,5],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-hhvm","category-linux","category-ubuntu","tag-hack","tag-hhvm","tag-howto","tag-linux","tag-nginx","tag-php","tag-php-fpm","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=123"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":1082,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/123\/revisions\/1082"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}