Super Page Cache for Cloudflare

Description

Why Choose This Plugin?

The Super Page Cache for Cloudflare plugin helps you to make your website blazing fast by taking the website caching to the next level. This plugin will help you to cache not only the static files (e.g. CSS, JS, images etc.) but also the HTML webpages generated by WordPress; both at server disk-level and to the global Cloudflare CDN.

Moreover, this plugin works completely out of the box, all you need to do is provide your Cloudflare Account’s API Key or API Token details and the plugin will do the rest. But if you are a curious/advanced user, there are detailed settings inside the plugin which you can tweak to make it work as you like. But for most users, you don’t need to change any settings as this plugin will work perfectly with the default settings, out of the box.

Unlike most caching plugin out there which only provides disk caching (i.e. the cached webpages will be served from your web-server), this plugin will cache your webpages and static files to the Cloudflare CDN, one of the fastest CDN networks in the world.

With more than 200 CDN edge locations provided by Cloudflare, your webpage will be served from the nearest CDN location of the visitor, rather than sending the request to your web server which might be sitting on the other side of the world. This will reduce your website loading speed drastically thanks to taking advantage of the Cloudflare CDN, not only for the static files but also for the HTML webpages. Take a look at the review video below by IdeaSpot, which will give you a clear idea about the plugin before you install it.

How does the plugin work?

This plugin takes full advantage of the FREE Cloudflare Plan, so to use this plugin, you don’t need a paid Cloudflare account. But if you like to use features like Cloudflare image optimization, WAF (Web Application Firewall) etc. then you have to pay for the Cloudflare Pro plan to enable those features in your Cloudflare account.

The free Cloudflare plan allows you to enable a page cache by entering the Cache Everything page rule, greatly improving response times. However for dynamic websites such as WordPress, it is not possible to use this page rule without running into problems as it is not possible to exclude critical web pages from the cache, the sessions for logged in users, ajax requests and much more. Thanks to this plugin all of this becomes possible.

This plugin enable page caching on your website by taking advantage of either the Cloudflare Cache Everything page rule or using Cloudflare Worker. By default the Cloudflare Worker mode is disabled as it is not 100% free like the Cache Everything page rule. But you can enable it if you like.

The Cloudflare Worker based solution will help you to have a clean page caching solution without any cache buster query string (/?swcfpc=1) for logged-in users. Moreover, you can also overwrite our default worker code to add your own custom login into it if you are an advanced user.

You will be able to significantly improve the response times of your WordPress website by taking advantage of the very fast Cloudflare cache also for HTML pages, saving a lot of bandwidth. The alternative to this plugin is to purchase and configure the Enterprise plan.

Plugin Features

  • Developed to work flawlessly with any Cloudflare Plan (be it Cloudflare Free or Pro or Business or Enterprise account)
  • Takes full advantage of Cloudflare Cache Everything Page Rule
  • Cache Buster Support to ensure logged-in users don’t see cached content
  • Page Caching by using Cloudflare Worker (alternate to page rule solution, needs to be manually activated in plugin settings)
  • No Cache Buster when using Cloudflare Worker based Page Caching solution
  • Ability to overwrite our default Worker code to add your own custom login into it
  • Disk level fallback cache system for the requests which might not yet beed cached by CLoudflare or has been expired in Cloudflare cache (plugin settings – Cache tab)
  • Ability to select and customize what you want to cache and what you don’t (plugin settings – Cache tab)
  • Fallback cache in which you can retain your custom response header data (most plugins removes them)
  • Automatically purge the post/page/CPTs when you update them along with the related pages where they might be sentence
  • Ability to purge only HTML pages of your website rather than purging everything (HTML pages + static contents)
  • Ability to preload pages based on page urls, sitemaps, last 20 published/updated contents
  • Run the preloader manually (from plugin settings) or over a CRON job
  • Ability to automatically purge Varnish cache (if your server has Varnish enabled) when Cloudflare cache is purged
  • Automatically purge OPcache & object cache when Cloudflare cache is purged
  • Purge the whole Cloudflare cache using CRON job
  • Give Cloudflare cache purge permission based on user roles
  • Auto prefetch URLs present in Viewport
  • Auto prefetch URLs on mouse hover (by using instant.page script)
  • Ability to keep the plugin settings on deactivation (needs to be enabled in plugin settings – Others tab)
  • Export/Import plugin settings as JSON
  • Ability to purge Cloudflare cache from WP Admin toolbar
  • Ability to exclude page from being cached on individual page/post bases (Turn off the Disable metaboxes on single pages and posts option in plugin settings – Others tab)
  • Integration to many popular host’s (e.g. Kinsta, WP Engine, SpinupWP) internal server caching
  • Integration to popular eCommerce systems like WooCommerce and Easy Digital Downloads (EDD) [plugin settings – Third Party tab]
  • Integration to countless third-party plugins (e.g. Autoptimize, W3 Total Cache, LiteSpeed Cache, Hummingbird, WP Optimize, WP Rocket, WP Asset Clean Up, WP Performance, Yet Another Star Rating, Swift Performance, SIteground SuperCacher etc.)
  • Detailed FAQ section covering all kind of questions (plugin settings – FAQ tab)

Not just these, we are constantly working towards adding new useful features to the plugin all the time. So, your love and support is what keep us going. If you love using the plugin, please consider sharing your review in the review section.

Important Notice

If you are using this plugin in conjunction with other page caching plugins like WP Rocket, LiteSpeed Cache, W3 Total Cache etc. please ensure that the page caching feature is disabled on those plugins, as the page caching will be handled by this plugin only. While you can use those other plugins for your static assets (e.g. CSS, JS, images etc.) optimization.

You can also use plugins like Autoptimize, Perfmatters, ShortPixel to optimize your static assets while using this plugin for page caching. This plugin do not provide any static assets optimization and we have no plans to support that in future as there are many great quality plugins that handle that matter very well.

If you are an advanced user/developer, you will be pleased to know that this plugin is 100% jQuery free and compatible with all versions of WordPress and all WordPress themes.

If you are using Kinsta as your hosting provider, this plugin works flawlessly with Kinsta’s Server Level Caching and this plugin has also been thoroughly tested on Kinsta Servers to ensure it is fully compatible with Kinsta Server Caching.

Moreover if you are using any hosting platform for whom we support their native server caching (i.e. Kinsta, WP Engine, SpinupWP etc.) you don’t have to enable our fallback cache system, as you can use the native disk cache provided by your host instead of using our disk level fallback cache.

Screenshots

  • This screen shot description corresponds to screenshot-1.jpg Step 1 – Enter your Cloudflare’s API Key and e-mail
  • This screen shot description corresponds to screenshot-2.jpg Step 2 – Select the domain
  • This screen shot description corresponds to screenshot-3.jpg Step 3 – Enable the page Cache

Installation

FROM YOUR WORDPRESS DASHBOARD

  1. Visit “Plugins” > Add New
  2. Search for Super Page Cache for Cloudflare
  3. Activate Super Page Cache for Cloudflare from your Plugins page.

FROM WORDPRESS.ORG

  1. Download Super Page Cache for Cloudflare
  2. Upload the “wp-cloudflare-super-page-cache” directory to your “/wp-content/plugins/” directory, using ftp, sftp, scp etc.
  3. Activate Super Page Cache for Cloudflare from your Plugins page.

FAQ

How this plugin is different from Cloudflare APO?

Cloudflare have launched Automatic Platform Optimization (APO) feature in 2020 which works with the default Cloudflare WordPress plugin. APO works by taking advantage of Cloudflare Workers & KV Storage. As APO uses KV to store the cached content, one of the feature it has is that when something is cached via APO, it instantly get pushed to all the Cloudflare edges around the world, even though no requests has came from that region.

Our plugin is created to ensure even the Cloudflare FREE account users can take full advantage of Cloudflare CDN caching, so we provide both option (page rule based – which is the default mode) and the Worker based. Now Cloudflare Worker is not 100% free like the page rules so for very high traffic site, users might need to pay to use the Cloudflare Workers.

That being said, CF APO costs 5$/month for free account holders and it is free for paid account users. But still it lacks many features, functionality and third-party plugin integration compared to our plugin. The feature and integration provided by our plugin is simply unmatched by APO. Currently we can’t push the cache everywhere like APO but we are planning to do something similar in near future. If you are still curious, read this thread where you will find a detailed comparison with Cloudflare APO vs this plugin.

How do I know if everything is working properly?

To verify that everything is working properly, I invite you to check the HTTP response headers of the displayed page in Incognito mode (browse in private). Super Page Cache for Cloudflare returns two headers:

x-wp-cf-super-cache

If its value is cache, Super Page Cache for Cloudflare is active on the displayed page and the page cache is enabled. If no-cache, Super Page Cache for Cloudflare is active but the page cache is disabled for the displayed page.

x-wp-cf-super-cache-active

This header is present only if the previous header has the value cache.

If its value is 1, the displayed page should have been placed in the Cloudflare cache.

To find out if the page is returned from the cache, Cloudflare sets its header called cf-cache-status.

If its value is HIT, the page has been returned from cache.

If MISS, the page was not found in cache. Refresh the page.

If BYPASS, the page was excluded from Super Page Cache for Cloudflare.

If EXPIRED, the page was cached but the cache has expired.

Do you allow to bypass the cache for logged in users even on free plan?

Yes. This is the main purpose of this plugin.

What is the swcfpc query variabile I see to every internal links when I’m logged in?

It is a cache buster. Allows you, while logged in, to bypass the Cloudflare cache for pages that could be cached.

Do you automatically clean up the cache on website changes?

Yes, you can enable this option from the settings page.

Can I restore all Cloudflare settings as before the plugin activation?

Yes, there is a reset button.

What happens if I delete the plugin?

I advise you to disable the plugin before deleting it, to allow you to restore all the information on Cloudflare. Then you can proceed with the elimination. This plugin will delete all the data stored into the database so that your WordPress installation remains clean.

What happens to the browser caching settings on Cloudflare?

You will not be able to use them anymore. However, there is an option to enable browser caching rules

Does it work with multisite?

Yes but it must be installed separately for each website in the network as each site requires an ad-hoc configuration and may also be part of different Cloudflare accounts.

Can I use this plugin together with other performance plugins such like Autoptimize, WP Rocket or W3 Total Cache?

Yes, you can. Read the FAQ section in the plugin settings page for further information

I have more questions or Something is not working, what can I do?

First check the questions mentioned in the FAQ tab inside the plugin settings page, as you will find most of the questions already answered there. If that still doesn’t help, Enable the log mode and send us the log file and the steps to reproduce the issue. Make sure you are using the latest version of the plugin.

Reviews

Hunyo 16, 2024 1 reply
… it’s tricky to set up!You might have noticed that 80% of the reviews give 5 stars to this plugin. Aye, it well deserves them! And then there are a few who simply say “doesn’t work” or “does nothing” or “same error as reported 5 years ago” and just give one star. There is not much in-between! How come?The explanation is easy.WordPress users come in all forms and shapes, and that also means quite different levels of know-how. Many entry-level cache plugins are very easy to set up: install it, click a checkbox to “enable cache”, and in 90% of the cases, that’s all you need to do. Some give you a few options to further tweak your setup, but these are mostly optional and/or “advanced usage” for the very few that really need them.This is the case of the free, built-in cache plugins already being offered by many hosting providers. They are installed automatically when WordPress is installed. They are also automatically configured. The end-user doesn’t need to do much, and, in many cases, they’re not even aware that a cache plugin is being used — everything works transparently and effortlessly.Obviously, that level of simplicity comes with a catch: you can’t really optimise much in terms of caching. It’s a one-size-fits-all-but-probably-none situation. In many cases, turning off the hosting provider’s plugin and adding your own will give you the possibility of tweaking things further, beyond what an automatic configuration can do.And then there is the other extreme of the spectrum: W3 Total Cache. The cache plugin that has everything and does everything. You can precisely configure the most minute details of your whole caching framework (because, well, it doesn’t limit itself to caching pages — it does pretty much everything). W3 Total Cache goes even further, actively looking for “improvement” tools that it can use and which might be running on your server — and allows you to activate them. Selectively. So you can use a Redis cache for some things (such as, say, object cache) but let the page cache stay on disk; or write some rules to get some elements automatically sent to a CDN, while keeping others local. It does support Cloudflare, too (as well as many, many other providers). In fact, it would be hard to think of anything that W3TC does not support or doesn’t allow to be configured.So why isn’t everybody using it, if it’s that good?Well, W3TC is impossibly hard to configure. Or, rather, you can do it, but it will be a nightmare to “get it right”. You might be “overtweaking” your configuration (it happened to me all the time!) and, as a consequence, W3TC would even slow down your system. You can miss a crucial parameter and throw your site offline in a second. And sure, you can make a copy of all the configuration settings that you have carefully preserved over the years, hoping to avoid all the trouble the next time you configure another WP installation. Well, good luck with that. It’s highly likely that a different WP site will, well, require different configurations. Some WP sites have zero JavaScript, but complex CSS; others have minimalistic CSS, but very clever JavaScript tricks, such as partially loading bits of content instead of a full page. Tweaking W3TC for each of those scenarios can be completely different and may require you to dump your “favourite” configuration and just start from scratch again. Oh, and that’s until your end-user decides to switch themes and/or add new plugins. Then you have to do everything from scratch — again.Not everybody has that amount of free time, nor the enthusiasm and dedication required to keep W3TC operating smoothly. It’s simply too complex to configure and maintain. As a result, most sites using W3TC ae not as optimised as they could be.Enter Super Page Cache for Cloudflare.This plugin, in terms of complexity and the ability to fine-tune several performance parameters, is closer to W3TC and further away from the “generic” page cache plugin pre-installed by hosting providers. In other words: there is a lot to configure until you “get it right”. The “reasonable defaults” that it starts with are… well, reasonable, sure, in the sense that they will not blow up your website, but the performance enhancements will not be dramatic.That’s as it should be, because the heavy-duty work is not being done by WordPress, nor even by Super Page Cache for Cloudflare; indeed, most is being done on Cloudflare’s side. And this is the right way to do it! Super Page Cache for Cloudflare essentially prepares WordPress to correctly interface with Cloudflare and leverages on what Cloudflare already provides (for free) in order to seriously accelerate your website.In other words…There is a limit to how much you can tweak your website locally. The “best of the best” caching plugin cannot magically wave some metrics away. If you’re hosting in the US, but your clients connect from Europe, there is no way to tweak and fine-tune your caching plugin so that European users get faster access to your website. There is a limit to how fast data can be transferred between the two sides of the Atlantic — ultimately, the speed of light. You cannot get faster than that! So, at best, you can hope for a local optimal configuration: giving users near to your data centre the best experience possible, and, well, there is not much more you can do beyond that, right? There is no way to go faster than the speed of light (not on this universe, anyway).Well, the answer is that you can cheat.And that’s what Cloudflare essentially does: it doesn’t merely “cache your content”. Rather, it does so by making copies of your website’s cache to their 250+ data centres across the world. This means that European visitors will not connect to your website in the US. They will just connect to Cloudflare’s nearest data centre in Europe, and retrieve the cached pages from there instead. Since Cloudflare operates in so many different cities, there is a huge percentage of the world’s Internet population that gets local speeds to retrieve your website — as opposed to have to wait for data to patiently cross the Atlantic (twice… once for the request, once for the reply).It’s the equivalent of making copies of your website all over the world. But instead of paying hundreds of web hosting companies across the world to hold a local copy of your website — not to mention the management of this automatic replication every time a cache is flushed — you just use Cloudflare to do everything on your behalf. Automatically, in the background, effortlessly. And for free.Super Page Cache for Cloudflare is just the key to unlock that potential.Now, to be fair, when you sign up to Cloudflare, by default, it caches very little — some JavaScript, some CSS, and, with luck, a few static images. This is the “bare minimum”, or the least common denominator — it will certainly improve things a bit, but not that much. Cloudflare even has their own “official” WordPress plugin, which facilitates the two-way communication between WP and Cloudflare’s servers. Nevertheless, Cloudflare’s own plugin is not really fine-tuned to perfection. It also implements, by default, a “least common denominator” policy — and making sure that, when a WP author/editor publish an article and requires the cache to be cleared (“flushed”), this request is also forwarded to Cloudflare’s network. But “flushing caches” is just one of the hundreds of options given by WP caching plugins. Some plugins, such as W3TC or the WP Fastest Cache plugin, are already “Cloudflare-aware” and can effectively communicate with Cloudflare’s API. Most, however, cannot be bothered to be properly configured: they work, sure, but always using the “bare minimum” performance boost you get from a generic default configuration.As such, considering that there are way too many possible ways to configure WordPress itself — not to mention Cloudflare! — it’s rather obvious that none of that leads to a simple way to pre-generate a “one-size-fits-all” cache configuration.That said, Super Page Cache for Cloudflare is not one of those “one-size-fits-all” solutions, but a plugin with a very reasonable amount of case-by-case configuration, even for the most basic of scenarios. And that is, unfortunately, the reason why so many reviews say “nothing works” or “impossible to configure”. You need to be patient. This is not an entry-level plugin at all: it is a rather sophisticated way of tapping into Cloudflare’s caching potential.But configuring Super Page Cache for Cloudflare is just half the story. You need to configure Cloudflare as well. One doesn’t work without the other. And I have to say that learning to configure Cloudflare’s rule engine so that it works correctly for Super Page Cache for Cloudflare was truly an education: I didn’t realise how little I was actually using from Cloudflare’s free account.It’s not obvious, but once you register with Cloudflare for a free account (or a paid one!), by default, it does not cache most things. You get just CSS and JS caching by default — good if you have insanely huge CSS/JS files — but that’s pretty much it.Why? Well, Cloudflare originally would cache most things — including all static HTML retrieved from one’s own webserver, images and other media, and so forth. Unfortunately, this only worked so long as, on the Web server side, everything is properly prepared for Cloudflare to work well. What happened was that the vast majority of Cloudflare users (again, especially the free ones!) have no clue about how Cloudflare is configured, or why, or what it does. They have only heard that Cloudflare is great for protecting one’s site from remote attacks (true) and that it does some caching (also true). They assume (incorrectly) that there is nothing they need to change on their side. And that inevitably leads to problems — such as dynamic content, generated taking cookies into account, or assuming that certain headers were present, not displaying correctly. A common issue I had with a really basic WP cache plugin was that Cloudflare would sometimes show the mobile page for a desktop user and vice-versa — even though on the WordPress side of things these two cases ought to be handled separately. They were, but… they weren’t always detected based on their headers only. And sometimes Cloudflare would just blindingly serve the last version of the page they had cached, no matter who it was for (it was even possible to “leak” in this way pages requiring authentication…).Over the years, therefore, Cloudflare learned their lesson: stop assuming that people have flawlessly configured servers on their side. Instead, go for the bare minimum that will work even with the worst possible configuration, but which, at least, won’t “break things”. And let so-called “advanced power users” to tweak both configurations (on their local web server and on Cloudflare) to cache whatever can be cached — but with a knowledgeable human being making rational decisions and tinkering with the configuration, not with an “automated” procedure.Super Page Cache for Cloudflare does a neat job on the Web server’s side of things. It can be configured to prepare a ready-to-be-served page cache on disk which will be nicely used by Cloudflare, exactly in the way Cloudflare prefers such content to be received. Super Page Cache for Cloudflare, therefore, is all you need to properly “prepare” everything to be served by Cloudflare — but it means that each site will require its own distinct configuration. There will be common things, of course, but they will not be exactly the same under all circumstances. In my experience, there are certain plugin + theme configurations that will not work with Cloudflare (so all you can do is to water your plants while waiting for something to happen). Most will, but they will also need some human help to properly configure Cloudflare’s page rules.And ultimately there’s where the magic happens. By enabling the Cloudflare rule engine, and making sure that it understands the format that Super Page Cache for Cloudflare uses to write things to disk — and serves them from disk — you can virtually put your whole website on Cloudflare’s cache and serve it from there. With a bit of tinkering, you can do it. But, again, it’s not easy to do so, no matter how “automated” your system is, even though Super Page Cache for Cloudflare includes some of the more obvious configurations that you need to deploy.And woe to any major upgrade, which might just scratch your existing configuration — and you have to start over again!
Hunyo 15, 2024 1 reply
my blog daltxrealestate.com went from a 1.2-second load time to just 250 milliseconds! That’s incredible! I want to say a huge THANK YOU, ALEX! I was using WP-ROCKET’s paid plan, which crashed my website. Then, Litespeed Cache slowed my TTFB to 2 seconds. WP Fastest Cache didn’t improve my speed at all. But when I tried Super Page Cache for Cloudflare, I jumped out of my chair! GTmetrix showed an A rating andTTFB just 200 milliseconds! Man, your plugin is like a PREMIUM SUPER CLASSY DIAMOND PLAN. Hope you have a fantastic day, Alex!
Hunyo 15, 2024 1 reply
I followed the instructions carefully and it works perfectly. I want to say thank you to the author for sharing your knowledge. I use this plugin in conjunction with litespeed cache and I am well impressed with the results.
Hunyo 3, 2024
This plugin supposedly works out of the box. Well, it doesn’t. The developer’s support is terrible. The same problem I encountered, I found threads 5 years ago.. Did everything by the book, but cache was not working.. Disabled everything the developer said on Litespeed cache, my hosting didn’t have any page rules setup either..
Read all 414 reviews

Contributors & Developers

“Super Page Cache for Cloudflare” is open source software. The following people have contributed to this plugin.

Contributors

“Super Page Cache for Cloudflare” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “Super Page Cache for Cloudflare” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

Version 4.7.13 (2024-07-18)

  • Fixed Zone ID selection for creating Cache Rule where the correct domain was not picked

Version 4.7.12 (2024-07-15)

  • Fixed fatal error when calling get_objects() method

Version 4.7.11 (2024-07-10)

  • Fixed an issue where the SpinupWP provider detection function wasn’t working properly.
  • Removed module preload for instant.page script as it breaks WordPress 6.5 Interactivity API
  • Migrated to the new Page Rules

Version 4.7.10 (2024-04-17)

  • Updated internal dependencies

Version 4.7.9 (2024-04-01)

  • Updated internal dependencies

Version 4.7.8 (2024-03-29)

  • Updated internal dependencies

Version 4.7.7 (2024-03-07)

  • NPS Survey added
  • Updated dependencies

Version 4.7.6 (2024-02-15)

  • Enhanced security
  • Updated dependencies

Version 4.7.5 (2023-10-30)

  • Added swcfpc_bypass_cache_metabox_post_types filter to ensure users can add their CPTs to the list of allowed post types for which the bypass cache meta box will be registered.
  • Make sure that the Purge CF cache option is not shown for WC Subscription page

Version 4.7.4 (2023-06-12)

  • Making sure the log file shows the date and time in accordance with the Timezone settings set inside WordPress admin
  • Making sure that the Purge CF Cache option is not showing up for the WooCommerce individual order items

Version 4.7.3 (2023-02-02)

  • Fixing PHP 8.1+ deprecated error notice (reported here)
  • Making sure that the version query param is not added to the instantpage.min.js so that the modulepreload can work correctly

Version 4.7.2 (2022-11-16)

  • Loading an old version of the SweetAlert2 library that doesn’t have the anti-Russian Malware added. (Reported here)

Version 4.7.1 (2022-11-15)

  • Fix upgrade routine to the latest version.

Version 4.7.0 (2022-11-15)

  • New: Added two new filters i.e. and , to give users the ability to make changes to the generated fallback cache HTML before it gets saved in the disk. Idea requested here.
  • Making sure that when a page/post is marked as private or password protected, the cache gets auto purged
  • Added a list of query Parameters that are now ignored by default by both the plugin and worker code.
  • Added support for the YASR premium version
  • Updated sweetalert library to v11.4.26
  • Making sure that when a page/post is marked as private or password protected, the cache gets auto purged
  • Added urls as an argument to swcfpc_purge_urls, swcfpc_cf_purge_cache_by_urls_before, swcfpc_cf_purge_cache_by_urls_after action
  • Making sure for the WP Rocket hook for after_rocket_clean_post, after_rocket_clean_files, rocket_rucss_complete_job_status only the URLs WP Rocket purged – also gets purged from Cloudflare
  • Added option for Removing Cache Buster Option (Super Advanced Use Case)
  • New: Adding filter swcfpc_normal_fallback_cache_html & swcfpc_curl_fallback_cache_html to make changes to the generated fallback cache HTML before it gets saved to the disk.

Version 4.6.1 (2022-05-27)

  • Bugfix: Added missing selector in
  • Improvement: Updating the FAQ about properly using this plugin with WP Rocket – added hyperlinked to this gist
  • Improvement: Storing non-sensitive data as JSON instead of PHP to ensure a faster execution and also the system will be able to handle large sites with many URLs compared to the existing process i.e. storing JSON data in PHP and then asking PHP to read that and decode it.
  • Update compatibility with WordPress 6.0

Version 4.6.0 (2022-05-20)

  • Bugfix: Removing the trailing slash from the swcfpc_fallback_cache_remove_url_parameters() when query parameters are removed from the URL. Previously it was creating double cache keys when the same URL is visited once without any query param and then with e.g. utm query param.
  • Improvement: Added swcfpc_fc_modify_current_url filter for special use cases where the user wants to filter the $current_uri by themselves and remove the query params as they see fit.
  • Improvement: Updating the worker code to ensure that static files are not processed by Worker and instead let the CF system handle the static file in accordance with the cache-control header. Also replaced the forEach() and every() loop with a much faster for() loop to improve the code performance, vastly reducing CPU usage.
  • Bugfix: Make sure that the preloader runs only after all cache purging is complete
  • Bugfix: Make sure that the purge_cache_on_post_edit() and wp_rocket_hooks() does not fire when nav menus are updated from the WP Nav Menu page
  • Bugfix: Make sure that the unnecessary very parameter ?v= is not considered by the system
  • Bugfix: Added AMP in the list of third-party query parameters for worker mode.
  • Bugfix: Adding nocache_headers() for cronjob_preloader() and cronjob_purge_cache() function. Checking if header is not sent then add the nocache header
  • Improve content copy across the plugin
  • Adds full translation support
  • Adds Expert Service mention

Version 4.5.8 (2022-02-09)

  • Bugfix: Gutenberg editor permalink doesn’t have the cache buster query string added
  • Tested up to WordPress 5.9

Version 4.5.7 (2021-11-02)

  • Further optimized the worker code and extended the handled server response codes to cover edge case scenarios
  • Improved worker update by making sure the worker code is updated when the plugin is updated

Version 4.5.6 (2021-10-28)

  • Remove serialize() & unserialize() from saving options data as WP already does it automatically.
  • Improve admin area loading scripts, making sure that on the backend the plugin scripts are not loaded where it is not needed for example customizer pages, oxygen visual page builder pages etc.
  • Added a much more robust and updated version of the Worker Script which does the same thing as previously but now is more robust with multiple exception handling across every possible edge case and to ensure the worker script never throws an unhandled exception no matter what is thrown at it. Also now when a page cache is bypassed due to the default bypass cookie, in the response header under the x-wp-cf-super-cache-worker-bypass-reason it will show you the name of the default cookie for which the cache has been bypassed.
  • Improve worker update by making sure when someone updates the plugin, the worker script is also gets updated.

Version 4.5.5 (2021-08-05)

  • Remove readonly from swcfpc_cf_apitoken_domain

VERSION 4.5.4 (2021-08-04)

  • Updated Sweetalert to v11.0.18
  • Adding ability to add more custom URLs in the list of related urls and also giving the ability to remove the home page from the list of related URLs with the help of constants
  • Fix default value call for swcfpc_post_related_url_init filter
  • Mistakenly added filter under the action section in FAQ
  • Making sure we are not loading our plugin scripts on WooFunnels Order Bumps Page as it uses super old sweetheart, it creates compatibility issues
  • Added missing var on add_toolbar_items
  • Bugfix for AMP standard mode admin pages
  • Fixing CF API Token usage bug
  • Making sure that the API Token domain field is read-only and cannot be typed as the domain name in that field is system generated

VERSION 4.5.3

  • Fixing a bug related to CRON job
  • Fixing a bug related to not loading the admin pages properly when AMP plugin is installed and Standard mode is selected
  • Getting rid of Cloudflare __cfid cookie check as Cloudflare has deprecated it
  • Making sure Sweetalerat is loaded locally instead of jsdeliver & also proper version number is mention in the code
  • Updating sweetalert to v11.0.5
  • Fixing a minor bug in backend.js related to a page reload upon activation of page caching
  • Adding proper wp rocket filters to disable WP Rocket page caching when using this plugin. The previously documented filter is deprecated.

VERSION 4.5.2

  • Adds compatibility with Swift Performance Pro
  • Preload instantpage.min.js as a Module and not as Script
  • Fix is_404 incorrect call
  • Bypass caching on password-protected pages

VERSION 4.5.1

  • Change ownership to Optimole

VERSION 4.5

  • New: option to bypass WP JSON endpoints via WordPress instead of using web server rules
  • New: option to automatically purge the cache when the upgrader process is complete
  • New: option to bypass WooCommerce My Account page
  • Update: added the fired action on logs when the cache is automatically purged from a third-party plugin
  • Update: turn keep settings on deactivation ON by default

VERSION 4.4.4 (11TH FEBRUARY 2021)

  • New: support for Flying Press (Third Party tab)
  • Fix: minor bugs

VERSION 4.4.3 (11TH FEBRUARY 2021)

  • Fix: skip some taxonomies on SWCFPC_Cache_Controller::get_post_related_links() (thanks to @frafor)
  • Fix: removed data-cfasync from the inline scripts added by the plugin
  • Fix: autoprefetch URLs in viewport
  • Fix: prevent to call inject_cache_buster_js_code twice
  • Fix: check if function insert_with_markers exists

VERSION 4.4.2 (25TH JANUARY 2021)

  • Update: added /removed_item in the “Prevent the following URIs to be cached” by default
  • Update: disable auto prefetch links for URIs in “Prevent the following URIs to be cached”
  • Fix: disallow non-admin users to download debug.log

VERSION 4.4.1 (25TH JANUARY 2021)

  • Security: fixed a bug that allow users to export the whole plugin configurations (Thank you Dee Zee)
  • Improvement: use a custom home_url() function when creating the page rule on Cloudflare
  • Fix: force cache bypass for wp-cron.php

VERSION 4.4.0 (10TH JANUARY 2021)

  • Improvement: purge request for more then 30 URLs is now async
  • New: action “Force purge everything” when the option to purge HTML pages only is enabled
  • New: option “Auto prefetch URLs on mouse hover” for a just-in-time preloading (Other tab)
  • New: option Keep settings on deactivation (Other tab)
  • Update: log Cloudflare HTTP response and request packets only when log verbosity is set to High
  • Update: cache buster disabled by default in Worker Mode
  • Fix: minor bugs

VERSION 4.3.9.2 (2ST JANUARY 2021)

  • Fix: minor bugs when click on Purge Cache and the option to purge HTML pages only is enabled
  • Improvement: improve Litespeed Cache support
  • Improvement: option to purge HTML pages only. Now it supports all WordPress-type posts
  • Update: plugin is now 100% PHP 8 compatible
  • Update: change the default s-maxage from 604800 (1 week) to 31536000 (1 year)
  • Update: better scheduled events management
  • Update: default excluded URIs

VERSION 4.3.9.1 (1ST JANUARY 2021)

  • Fix: PHP fatal error on lines 2830 and 514 of cache_controller.class.php when option to purge HTML pages only is enabled

VERSION 4.3.9 (31TH DECEMBER 2020)

  • New: option to purge HTML pages only instead of full Cloudflare cache (assets + pages) (Cache tab)
  • New: option to auto prefetch URLs in Viewport (Other tab)
  • New: support for WP Performance (Third Party tab)
  • New: new WP Rocket firing actions (Third Party tab)
  • New: purge post Cloudflare cache on Elementor AJAX update (elementor/ajax/register_actions)
  • New: option to purge Cloudflare cache for WooCommerce scheduled sales (Third Party tab)
  • New: support for Swift Performance Lite (Third Party tab)
  • New: automatically add the cache buster for redirects made using wp_redirect PHP function
  • New: option to disable cache purging using queue (Cache tab)
  • Fix: minor bug when click on reset all
  • Improvement: replaced fnmatch with a custom function
  • Update: the updated worker script removes certain query parameters (fbclid, fb_action_ids, fb_action_types, fb_source, _ga, age-verified, ao_noptimize, usqp, cn-reloaded, klaviyo, amp, gclid, utm_source, utm_medium, utm_campaign, utm_content, utm_term) from the URL before it handles it

VERSION 4.3.8 (14TH DECEMBER 2020)

  • New: support for WP Engine hosting provider (beta)
  • New: support for SpinupWP hosting provider (beta)
  • New: support for Kinsta hosting provider (beta)
  • New: support for Siteground SuperCacher (beta)
  • New: log verbosity option
  • Update: advanced-cache.php (deleted unuseful old code)
  • Fix: logged in user getting cached version with the new worker code
  • Fix: Undefined index: REQUEST_METHOD when using WP CLI
  • Fix: Varnish cache purging on Cloudways

VERSION 4.3.7.4 (1OTH DECEMBER 2020)

  • Update: removed the option “Bypass cache for the following user agents” ’cause it slow down the TTFB
  • Update: new optimized worker code
  • Fix: prevent the cache buster to be added for anchor links on the current page

VERSION 4.3.7.3

  • Update: load assets on frontend only for users which have permission to purge cache and only if the “Remove purge option from toolbar” is not enabled

VERSION 4.3.7.2

  • Fix: looking for existing routes and workers also on CF instead of local database only
  • Update: delete the main plugin folder from wp-content on plugin deletion

IMPORTANT NOTICE! Due to Cloudflare’s change of API for worker management, users who use tokens as authentication will also need to specify the email address of the Cloudflare account used (General tab).

If not, users who manage multiple cloudflare accounts from the same interface may have problems uploading or deleting the worker.

VERSION 4.3.7.1

  • Fix: Cloudflare Worker Error 1101
  • Fix: the preloader must also be started during manual cache purging if the “Automatically preload the pages you have purged from Cloudflare cache with this plugin” option is enabled
  • Fix: added “no-cache” in Cache-Control response header when downloading the log file

VERSION 4.3.7

  • New: option to bypass cache for specific user agents in worker mode (Cache tab)
  • New: option to bypass cache for specific cookies in worker mode (Cache tab)
  • New: option to automatically purge the object cache (Advanced tab)
  • New: option to select user roles allowed to purge the cache (Other tab)
  • New: option to prevent fallback cache to cache URLs without trailing slash (Cache tab)
  • New: support for WP Assets Clean Up Pro (Third Party tab)
  • New: support for Nginx Helper (Third Party tab)
  • New: cache status icon on admin bar
  • New: the plugin is now jQuery free
  • New: use the faster typecasting instead of intval
  • New: SWCFPC_PURGE_CACHE_CRON_INTERVAL PHP constant to define the interval of the purge cache cronjob (default: 10 seconds)
  • New: action “swcfpc_purge_cache” to purge Cloudflare cache programmatically (read FAQ section)
  • New: cache-control in Nginx browser caching rules
  • Fix: error code 1014 when purging single urls cache
  • Fix: show “Purge CF Cache” on frontend admin bar
  • Fix: URL on page rule for WordPress installed in subdirectory
  • Fix: Varnish invalid hostname
  • Fix: purge whole cache via cronjob
  • Fix: IfModule directive when “Strip response cookies on pages that should be cached” option is enabled
  • Fix: error fnmatch(): Filename exceeds the maximum allowed length
  • Fix: remove s-max-age directive from cache-control response header
  • Fix: excluding WordPress, WooCommerce and EDD API requests from fallback and Cloudflare cache
  • Fix: “Prevent the following URIs to be Cached” is automatically getting delete when a single URI is present
  • Update: Worker id is now unique
  • Update: Updated the worker script massively and written it from the ground up for better performance and uncase handle
  • Security: making sure that the debug.log file is not accessible publicly with web server rules

VERSION 4.3.6

  • New: import/export configurations
  • Fix: Uncaught Error: [] operator not supported for strings in wp-cloudflare-super-page-cache.php:458

VERSION 4.3.5

  • New: purge cache using a fast queue for a better backend performance
  • New: support for EDD – Easy Digital Downloads
  • Update: turn off autocomplete for Cloudflare API token and API key fields (thanks @alx359)
  • Update: bypass cache when DOING_CRON is true (thanks @alx359)
  • Update: remove WP_CACHE constant from wp-config.php when uninstalled
  • Update: reduce default value of SWCFPC_PRELOADER_MAX_POST_NUMBER to 50
  • Fix: disable fallback cache when plugin is deactivated or on reset all
  • Fix: Undefined variable in fallback_cache.class.php:570
  • Fix: load custom CF worker via PHP constant
  • Fix: notice warning on media upload when fallback cache is enabled
  • Fix: automatically purge the cache on post edit event only if one of “automatic cache purging” option is enabled
  • Fix: new lines at bottom of wp-config.php when fallback cache is enabled
  • Fix: bypass fallback cache on WP CLI commands
  • Fix: enable or disable fallback cache in real time when the cloudflare one is being enabled or disabled
  • Fix: delete worker and route on reset all

= VERSION 4.3.4.3
* Fix: warning on str_replace

VERSION 4.3.4.2

  • Fix: Error message: Uncaught Error: [] operator not supported for strings in wp-cloudflare-super-page-cache.php:408

VERSION 4.3.4.1

  • Fix: page rule on Cloudflare is deleted when update to 4.3.4. To solve this problem please click on Reset all and enable again the page cache. Sorry for the inconvenience

VERSION 4.3.4

  • New: FAQ tab
  • New: SWCFPC_CF_WOKER_FULL_PATH PHP constant to define a full path to a custom CF Worker
  • New: SWCFPC_CURL_TIMEOUT PHP constant to define the timeout in seconds for cURL calls (default: 10 seconds)
  • New: added option to enable/disable Autoptimize support (Third Party tab)
  • New: added option to disable cache buster in Worker Mode (Other tab)
  • New: added option to skip fallback cache if specific request cookies exist (Cache tab)
  • New: added option to save response headers together with HTML code for fallback cache (Cache tab)
  • New: added option to automatically purge OPcache when Cloudflare cache is purged (Advanced tab)
  • New: CF Worker section under Cache tab
  • New: WP CLI support
  • New: added option to automatically reset the log file when it exceeded the max file size in MB (Other tab)
  • New: merge and collapse options for a better UX (thank you isaumya)
  • Fix: tab focus when update settings
  • Fix: 403 error on wc-ajax=update_order_review
  • Fix: error “The plugin is not detected on your home page…” while testing static resource when clicking Test cache
  • Fix: PHP Parse error: syntax error, unexpected (T_STRING) in ttl_registry.php
  • Fix: double slashes in assets URIs
  • Fix: error “There is not page rule to delete”
  • Fix: prevent wp-login.php and wp-register.php pages to be cached by fallback cache
  • Fix: preloader operation “Preload last 20 published posts and pages”
  • Update: automatic SEO redirect disabled by default
  • Update: improved CF worker code
  • Update: removed support for Cache Enabler, WP Fastest Cache and WP Super Cache. Use the fallback cache option instead.
  • Update: a5hleyrich/wp-background-processing to 1.0.2
  • Update: prevent to cache URLs with ao_noptirocket parameters
  • Update: transform most of backend.js code from jQuery to Vanilla Javascript for better performance (thank you isaumya)

VERSION 4.3.3

  • New: added option to force bypass of whole WordPress backend with an additional page rule on Cloudflare
  • New: WP Asset Clean Up support
  • New: start preloader via Cronjob
  • Update: force worker to bypass the requests to /wp-admin/ URLs. You need to disable and re-enable the page cache
  • Update: moved Varnish options under Advanced tab
  • Update: improved test cache
  • Fix: cache bypass for edit.php

VERSION 4.3.2

  • New: added option to disable the automatic SEO redirect for URLs with cache buster for logged out users
  • New: added option to enable or disable Varnish support
  • New: added option to exclude some URIs from fallback cache only
  • New: added option to enable or disable preloader
  • New: preload URLs from sitemaps
  • New: tabs for a better UX
  • New: more intuitive fallback cache keys
  • New: new htaccess rules for cache-control response header
  • New: cpu saving by running only one preloading process at once thanks to lock
  • Fix: yars fatal error
  • Fix: automatically purge fallback cache for edited posts
  • Fix: new lines into wp-config.php when enable the fallback cache

Many thanks to Saumya Majumder for the great support and the time passed with me for bug fixing and testing

VERSION 4.3.1

  • Fix: error in fallback cache that did not allow the correct form submission

VERSION 4.3.0

  • Fix: Increased the timeout for Cloudflare HTTP requests to 10 seconds
  • Fix: avoid fallback cache to cache non-GET requests
  • Fix: avoid download sensitive information of fallback cache settings files
  • New: automatic SEO redirect (301) for all URLs that for any reason have been indexed together with the cache buster

VERSION 4.2.9

  • Fix: fatal error when purging cache from Varnish

VERSION 4.2.8

  • Fix: drop swcfpc_logs table
  • Fix: purge cache in chunks when the related URLs exceed the 30 units
  • Fix: prevent preload/purge external URLs

VERSION 4.2.7

  • Fix: error on delete source advanced-cache.php

VERSION 4.2.6

  • Fix: copy advanced-cache.php

VERSION 4.2.4

  • New: Varnish support
  • New: Preloading internal links for chosen WordPress menus
  • New: Disable WP-Rocket page cache only without installing third-party addons
  • New: WP-Optimize support
  • New: Cache Enabler support

VERSION Version 4.2.2

  • Fixed PHP Fatal Error for SWCFPC_Cache_Controller::purge_cache_when_comment_is_deleted

VERSION Version 4.2.1

  • Merged pro features with free ones

VERSION Version 4.2

  • New: page caching via Cloudflare Workers
  • New: page caching as fallback to Cloudflare
  • New: automatically start the preloader when Cloudflare cache is purged
  • New: Yasr support – Yet Another Stars Rating
  • Replaced MySQL log table with log file
  • Fixed cache preloader
  • Automatically log preloader activities
  • Show purge cache links to administrators only
  • Improved AMP support
  • Disable page cache on plugin deactivation instead of resetting all

VERSION Version 4.1.4

  • Added an option to automatically purge the whole cache when WP Fastest Cache purges its own cache
  • Added an option to automatically purge the whole cache when Hummingbird purges its own cache
  • Move the menu inside Settings page

VERSION Version 4.1.3

  • Cloudflare has finally solved a bug that allows you to use access tokens with permissions limited to the domain being configured only.
  • Added an option to remove purge options from toolbar
  • Added an option to disable metaboxes from single pages and posts

VERSION Version 4.1.2

  • Added an option to automatically purge cache for WooCommerce product page and related categories when stock quantity changes
  • Added an option to automatically purge the whole cache when LiteSpeed Cache purges its own cache

VERSION Version 4.1.1

  • Fix javascript error Uncaught TypeError: Cannot read property ‘addEventListener’ of null

VERSION Version 4.1

  • Fix ajax url for WordPress multisite
  • Fix other minor bugs

VERSION Version 4.0.6

  • Fixed error Call to undefined function wp_generate_password()

VERSION Version 4.0.5

  • Fix other minor bugs

VERSION Version 4.0.4

  • Fix bug (cache buster also for not logged in users). Thanks to Tim Marringa

VERSION Version 4.0.3

  • Show page actions only if page cache is enabled

VERSION Version 4.0.2

  • Fixing default page number for preloader

VERSION Version 4.0.1

  • Fast fix for page testing function

VERSION Version 4.0

  • Added pages to top-level menu
  • New logs page
  • Added ability to define some values (API Key, API Token, API Email, API Zone ID, API Subdomain, Cache buster) using PHP constants
  • Added a cache preloader
  • Added an option to strip response cookies from pages that should be cached
  • Now the cache purging is doing via Ajax
  • Improved the page cache testing system
  • New UX
  • Added an option to bypass the cache for POST requests
  • Added an option to bypass the cache for requests with query variables (query string)
  • Added metabox to exclude single page/post from the cache

VERSION Version 3.8

  • Added the ability to use the API tokens instead of the API keys to authenticate with Cloudflare
  • Added in the admin toolbar the option to purge the cache for the current page/post only
  • Added more debug details
  • Added page/post action links to purge the cache for the selected page/post only

VERSION Version 3.7.2

  • Fixed a sentence for italian language

VERSION Version 3.7.1

  • Added option for automatically purge single post cache when a new comment is inserted into the database or when a comment is approved or deleted

VERSION Version 3.7

  • Added options for WP Rocket users
  • Added options for W3 Total Cache users
  • Added options for WP Super Cache users
  • Improve some internal hooks

VERSION Version 3.6.1

  • Added options for WooCommerce

VERSION Version 3.6

  • Added Nginx support for “Overwrite the cache-control header” option

VERSION Version 3.5

  • Added Nginx support
  • Italian translation

VERSION Version 3.4

  • Fixed notice Undefined index: HTTP_X_REQUESTED_WITH

OLDER VERSIONS

Version 1.5 – Added support for WooCommerce, filters and actions
Version 1.6 – Added support for scheduled posts, cronjobs, robots.txt and Yoast sitemaps
Version 1.7 – Little bugs fix
Version 1.7.1 – Fixed little incompatibilities due to swcfpc parameter
Version 1.7.2 – Added other cache exclusion options
Version 1.7.3 – Add support for AMP pages
Version 1.7.6 – Fixed little bugs
Version 1.7.8 – Added support for robots.txt and sitemaps generated by Yoast. Added a link to admin toolbar to purge cache fastly. Added custom header “Wp-cf-super-cache” for debug purposes
Version 1.8 – Solved some incompatibility with WP SES – Thanks to Davide Prevosto
Version 1.8.1 – Added support for other WooCommerce page types and AJAX requests
Version 1.8.4 – Fixed little bugs
Version 1.8.5 – Added support for subdomains
Version 1.8.7 – Prevent 304 response code
Version 2.0 – Database optimization and added support for browser cache-control max-age
Version 2.1 – Fixed warning on line 1200
Version 2.3 – Added support for wildcard URLs
Version 2.4 – Added support for pagination (thanks to Davide Prevosto)
Version 2.5 – Fixed little bugs and added support for Gutenberg editor
Version 2.6 – Auto-purge cache when edit posts/pages using Elementor and fix the warning on purge_cache_on_post_published
Version 2.7 – Fixed a little bug when calling purge_cache_on_post_published
Version 2.8 – Fixed the last warning
Version 3.0 – Improved the UX interface, added browser caching option and added support for htaccess so that it is possible to improve the coexistence of this plugin with other performance plugins.
Version 3.1 – Fixed PHP warning implode() for option Prevent the following urls to be cached
Version 3.2 – Improved cache-control flow via htaccess
Version 3.3 – Fixed missing checks in backend