How to Setup WP Cloudflare Cache Plugin for WordPress

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.

right way to use cloudflare cache everything for wordpress

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.

create cache everything page rule on cloudflare

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,

bypass wordpress admin area

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.

cloudflare cache everything performance report

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.

install wp cloudflare cache plugin

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.

Download WP Cloudflare Cache Plugin

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.

Avatar for Jumedeen Khan

About Jumedeen Khan

मैं इस ब्लॉग का संस्थापक और एक पेशेवर ब्लॉगर हूं। यहाँ पर मैं नियमित रूप से अपने पाठकों के लिए उपयोगी और मददगार जानकारी शेयर करता हूं। ❤️

Comments ( 11 )

  1. Avatar for Himanshu

    What’s the matter sir this is very good plugin.

  2. Avatar for Mainak Ghosh

    When I publish a post I only clear cache of the homepage, so it does not the clear cache of the category of the post?

    Also if i use Disqus comment system, it will perform well?

    • Yes, I have not added category purge feature, only homepage and blog page cache purged for new post.

      Yes its not affect third party commenting system, like disqus, facebook etc.

      • Avatar for Mainak Ghosh

        If you add category and many other things which are related to post for Purge feature, that would be very helpful for us.

        Also after setting up the plugin which type Cache everything page rule need to add?
        after adding Global API Key does it automatically detect website no need to select website?

        • I am using Lightspeed plugin with Cloudflare. Will your plugin work along with Lightspeed cache plugin?

  3. Avatar for Tom

    Hello, thank you for your plugin but it doesn’t work for me. If I edit a post and save it and i leave it. My login is still visible in the default wordpress comment system. So i have to go to cloudflare purge all cache, wait a few seconds and go to incognito mode and then I’m actually logged out and my data is not visible to other users. I can give you an access to my site and you will see for yourself.

    • Avatar for Jumedeen khan

      Go to cloudflare dashboard and click on caching tab, now select Respect Existing Headers in “Browser Cache Expiration” settings. Your problem will be fixed.

  4. Avatar for Kerim Usta

    The plugin is really good … I hope the update is constantly being improved. Thank you so much

  5. Avatar for Rakesh

    If you recommend this Plugin then it will be best.

    We should use it. Thanks for recommendation.

  6. Avatar for Sumant Shah

    Really a great plugin. Thanks a lot.


Leave a Comment

I need help with ...