OPcache on Hosting: What It Is and How to Check It
OPcache is a PHP module that keeps already compiled site code in memory. Repeated requests are handled faster: WordPress and other CMS pages open noticeably faster, often 2–4 times.
How to enable it
On hosting with cPanel and ISPmanager, OPcache is enabled by default for current PHP versions — there is nothing to do.
How to check
- Create an
info.phpfile in the site folder with one line:
<?php phpinfo();- Open
https://your-domain.com/info.phpin your browser and find the Zend OPcache section: the "Opcode Caching" line should say "Up and Running". - Delete
info.php— do not leave it on the site.
File changes
OPcache checks files every few seconds. If you edit a PHP file, the change appears on the site almost immediately — wait a couple of seconds and reload the page. If you still see the old version, the page is most likely served from the CMS or caching plugin cache: clear it in the site admin panel.
What else speeds up a site
- a current PHP version — 8.2 or newer, if the site supports it;
- a page caching plugin for WordPress;
- compressed images and fewer heavy plugins.