A very interesting problem occurred with one of the clients’ sites. Despite the use of the caching plugin, the first load of any page on the site occurred without caching (cache does not work on first load, caching error).

When checking the issue, we found out that when the WordPress site is loaded for the first time, the uncached version of the page is actually loaded. On subsequent page refresh or switching to the internal pages of the site, the caching plugin worked correctly, the cache was loaded, and the loading was fast. That is, at first, the caching plugin did not work at all. Some advanced plugins may even notify that the DONOTCACHEPAGE constant is active, but you won’t be able to find it in standard places.

The reasons for this behavior of the caching plugin may be different; in this particular case, the customer explained that shortly before the issue was detected, he added another language version of the site using the Polylang plugin. This is exactly what we proceeded from.

As a result, our suspicions were confirmed, the Polylang plugin function “Detect browser language” was activated on the site, in the description of which it is written: “As this doesn’t work if it is cached, Polylang will attempt to disable the front page cache for known cache plugins.”

To restore the normal operation of caching on the site, you must:

  1. Disable the function of the Polylang plugin “Detect browser language”.
  2. Open the settings of the previous item “URL Modifications” and click the “Save changes” button.
  3. Clear the cache in your caching plugin.

If you also need to fix errors in the caching plugins on your WP-site, then fill out the form following the link or contact us in any convenient way (contacts).

Leave a comment

Your email address will not be published.