• Home
  • WordPress
  • web Hosting
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • page Speed
  • Deals
  • Services
  • About

RAaz Kumar .com

wordpress tutorials seo hosting etc


Cloudflare cache rules for WordPress along with page rules cache level everything

 

New Cloudflare cache rules beta allowed wordpress users to bypass cache on cookie, no need for paid rule and APO.

1st set cache level everything in page rules.  (its really complicated after enabling)

 

2nd go cache rules beta

 

add following 4 rules recommend by isoumya

mycase, even after i enabled the APO $5 month bypass on cookie not working. caching also not working on new website. old one wprked fine. but i added below rules as a 2nd layer option.

 

go to Caching > Cache Rules.

Cache Rules Section

 

Then inside the Cache Rules page, click on the Create Cache Rule button. Then finally on the Create new Cache Rule page, click on the Edit Expression link.

Edit Expression Link

Make sure you replace example.com with your actual website hostname e.g. something.com or www.something.com etc. in the code given below before copy/pasting it.

Rule Name: Add the following in the Rule Name section Cache Bypass — WP Admin Paths, WooCommerce API, EDD API Endpoints

Rule Expression: Add the following expression inside the expression builder section.

(
  http.host eq "example.com" and
  (starts_with(http.request.uri.path, "/wp-admin") or starts_with(http.request.uri.path, "/wc-api/") or starts_with(http.request.uri.path, "/edd-api/"))
)

Cache Status: Set it to Bypass Cache.

Rule 2 ➜ Cache Bypass — XML, XSL & PHP Files

Rule Name: Add the following in the Rule Name section Cache Bypass — XML, XSL & PHP Files

Rule Expression: Add the following expression inside the expression builder section.

(
  http.host eq "example.com" and
  (http.request.uri.path contains ".xsl" or http.request.uri.path contains ".xml" or http.request.uri.path contains ".php")
)

Cache Status: Set it to Bypass Cache.

Rule 3 ➜ Cache Bypass — Default Bypass Cookies

Rule name: Add the following in the Rule Name section Cache Bypass — Default Bypass Cookies

Rule Expression: Add the following expression inside the expression builder section.

(
  http.host eq "example.com" and
  (http.cookie contains "wordpress_logged_in_" or http.cookie contains "comment_" or http.cookie contains "woocommerce_" or http.cookie contains "wordpressuser_" or http.cookie contains "wordpresspass_" or http.cookie contains "wordpress_sec_" or http.cookie contains "yith_wcwl_products" or http.cookie contains "edd_items_in_cart" or http.cookie contains "it_exchange_session_" or http.cookie contains "comment_author" or http.cookie contains "dshack_level" or http.cookie contains "auth_" or http.cookie contains "noaffiliate_" or http.cookie contains "mp_session" or http.cookie contains "xf_" or http.cookie contains "mp_globalcart_") and
  not http.request.uri.path contains "."
)

Cache Status: Set it to Bypass Cache.


Optional Rule

Rule 4 ➜ Cache Eligible Requests & Ignore Unnecesary Query Params from cacheKey

Rule name: Add the following in the Rule Name section Cache Eligible Requests & Ignore Unnecesary Query Params from cacheKey

Rule Expression: Add the following expression inside the expression builder section.

(http.host eq "example.com" and not starts_with(http.request.uri.path, "/wp-admin") and not starts_with(http.request.uri.path, "/wp-json/") and not starts_with(http.request.uri.path, "/wc-api/") and not starts_with(http.request.uri.path, "/edd-api/") and not http.request.uri.path contains ".xsl" and not http.request.uri.path contains ".xml" and not http.request.uri.path contains ".php" and not http.request.uri.query contains "s" and not http.cookie contains "wordpress_logged_in_" and not http.cookie contains "comment_" and not http.cookie contains "woocommerce_" and not http.cookie contains "wordpressuser_" and not http.cookie contains "wordpresspass_" and not http.cookie contains "wordpress_sec_" and not http.cookie contains "yith_wcwl_products" and not http.cookie contains "edd_items_in_cart" and not http.cookie contains "it_exchange_session_" and not http.cookie contains "comment_author" and not http.cookie contains "dshack_level" and not http.cookie contains "auth_" and not http.cookie contains "noaffiliate_" and not http.cookie contains "mp_session" and not http.cookie contains "xf_" and not http.cookie contains "mp_globalcart_")

Cache Status: Set it to Eligible for cache.

all rules fpr copying at a time replace with your website

(
http.host eq “nursejobalert.com” and
(starts_with(http.request.uri.path, “/wp-admin”) or starts_with(http.request.uri.path, “/wc-api/”) or starts_with(http.request.uri.path, “/edd-api/”))
)

(
http.host eq “nursejobalert.com” and
(http.request.uri.path contains “.xsl” or http.request.uri.path contains “.xml” or http.request.uri.path contains “.php”)
)

(
http.host eq “nursejobalert.com” and
(http.cookie contains “wordpress_logged_in_” or http.cookie contains “comment_” or http.cookie contains “woocommerce_” or http.cookie contains “wordpressuser_” or http.cookie contains “wordpresspass_” or http.cookie contains “wordpress_sec_” or http.cookie contains “yith_wcwl_products” or http.cookie contains “edd_items_in_cart” or http.cookie contains “it_exchange_session_” or http.cookie contains “comment_author” or http.cookie contains “dshack_level” or http.cookie contains “auth_” or http.cookie contains “noaffiliate_” or http.cookie contains “mp_session” or http.cookie contains “xf_” or http.cookie contains “mp_globalcart_”) and
not http.request.uri.path contains “.”
)

(http.host eq “nursejobalert.com” and not starts_with(http.request.uri.path, “/wp-admin”) and not starts_with(http.request.uri.path, “/wp-json/”) and not starts_with(http.request.uri.path, “/wc-api/”) and not starts_with(http.request.uri.path, “/edd-api/”) and not http.request.uri.path contains “.xsl” and not http.request.uri.path contains “.xml” and not http.request.uri.path contains “.php” and not http.request.uri.query contains “s” and not http.cookie contains “wordpress_logged_in_” and not http.cookie contains “comment_” and not http.cookie contains “woocommerce_” and not http.cookie contains “wordpressuser_” and not http.cookie contains “wordpresspass_” and not http.cookie contains “wordpress_sec_” and not http.cookie contains “yith_wcwl_products” and not http.cookie contains “edd_items_in_cart” and not http.cookie contains “it_exchange_session_” and not http.cookie contains “comment_author” and not http.cookie contains “dshack_level” and not http.cookie contains “auth_” and not http.cookie contains “noaffiliate_” and not http.cookie contains “mp_session” and not http.cookie contains “xf_” and not http.cookie contains “mp_globalcart_”)

API Key example
7dbd717a40098f97e3d5d6de23ddbed92519b

 

if you are using Super Page Cache for Cloudflare plugin

Remove Cache Buster Query Parameter option in the plugin settings & Purge the whole Cloudflare Cache
Inside the Super Page Cache for Cloudflare plugin settings, go to the Other tab and scroll down. You will see an option named Remove Cache Buster Query Parameter.

source : https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2

Related topics:

  1. Cloudflare page rules cache level everything redirect and sub domain
  2. website cache best caching plugins wordpress w3tc cloudflare
  3. nginx fastcgi cache wordpress how to configure
  4. CDN comparison & integration price cloudflare keycdn, amazon google self hsoted for wordpress
  5. enable caching in apache server (mod cache disk cache) vs fastcgi cache

wordpress tutorials for beginners advanced complete guide to run WordPress

  • Lazy Load Adsense to improve core web vitals - Vs revenue
  • W3TC w3 total cache plugin setup guide review comparison with wp rocket and wp super cache
  • Wordpress database optimization (don't neglect) plugins & phpmyadmin manually
  • Optimize css delivery inline critical css, remove unused css, render blocking css
  • Converting WordPress into static website speed after 1 second dynamic 3 seconds
  • Wordpress errors and fix
  • Rules to get 100/100 in Google pagespeed web core vitalsscore
  • Install xamp & wordpress on localhost windows
  • favicon ico Change / Add / Disable favicon in wordpress Ft Genesis Theme or any theme
  • increase wordpress memory limit (how to ) 40MB , 64 MB 128 MB or 512 MB maybe 1024MB
  • wp cron job check working or not disable enable change schedule
  • google analytics plugins for wordpress #sitekit #monsterinsights gadwp back as gainwp
  • enable browser caching in wordpress apache nginx caching headers explained
  • xmlrpc php wordpress uses, disable without 403 error log message
  • wordpress change post date programmatically (auto on update like blogger
  • sorry you are not allowed to access this page. admin WordPress options table
  • clone wordpress in linux ubuntu server lemp nginx
  • Cloudflare cache rules for WordPress along with page rules cache level everything
  • wordfence-waf.php fatal error fixed after migration
  • Cloudflare page rules cache level everything redirect and sub domain
  • wordpress delete all posts from database mysql query for phpmyadmin
  • php fpm oom killer problem how to dig it.. memory pool and execution time
  • nginx wordpress multisite subdirectory
  • Wordpress duplicate thin content Issues {FIXED}
  • best wordpress plugins social, seo, Backup, speed up your blog
  • TOP 10 Wordpress Themes Premium/ Free & providers
  • Wordpress Adsense Plugins & Manually
  • Social share buttons for website Wordpress Blogger
  • How to bulk delete in wordpress posts, pages, Media Images, tags and categories
  • TOP 5 Best wordpress comment plugins 2020 (disable pingback, replytocom, customize form)
  • all in one seo pack vs yoast seo pressor
  • Auto post to Facebook, twitter, Google Plus Wordpress Posts 2019
  • wordpress plugins that slow down your site and its alternatives
  • How to use wordpress tags and categories
  • wordpress speed optimization Speed up wordpress Score on Google pagespeed
  • how to increase wordpress memory & file upload size
  • combine rss feeds wordpress
  • Reduce the impact of third-party code ,optimize JS delivery, Minify, remove unused js, pre connect, inline, lazy load etc
  • change wordpress site url internal links in mysql command phpmyadmin
  • install wordpress on ubuntu nginx lemp command line apache debian
  • Wordpress Security Plugins 2021 (Brute force, Login lockdown, Malware scanner etc)
  • website cache best caching plugins wordpress w3tc cloudflare
  • How to add adsense amp ads to wordpress
  • wordpress password reset in 3 ways mail, phpmyadmin, mysql command
  • how i recovered hacked website site 5 times ft wordpress?

 

 

wordpress Pagespeed optimization

Digitalocean free $100 Credit

Cloudways Review pricing promo codes

Siteground cpu limits Pricing

Shared Hosting

Managed wordpress Hosting

Managed Hosting Cloud server

VPS Hosting

Cloud Hosting – Unmanaged

Google cloud Pricing

Aws Pricing

Azure pricing

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

LEMP Install Ubuntu

Mysql Performance Tuning

Nginx Performance tuning

Linux Performance tuning

Php -fpm performance tuning

Redis Performance tuning

linux server security

nginx security best practices

wordpress security plugins

 

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2023 - All Rights Reserved Disclaimer & Privacy Policy