Site Health: Page Cache is not detected but the server response time is OK

[ad_1]

My original question about this got locked, so I am unable to post the solution I found. Therefore, I am posting my original question as well as the Nginx solution to this problem so it may be of use to others.

ORIGINAL QUESTION (https://projectdmc.org/support/topic/site-health-page-cache-is-not-detected-but-the-server-response-time-is-ok/):

I am running wordpress on a private Ubuntu 20.04 LEMP Server. On the server side, I have the nginx pagespeed plugin running, fastcgi_cache, as well as redis activated (with the server side redis installed and the wordpress redis plugin installed). I am also using nginx helper plugin to clean the cache after page updates and posts. I have no wordpress caching plugins installed or activated.

However, ever since a recent update to wordpress, I am getting the following error in the site health screen:

Page Cache is not detected but the server response time is OK

My question is, does this wordpress health check message take into account server side caching with pagespeed (nginx plugin), fastcgi, and redis?

If so, does this mean that none of these server side utilities are using page caching? How can I then enable page caching (server side or otherwise).

If not, how can I verify that I am indeed using server side page caching in wordpress on Ubuntu Server 20.04?

SOLUTION:

To solve this so that wordpress detects the fastcgi caching with nginx, i had to modify my Nginx Virtual Hosts file and add some headers to the server block. My Nginx virtual host file now looks (partially) like this:

server {

        # Fix the "Page cache is not detected but the server        
        response time is OK" message in the WordPress Health screen
        add_header Cache-Control "no-cache";
        add_header x-cache-enabled "true";

Or even better (Mores specific to fastcgi):


server {

    location ~ \.php$ {
        add_header Cache-Control "no-cache";
        add_header x-cache-enabled "true";
  • This topic was modified 1 minute ago by danrancan.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer