WP Cloudflare Super Page Cache not working

Hi,

I got this error message after installing and testing the cache with the plugin WP Cloudflare Super Page Cache:

Page caching is working for static page but seems not working for dynamic pages.
Error on dynamic page (https://estudiowls.com.ar): Cache status: BYPASS - CloudFlare has the instruction not to cache this resource. It has been served directly from origin. www.estudiowls.com.ar/*

I have this rules set on CloudFlare:

Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://estudiowls.com.ar/$1)

2 http://estudiowls.com.ar/
Always Use HTTPS

3 https://estudiowls.com.ar/*
Cache Level: Cache Everything

I tried disabling the first two rules but no improvement.
I also cleared the cache several times and navegated in incognition mode.

I am using WP ROCKET, Autoptimize and Vanish.

Can you help me please with this issue?

Thanks in advance

Okay, first things first.

  1. WP Cloudflare Super Page Cache is not an official Cloudflare plugin for WordPress
  2. WP Rocket seems to have some issues and needs a proper configuration for Cloudflare to work (and you are using it in combination with 1) ).
  3. Autooptimize plugin while WP Rocket has got similar options, and while CSS, HTML, JS Minify are the options available at Cloudflare too.
  4. All that with Varnish cache?
  5. And Cloudflare Cache Everything option is being enabled.
  6. Page Rule for redirection from HTTP to HTTPS (while not knowing what is with non-www and/or www)

Kind of a, from my opinion, way too much “cache” in the air to work with.

May I ask what do you want to achieve with a cache for your WordPress installation/instace?

I am afraid you would need to either remove some of them or disable one by one to resolve your issue regarding a Page Rule for redirection from HTTP to HTTPS?, or properly configure each one to make sure it all works as you want it.

Regarding HTTP and HTTPS, may I ask what SSL option have you got selected under the SSL tab/settings page for your domain at Cloudflare dashboard?

  • Full SSL, Flexible SSL …

Moreover, do you have Always Use HTTPS option enabled and Automatic HTTPS redirection option also enabled?

Nevertheless, can you check if your WordPress installation was done on HTTP or HTTPS? (SITE URL and HOME URL value)

For WP Rocket:

1 Like

O-oh, I am sorry, I missed at first sight, you have more than one Page Rule. Okay.

May I ask which cache have you cleared?

  1. Cloudflare cache?
  2. WP Cloudflare Super Page Cache?
  3. Autooptimize cache?
  4. WP Rocket cache?
  5. Varnish cache?

Hi, thanks for your reply.
I did not know that it was not an official plugin.
I had used vanish before going to Cloudflare, and I thought that Vanish works onliy when CloudFlare does not.

When clearing the cache I cleared all of the in this order
WP ROCKET
Vanish
Cloudflare

Do you see something wrong regarding the rules set?

When I ‘curl’ that URL, I get a status of DYNAMIC, which is expected in default configuration. As @fritexvz indicated, layered caching is not advised. Just looking at the headers shows at least 3 potential caches. You have two or three active, and it sounds like you want Cloudflare to cache it as well.

Thanks a lot.

I decided to deactivate the plugin.

Under a free plan is there a way to cache all pages using just 3 rules? (I see on cloudflare dashboard that a 20% of page are being served by the server)

I can confirm W3 Total Cache plugin for WordPress can work with 3 Page Rules (one of them being Cache Everything) on a Free plan (including the below listed caches).

  • if you can setup and enable just a Page Cache you are good to go. Even more better, also to have Browser Cache, Database Cache, Object Cache, OPCode cache - which depend on the packages like redis, memcached, php zend, php-opcache, etc. which you could install on your host/origin server, or if using cPanel you can try to activate them and see if they work
  • even just Page Cache is more than enough in some of my cases …

Just to note, if you have news Website and Google AMP, you should disable the Rocket Loader option, otherwise you would get errors shown up at Google Search Console.

  • A better approach is to get a Pro plan and setup a little bit one-two more more Page Rules regarding your /amp/ URLs, while still keeping most of optimization like Polish, Mirage, etc. with specific /amp/ Page Rule where you disable Rocket Loader on your /amp/ URLs only and having Rocket Loader working for normal URls of your your domain

Case No. 1:
Example of Page Rules on Free plan: Rocket Loader being enabled and using W3TC (all the mentioned caches) + Cloudflare:

Case No. 2:
Example of Page Rules on Pro plan: Rocket Loader being enabled for URLs, but not enabled for /amp/ URLs, using W3TC (all the mentioned caches) + Cloudflare (here I bypass AMP URLs just because, but I can cache everything on them too):

If interested in W3TC and Cloudflare setup, a great guide for it can be found here:

Moreover, I also use on some of my WordPress instances a WP Super Cache plugin (different one than yours) with no Page Rules at Cloudflare, working good so far.

Just to add here, I have Cache Standard and having Cloudflare “Respect Existing Origin Cache Headers” option selected in both cases (that are setup by W3TC - Browser Cache):

Regarding cache percentage, 60-70% at Cloudflare dashboard (Case No 2., due to AMP URLs being bypassed).

And, if I continue, I am afraid this would be out of the scope of this forums.

Hopefully you would find a caching solution for your WordPress install, maybe not even using W3TC, maybe with your WP Cloudflare Super Cache plugin or some other combination.

Case #1 doesn’t make sense to me. Rule 1 is for the apex domain/* with a bunch of settings, including Cache Everything. Then Rules 2 & 3 are for a subdomain, such as www. These are most definitely not the same site, as there’s no overlap in the Matching URL.

1 Like

@sdayman :+1: good point, I now just saw having that for one of my domains.

EDIT: Could be intentionally having like that, because I checked now and see the next:

  1. One WordPress install on www.domain.com (having non-www to www)
  2. Second WordPress install on subA.domain.com
  3. Third WordPress install on subB.domain.com
  4. Some CDN stuff serverd from cdn.domain.com (using on www.domain.com)
  • www, subA and subB having W3TC setup and the Page cache is working for all of them

EDIT 2: Okay, got the point here. Obviously caching was not working as it should as “Cache Everything” and things from 1st rule did not apply for sub-domains as it was planned.

Now changed 1st rule and working:

cf-cache-status MISS -> now it is HIT

Case No. 3 (having AMP URLs, using Free Plan, but disabled the Rocket Loader), having non-www to www:

1 Like

Thanks a lot to both of you, you are the best!!!
I will try all these suggestions

PS. I am not using AMP (I tried 4 months ago but I disabled it since the results were bad to me)

2 Likes