Skip to content

OPcache Full in WordPress: How to Check and Fix It in PHP-FPM

On this page

Last updated: · By

Short answer: a full OPcache in WordPress means the memory PHP uses to store compiled code has run out, so every request recompiles files. On my Cloudways servers, with about 60 sites on PHP 8.4, the cache hit rate fell to between 4% and 71%. After support raised OPcache to 4096MB, interned strings to 256MB and the file limit to 400,000, it rose from about 56% to 98% (October 2026).

⏱ Check time: 15 minutes · Fix through support: 1–4 days in my case · Difficulty: advanced · Last checked against my tickets: 7 Nov 2026

This page is based on four real support requests I opened with Cloudways in September and October 2026 (tickets #978826, #983494, #983655, #988333). Ticket numbers, dates and response times are taken from the ticket system’s emails.

Key facts: what I saw in my tickets (September–October 2026)

OPcache stuck at 128MB (a hardcoded PHP 8.4 ini file)Hit rate about 4% (25 Sep 2026)
1GB OPcache, 100% full, about 60 applicationsHit rate 46%–71% (3 Oct 2026)
Interned stringsFull at 64MB
Uncached pages in that period2.7 to 13 seconds
The setting that finally worked (multi-site server)4096MB · 256MB · 400,000 files
Hit rate after the fixFrom about 56% to about 98%
Support’s first response time1.3 to 3.3 hours

What is OPcache and why does it matter for WordPress?

OPcache is a built-in PHP component that keeps compiled code in shared memory. Without OPcache, every request reads hundreds of PHP files of WordPress, your theme and your plugins from disk and compiles them again.

The hit rate is the share of file requests served from memory. On a healthy server it is close to 100%. When it drops, the server works harder on every page that does not come from the page cache, including the WordPress dashboard and the WooCommerce checkout.

Three settings decide whether OPcache is big enough. According to the official PHP documentation, the defaults are:

SettingWhat it controlsPHP defaultWhat worked for me (about 60 sites)
opcache.memory_consumptionSize of the shared memory for compiled code, in MB1284096
opcache.interned_strings_bufferMemory for strings that repeat in code (function names, keys)8256
opcache.max_accelerated_filesHow many files (keys) fit in the table10000400000

A detail that is easy to miss: PHP rounds max_accelerated_files up to the next prime number from a fixed list. 10,000 effectively becomes 16,229, and 400,000 becomes 524,521. The maximum is 1,000,000.

What happened on my servers? The story from the tickets

The problem showed up on two servers that hold dozens of client WordPress sites. The sites were slow specifically on pages that are not cached, and response times of 2.7 to 13 seconds kept coming back.

  1. 23 Sep 2026, ticket #977464: while investigating database crashes, I noticed that max_accelerated_files was at 10,000. That is too little for dozens of sites, because every WordPress site with plugins adds thousands of PHP files (my estimate). Support answered within about 21 minutes, but the setting was deferred to another ticket.
  2. 25 Sep 2026, ticket #978826: I raised OPcache in the platform and nothing changed. Support found that a separate PHP 8.4 ini file hardcoded 128MB. The hit rate was about 4%. First response: about 3.3 hours, and the fix was made.
  3. 2 Oct 2026, ticket #983494 (second server): 1536MB was saved in the platform, yet the server was still running with 1024MB. Interned strings were full at 64MB and the hit rate was about 55%. First response: about 1.5 hours, with a short reply that the changes were done.
  4. 3 Oct 2026, ticket #983655: a 1GB OPcache was 100% full and shared among about 60 applications on PHP 8.4. It turned out the earlier change had been made on PHP 8.2, while all the sites ran on 8.4. Even 2GB filled up within minutes. The final setting: 4096MB, 256MB for interned strings and 400,000 files, with a graceful reload. The hit rate rose from about 56% to about 98%. First response within about 1.3 hours, and the solution came after about 4 follow-up replies over 4 days.
  5. 10 Oct 2026, ticket #988333: another request for 2048MB was sent by email from an address that is not the account address, and the system rejected it automatically. The problem itself had already been solved in the earlier tickets.

The bottom line from the story: the value in the platform does not guarantee that it is the value actually running. Always check what PHP-FPM itself reports.

Why is the setting in the platform not always applied?

In my tickets there were two reasons. The first: a separate settings file for a specific PHP version (8.4) overrode the value from the platform. The second: a change made on a different PHP version from the one the sites actually run on.

According to the Cloudways server settings article, the default Opcache Memory in the platform is 64MB, and the recommendation for a server with 4GB or more is under 1024MB. That recommendation suits a server with few sites. On my server, with about 60 sites, 1GB filled up to 100%, so I asked support for higher values.

How do I check whether OPcache is full? From inside PHP-FPM, not SSH

The right check runs inside the site, through PHP-FPM. The command php -i in a terminal shows the CLI settings, which is a separate process and may get different settings. The function opcache_get_status returns the state of the shared memory.

  1. Connect over SFTP or SSH on Cloudways to the public_html folder of one of the applications.
  2. Create a file with a random, hard-to-guess name, for example oc-check-7f3k2.php, with this code: <?php $s = opcache_get_status(false); echo json_encode(['full' => $s['cache_full'], 'mem' => $s['memory_usage'], 'strings' => $s['interned_strings_usage'], 'hit' => $s['opcache_statistics']['opcache_hit_rate'], 'keys' => $s['opcache_statistics']['num_cached_keys'], 'max_keys' => $s['opcache_statistics']['max_cached_keys'], 'oom' => $s['opcache_statistics']['oom_restarts']]);
  3. Open the file in the browser and note the results.
  4. Delete the file right away. It exposes information about the server.
What you seeWhat it means
full = trueThe memory has run out. Increase memory_consumption
strings: free_memory close to 0Interned strings are full. Increase interned_strings_buffer
keys close to max_keysThe file limit has run out. Increase max_accelerated_files
oom greater than 0 and risingOPcache is resetting because there is no room. That wipes the whole cache
hit below 90%Check the three items above
mem.used_memory does not match the value in the platformThe setting was not applied. Contact support with the data

How do I increase OPcache on Cloudways, step by step?

Start in the platform, and if the value is not applied, go to support. The setting is at server level, not application level.

  1. Log in to the platform, choose the server, and under Server Management choose Settings & Packages.
  2. Find the Opcache Memory field, choose a higher value and click Save Changes. More detail on the other fields is in the guide to server settings on Cloudways.
  3. Wait a few minutes and run the PHP-FPM check from the previous section again.
  4. If used_memory and buffer_size did not change, or you need interned strings or max_accelerated_files, open a support request from the platform.
  5. In the request, state the PHP version your sites actually run on, the output of opcache_get_status and the values you want. Ask for a graceful reload of PHP-FPM.
  6. After the reply, check again yourself. In my case it took several rounds before the right values were running on the right version.

A template for the request: “All apps on this server run PHP 8.4. opcache_get_status from inside PHP-FPM shows cache_full=true, memory 1024MB, hit rate 55%. Please set opcache.memory_consumption, opcache.interned_strings_buffer and opcache.max_accelerated_files for the PHP 8.4 FPM pools to the values below and do a graceful reload.”

Black Friday80% off
80% off 2 months of managed hosting

The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.

The offer ends on December 4, 2026 at 23:59 (UTC+2).

Ends in—days—hours—minutes—seconds
Code:
Grab the 80% now

Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.

After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator

How much OPcache do you need? Don’t copy my numbers

4096MB fit a server with about 60 sites on the same PHP version. For one site or a few sites it is a waste, because that memory is taken from the server’s RAM and is no longer available to MariaDB and PHP-FPM.

  • One or two sites: start with the values the platform recommends for the server size, and measure.
  • An agency server with dozens of sites: increase gradually. On mine, even 2GB filled up within minutes.
  • The rule: increase until cache_full stays false and oom_restarts does not rise for a full day. More than that adds nothing.

Before you increase it, check how much RAM is free. The full memory calculation for a WordPress server is in the guide on how much RAM a WordPress site needs, and if you are short on memory, see scaling a server on Cloudways.

Which common mistakes stop OPcache from working?

Checking from the CLI: php -i in a terminal does not show what the site gets. Check from a PHP file that runs on the site.

Changing the wrong PHP version: in my case the change was made on 8.2 while the sites ran on 8.4. Check each application’s version before you contact support, using the guide to changing the PHP version.

Raising memory without the file limit: if max_accelerated_files stays at 10,000, the memory can be half empty and the cache still “full” in terms of keys.

Confusing OPcache with the object cache: OPcache stores code. Redis and Object Cache Pro store query results. You need both, and one does not replace the other.

Emailing support from a different address: ticket #988333 was rejected because it was sent from an address that is not the account address. Open requests from the platform.

What is the prevention checklist?

  • After every PHP version change, run the opcache_get_status check again.
  • After adding several sites to the same server, compare num_cached_keys with max_cached_keys.
  • Keep all the sites on a server on the same PHP version when you can. That way there are fewer settings pools to manage.
  • Write down the values support set, with the date and ticket number. If something resets after an update, you have proof.
  • Track uncached page times in application monitoring. A sudden jump is sometimes an OPcache that filled up.

Don’t want to manage this yourself? That is part of the reason I run my own site on Cloudways. See what my site runs on and my Cloudways review.

Frequently asked questions

How do I know OPcache is full?

Run opcache_get_status from a PHP file on the site and check cache_full. If it is true, or oom_restarts keeps rising, the memory has run out. Checking from the terminal is not enough, because the CLI is a separate process.

What is a normal OPcache hit rate?

On a stable server it is close to 100%. In my case the fix raised it from about 56% to about 98%. If it stays under 90% for a long time, check memory, interned strings and the file limit.

Why did I change Opcache Memory in the platform and nothing happened?

In my tickets this happened twice. Once a separate PHP 8.4 ini file overrode the value, and once the change was made on a different PHP version. Check the value from inside PHP-FPM and contact support with the data.

Can I change interned_strings_buffer on Cloudways myself?

In my case it was done through support, because it is a server-level setting. Ask for the value together with the right PHP version, and ask for a graceful reload of PHP-FPM.

Does increasing OPcache slow the server down?

No, but it takes RAM. Memory allocated to OPcache is not available to the database and PHP processes. Increase it only until the cache stops filling up.

How long did Cloudways support take to fix it?

The first response came after 1.3 to 3.3 hours in my tickets. The full fix on the large server took 4 days and several rounds of clarification, because at first the change was made on a different PHP version.

Sources

Official source: How to Manage Your Server Settings (Cloudways Knowledge Base). Written and checked by Asael Dreyer · Updated: 7 Nov 2026

Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details

Picture of Asael Dreyer
Asael Dreyer

Hi, I'm Asael Dreyer, CEO of an SEO agency that runs hundreds of websites hosted on dozens of Cloudways servers.
Everything you will find here comes from hands-on experience, mine and my teams', straight from the field: from the guides to the recommendations. All to help you get the most out of Cloudways.

More about me →

Need help? Got a question about your server or this guide? Write to us and we will get back to you.

More guides on this topic:
מפריד
Thanks for your message!
We will get back to you soon.
Ready to get started?

Sign up with the coupon code ASAEL