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

  1. Create an info.php file in the site folder with one line:
<?php phpinfo();
  1. Open https://your-domain.com/info.php in your browser and find the Zend OPcache section: the "Opcode Caching" line should say "Up and Running".
  2. 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.
Questions and answers
No. On hosting with cPanel and ISPmanager it is enabled by default.
OPcache picks up changes within a couple of seconds. If the old version is visible longer, clear the CMS or caching plugin cache and reload the page with Ctrl+F5.
Usually there is no need, and it would only slow the site down. If it interferes with a script, contact support.