Installing Zend OpCache PHP 7 With Easy Apache 4 (WHM/CentOS)

ecently, I’ve been experimenting with various ways to speed up a server running WordPress which had gotten very sluggish, even after enabling and fine-tuning W3TC-Cache and putting it on Cloudflare. The first step was to upgrade the whole thing to PHP7 which is its own story, but (after updating some messily coded plugins) the whole thing already got quite a bit faster. Then I experimented with mod_pagespeed which is an amazing module in its own right (and deserves its own post), installed Memcached (yet another different story), but the real performance difference came into play with OpCache.

Since it took me a while to get it up and running and I couldn’t find much documentation for this specific scenario (PHP7, Easy Apache 4, CentOS) here are the key steps for massively speeding up your server running WordPress (or any PHP application for that matter).

Installing PHP Extensions Via Easy Apache 4

In WHM go to Home » Software » EasyApache 4 and click Customize

Go to PHP Extensions, search for “opcache” and enable it

Next, search for the PHP DSO handler by typing in “php70-php”. (I spent hours searching for “DSO” which didn’t bring up this result. I wish they’d rename that module so it can be found easier.)