JAYbranding

Super Page Cache for Cloudflare - Effective Cache Optimization Rivaling WP Rocket

Super Page Cache for Cloudflare is a completely free plugin with outstanding features that rivals WP Rocket. Before reading further, you can check out the results achieved when enabling Super Page Cache, enabling WP Rocket, and using Nginx caching from the server.   Instead of only caching static assets like images, CSS, and JavaScript files, you can use Cloudflare to cache your entire WordPress website. So, if you have mostly static content that doesn't change frequently, you can let Cloudflare cache your site! When combined with Cloudflare Cache Reserve, Cloudflare can serve as a secondary hosting provider, acting like your origin web host to achieve blazing-fast global speeds. Here is how to do it.

Step 1: Download the Super Page Cache for Cloudflare Plugin

Although it is possible to configure Cloudflare to cache your WordPress site manually, using a plugin covers all edge cases and allows you to access the uncached version of your site whenever you want. The best plugin for this is Super Page Cache for Cloudflare - formerly known as WP Cloudflare Page Cache. Download this plugin and go to its configuration screen under “Settings -> Super Page Cache for Cloudflare”.

Step 2: Get Your Cloudflare Global API Key

This article does not cover creating a Cloudflare account, but you can easily sign up for a free account at www.cloudflare.com. The plugin needs your Global API Key to automatically manage the integration between your website and Cloudflare. To get the API key, log in to your Cloudflare dashboard, click the profile icon in the top-right corner, and click "My Profile" as shown here: Cloudflare My Profile Now click “API Tokens” on the left/right side, then locate “Global API Key” and click “View”: Get Cloudflare API Key The next screen will ask you to confirm your Cloudflare password and pass a Turnstile verification check. Once completed, Cloudflare will display your Global API Key. Warning: This key is highly sensitive. Do not share it with anyone. Copy your Cloudflare Global API Key Once you have copied this key, return to the Super Page Cache for Cloudflare settings page. For "Authentication Mode", select "API Key", enter your Cloudflare email address, and paste the Global API Key into the provided box as shown here: Enter Cloudflare API Key into the Super Page Cache for Cloudflare Plugin Scroll down, select the domain name for which you want to enable Cloudflare caching for WordPress, and save your changes.

Step 3: Enable Caching and Test That It Is Working

After completing the configuration and saving your settings, you can enable and disable Cloudflare caching for WordPress by toggling the orange buttons at the top of the settings screen as follows: Enable and Disable Cloudflare Caching You can also click the “Test Cache” button to confirm that everything is working as expected: Verify that Super Page Cache for Cloudflare is Working And you're done!

Step 4: Configure Default Settings for Cloudflare WordPress Caching

The default settings for the Super Page Cache for Cloudflare plugin are quite solid. However, you can click on the “Cache” tab to further configure and fine-tune your experience. For example, when purging updated pages, I choose to purge only HTML pages—there is no need to reset the cache for all static files just because you edited a post. You can also configure Fallback Page Caching, which stores copies of your pages on your own server. This is similar to standard WordPress caching plugins like W3 Total Cache. Other advanced options include preloading purged pages configured according to your preferences.

Verify That Cloudflare WordPress Page Caching Is Working

To check if Cloudflare is caching your WordPress pages, first load a page in your browser to “warm up” the cache. Then, open your browser's developer tools by pressing “Ctrl + Shift + C” and select the “Network” tab. When you refresh your page, it will display all the resources loaded by the browser. The first resource will be your page URL. Select it, and on the right-hand side, check the “Response Headers” as shown here: Verify that Cloudflare Caching for WordPress is active There should be a response header called “cf-cache-status” and its value should be “HIT” as shown above. This means Cloudflare is serving this page directly from its cache.

Blazing-Fast Response Times with Cloudflare WordPress Caching

To check response times, I use Cloudflare Analytics, which is better than Google Analytics for measuring page speed. You can see that I have an average response time of just 15ms because most of my WordPress pages are served from Cloudflare: 15ms WordPress Response Time with Cloudflare Caching That is faster than any web hosting provider and any traditional caching plugin. To achieve even faster speeds, you can configure Cloudflare to serve stale content from the cache while fetching a fresh object from the origin server in the background.

Accessing the Uncached Version of Your Page

Of course, you will often want to view the uncached version of your page. To do this, append the query string “?swcfpc=1” to your URL, and it will bypass the Cloudflare cache. For example, if you want to view the uncached version of this URL: https://jaybranding.com/thiet-ke-trang-web-chuyen-nghiep-chuan-seo/ Change it to: https://jaybranding.com/thiet-ke-trang-web-chuyen-nghiep-chuan-seo/?swcfpc=1 Not only does it load the “live” uncached page, but it also rewrites all links on the page to include the query parameter so you can browse the uncached version of your site without having to manually add it every time. It works wonderfully!