Today I'm telling you one of the best methods of using Cloudflare Full Page Cache with their free plan. You can make bypass logged in user and purge cache for cookies (new post, comment users and post updates, etc.). That's mean your WordPress site will be loaded under 200ms worldwide and your website's dynamic content does not affect.
By default, Cloudflare provides cache everything Page Rules settings. This page rule also available for a free plan and anyone use it without charges always.
After enabling it, the site starts loading in less than 200ms worldwide. Here is the guide to enabling Cloudflare's full page cache easily.
How to use Cloudflare Cache Everything?
Creating a page rule on Cloudflare cache everything is very easy, for this, you go to your Cloudflare account and follow the steps below.
Cloudflare cache all pages when using Cloudflare cache everything, so we need to create one another page rule to bypass the WordPress admin area.
Make bypass admin area, like this,
Right now we need to also bypass wp-login and post preview URL, which we can create the same page rule, but the problem does not end here.
Because we will need to clear cache when new publish published or any post are updated, also for comment users, which is possible only in the Cloudflare business plan.
Because Cloudflare does not offer cache clear or bypass for cookies in free and pro plan, for it you need$200 business plan.
Benefits of Cloudflare cache everything
This makes the website load your website in less than 200ms worldwide. You can see an example of its performance here.
This is an amazing super-fast performance, now your website starts loading in less than 200ms worldwide with using Cloudflare CDN.
But wait, everything is not available in free and there is a problem with the free plan. This option caches all HTML pages regardless of the presence of dynamic content.
This means, WordPress logged in users are also cached and the comment system is also affected.
This is not good for the regular updates website and it's also dangerous for security because Cloudflare survey logged in pages for anonymous visitors.
Disadvantages of Cloudflare Cache Everything
The biggest disadvantage, when using the Cloudflare cache everything then it caches to all the content of your WordPress website.
Now If your WordPress site gets regular updates and lots of comments, then there will be a problem if you use the full-page cache of Cloudflare.
And using this method, WordPress admin area, logged in user is also cached. This is also survey logged in pages for anonymous visitors, so they can access your website admin area.
One more problem, the cache is not clear even when a new comment comes on post/pages or updating the article, to do this you need clear Cloudflare cache manually.
But Cloudflare business plans are offered to clear cache for cookies (like new post publish, update and get comments), for this you need to pay $200 for the business plan.
Or you can use the Cloudflare plugin for this, but it clears the entire cache and does not even guarantee to bypass logged in user.
So I thought of creating a plugin that could solve all these problems and I have been successful in it to a great extent.
I created a plugin that allows Cloudflare cache-control when using a full page cache with Cloudflare free plan. Here is this,
#1 Best Plugin for using Cloudflare Full Page Cache for WordPress
Many experts have told its solution and many webmasters have also made a plugin for this, but all have some problems.
So I first used this plugin on my website, I have been using it for the last 3 months, although I made this breaking for personal use.
But a friend of mine Gulshan Kumar advised me why not share this plugin with others so that others can also take advantage of it.
And that's why today I'm here with my new WordPress plugin, WP Cloudflare Cache which is also available on WordPress Official Directory.
The WP Cloudflare Cache plugin provides us with the following features.
- Automatic purge cache
- Purge only specific page cache
- Purge cache for a new post
- Purge cache for a post-update
- Purge cache for commenting
- Make bypass all logged-in user
- Setup custom cache expire time
The biggest feature of this plugin is that it clears the cache only for the pages that you update and get new comments and never cache logged in users.
For example, when you publish a new post on your blog, only the cache of your blog's homepage will be purged. Similarly, if you update a post, only that cache will be clear.
The advantage of this will be that upon updating one of your posts, your website other pages will not slow down. This means that it is best for a regular content update site.
Now it comes to the logged in users, the plugin bypasses all logged-in users, means there will be no page cache when the logged-in user opens your site.
The pages will be cached only when visitors open them. This will also not cause a security problem. Similarly, the plugin comment system also solves the problem.
When a user comments on a post on your website or you reply to a comment, the cache will be clear only for the page containing that comment.
You can install the plugin from here by direct downloading this plugin or from the dashboard of your website.
Use this plugin and avail the Cloudflare cache everything features for your WordPress site without any problems.
There is a request to all of you that after using the plugin, please submit your valuable review with maximum rating.
Also, tell your knowledgeable bloggers about this plugin and support our work so that we can create more such WordPress plugin for you.
At last, please share this article with other bloggers so that they too can use this plugin.