Upgrading WordPress installation to PHP7 (WHM, Easy Apache, CentOS)

After a couple of years of hearing how HHVM was dominating other installations in speed tests, I was please when earlier this year, PHP7 was finally release. Zend claimed similar (or even greater) speed gains. But the proof is in the pudding, yes?

So I set off to install and test PHP 7 on my own hosted VPS – which I recently upgraded to CentOS7 and Easy Apache 4. After months of waiting, the folks at cPanel finally released support…

PHP7 support

Unfortunately yum install ea-php70 only installs the most basic modules to the server. You’ll need to go through an find all of the modules built for PHP7 and Easy Apache. At the moment, the only method I know of identifying which modules are available is to view them through WMH (Home >> Software >> EasyApache 4). Then you can install them via command line like so… yum install ea-php70-php-gd.

Speed Increase

So here’s the before on a site running on PHP 5.6 no caching or CDN applied.


And here’s the after with the same site running PHP 7.0 with no additional configuration of any kind.


NOTE: I had to install ea-php70-php-pdo and ea-php70-php-mysqlnd to get MySQL to work with PHP7. mysql() is deprecated in PHP7 and any plugins that rely on it will throw errors as well.

That’s a full second off and and a 43% speed increase. Sweet!