OPcache for PHP: The Quiet Booster Behind Every WordPress Site
26/07/2026
There is one optimisation that speeds up almost every PHP site, costs nothing, and yet most site owners do not even know it exists: OPcache. If you run WordPress, WooCommerce or any PHP application, OPcache is probably already there working quietly in the background — and if it is not, turning it on is one of the highest-return moves you can make for speed.
What happens without OPcache
PHP is a language that is "interpreted" on every call. When a visitor opens a page, the server takes your PHP code, translates it into a machine-readable form (bytecode), and only then executes it. The problem: that translation happens again for every single request, even though the code has not changed. For WordPress, where thousands of lines of core and plugin code run on every load, that is a huge amount of wasted work.
What OPcache changes
OPcache compiles your PHP code once, stores the finished bytecode in memory, and on subsequent requests uses it directly — with no re-compilation. The result is that the server sheds a large part of the work on every load. In practice this means PHP executing 2 to 3 times faster and a noticeably lower TTFB. For a WordPress site this often shows up as page generation time dropping from 400 ms to 150 ms, without a single change to the content.
How to check whether it is on
The easiest way is to install a server-info tool, or in the WordPress admin under Tools → Site Health → Info look for the PHP section. If you see "Zend OPcache" listed as active, everything is working. On quality hosting OPcache is enabled and correctly configured by default, so you never have to touch it.
Key settings worth knowing
- memory_consumption: how much memory the cache may use. For a larger site with many plugins, 128–256 MB is a healthy value.
- max_accelerated_files: how many files may be cached. WordPress has many files, so 10,000+ makes sense.
- validate_timestamps: in production you can reduce change-checking to make the cache even faster, but then you must clear the cache after every code change.
OPcache is not the same as page cache
It is important not to confuse OPcache with page caching. OPcache speeds up the execution of PHP code; a page cache stores finished HTML so PHP does not run at all. The two work together, and you get the best result when both are active. We wrote more about caching in the article what is caching explained simply, and the memory-cache layers are covered in our guide to WordPress Transients API caching. PHP speed also depends on the PHP version itself — newer PHP is faster and uses OPcache better.
What we offer
At SEOhosting.rs OPcache is enabled and optimised on every plan, together with the latest PHP versions, a LiteSpeed server and NVMe disks. You do not have to be a developer to have a fast site — it all works out of the box. Take a look at our hosting plans or read more about WordPress hosting built for speed.