I have a plugin that somehow seems to be caching even though I have disabled cache in Firefox per these instructions:


I have also tried browsing in Private Window (like Chrome incognito).

In wp-config I have

define('WP_CACHE', false);

In the plugin's config file I have


No matter what I do, I notice it takes a couple minutes for edits in .php files to actually result in a change to the rendered broswer content.

Read that with wordpress server side cacheing can be quite tricky to fully disable.

Here is what I did as sanity check:

I edited a php file and included an echo statement with the word whattheheck. I refreshed the page, saw the text wqhattheheck then removed that echo statement and refreshed again and the page still displays whattheheck for several minutes after which point a refresh does not show the text.

I tried this after removing the echo statement:

grep -rwl “whattheheck” /var/www/mysite

which returned nothing. I also did a database dump and used

grep -n '/path/wordpress.sql' -e 'whattheheck'

which returned nothing. This is happening in all browsers, even say, Safari, where the first time I open the page in question it displays the text whattheheck. So there is absolutely no browser cache going on.

So, what we have here is a genuine mystery that begs the question:

If no text file within the site root contains the text that I previously added to a php file, and the wp_options table doesn't contain the text (nor any other table), then how on earth is it that the page keeps showing this text for about 3 minutes after I remove the echo statement that produces the text?

Really curious. It is almost as if wordpress (or plugin) reads a file into memory and uses the memory stored version of the file for some time, which could explain what I am seeing. That is, I edit a file (in my case in PHPStorm), upload it, and wordpress or plugin uses previously loaded version of the file. But I have never read that this happens in wordpress.



  • Is opcache and php file cache active on the server? – Knut Sparhell Oct 6 '19 at 12:43
  • Here is what I see: opcache.file_cache no value no value opcache.file_cache_consistency_checks 1 1 opcache.file_cache_only 0 0 opcache.file_update_protection 2 2 opcache.force_restart_timeout 180 180 So I guess this must be what is happening and the 180 corresponds to the 3 minutes I am noticing before changes take effect. The things is, on a Laravel site of mine I don't see this effect as I see changes immediately. So curious is there somewhere in wordpress where certain opcache settings are implemented? – Brian Oct 6 '19 at 14:34
  • WordPress has no settings for opcahce. – Knut Sparhell Oct 6 '19 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.