How to Set Up Cloudflare Full Page Cache for Your WordPress Site
Cloudflare is a popular service that offers DNS, CDN, security services, and more. It is often used by WordPress site owners to speed up and secure their websites. By default, Cloudflare automatically caches static assets like CSS, JS, and images. With a little extra work, Cloudflare can also be configured to “cache everything,” which means a static HTML copy of your website will be cached and served from Cloudflare’s extensive network of data centers around the world. In this post, you’ll learn more about Cloudflare’s “full page cache” feature, and if it’s a good option for your WordPress site.
Who Should Use Full Page Cache?
Cloudflare’s full page cache feature is not for everyone. In general, WordPress users with largely dynamic websites should not enable full page cache. One example of a dynamic WordPress site is a WooCommerce store, which requires “add-to-cart” and billing functionality. With Cloudflare’s full page cache switched on, one customer’s cart will get cached and served to other customers. Similarly, private billing details like names and addresses on a checkout page could also get cached.
If you’re running a standard blog or simple business website, enabling Cloudflare full page cache could result in a significant performance boost. The only thing to keep in mind is that WordPress’ default commenting system may not play nice with full page cache – new comments won’t show up until the Cloudflare cache is cleared. Based on the information above, this website is the perfect candidate for Cloudflare full page cache because it’s pretty much completely static – no store functionality, no comments, and no contact forms.
How to Set Up Cloudflare Full Page Cache
To set up Cloudflare full page cache on your WordPress site, you’ll have to make a page rule like the one in the image below. Makes sure you replace staging-brian.kinsta.cloud with your own domain name.