Skip to content
Diamond Sierra

PB-3008: PHP OPcache is off

Paul Bunyan code PB-3008 (Error): PHP OPcache is off. What it means and what to do.

Updated · By Diamond Sierra

On this page

What it means

PHP is re-reading and re-compiling every code file on every request. This commonly doubles or triples processor time.

What to do

Switch OPcache on in the hosting control panel (PHP settings or PHP extensions). It needs no code change.

Why it matters

PHP turns every code file into instructions before running it. OPcache keeps those compiled instructions in memory, so the work is done once instead of on every request. A WordPress site loads hundreds of PHP files per page, so without OPcache that compiling can take as long as the page itself.

How to fix it

  1. In the hosting control panel, open PHP settings or PHP extensions and switch on OPcache (often listed as opcache).
  2. Reload a few pages, then run Paul Bunyan's setup checks again.
  3. If there is no switch, ask the host. Nearly every modern host supports it; it needs no change to your site.

Details

CodeSeverityGroup
PB-3008ErrorSetup