Cache everything rule with Woo if I only have 3 rules

Hi,

Is there anyway to create a page rule to cache everything but not dynamic pages for WOO with 3 page rules? Because I don’t have “Bypass Cookies” option as below link:

Here are my rules so far for example

https://www.google.com/*
Cache everything

https://www.google.com/wp-admin/*
Cahce level: Bypass

Or only pro plan would work?

Thank you!

Cloudflare already caches everything reasonably possible on a dynamic page site such as WooCommerce. But you can emulate the “Bypass Cookies” option with Cloudflare Workers and a WordPress plugin:

1 Like

Thank you sdayman, is there a detail guide on how I can set up the Cloudflare Workers for Woo store?

I am using hummingbird plugin for cache, I am not super technical but I can follow if there is a guide. It would be much appreciated.

Also, do you recommend me remove all the Page Rules then?

Thanks!

Removing the two you listed would be a good idea. Especially since the first rule will cache wp-admin and the second rule won’t count after the first rule takes effect.

The link I posted is worth a solid read if you want to pursue this.

Thank you! I applied the theory from this:

image

https://www.krome.sg/blog/wordpress-plugin-and-cloudflare-worker-quick-guide/

For email and other credential, do I put them inside “” quotation?

Not sure if this would work, can I test this?

Yes, keep the quotation marks, and put your required data inside the quotes.

Now that KV is free for Workers users, if you’ve set up a Namespace and a binding, then those three entries can stay empty.

Sound good, so I create workers and run test on Cloudflare itself, not using any plugins, and the test says it runs “OK”.

I used pingdom to test, not sure what I should look for to make sure everything works like it should be, do you have any experience with it? like what to look for to make sure Worker worked and that everything with static pages are cached appropriately.

You still need the plugin. It’s what tells the worker how to control the cache for your site.

Gotcha! I will install plugin tomorrow and re-enter the code, after some sleep :slight_smile:

Thanks for the help! May have more questions later if I stuck :slight_smile:

1 Like

Sorry, one more question actually, I used siteground and activated cloudflare from there, does it matter if I need plugin then? I was afraid too many plugins would increase page load time.

The reason I asked is because I used pingdom to test page speed. The first time was 8 secs, then subsequent time tested, it went down to 3.8 secs on average. Does this mean this worked now?

The Worker won’t uhh…work…without that plugin.

Thank you! I think it works now when I used webpagetest. The First Pass has an A score there.

I turned off Rocket Loader because that is what caused my Java script loading issues.

For page rule, should I create any page rules from what I read here for WordPress Woo for better cache?

Thank you!

The only Page Rule you might consider from that article would be for Security Level (High) for wp-login.php to help fight off bots. And since you’re running WordPress, if you don’t already have a security plugin, I highly recommend Wordfence. It does a good job of blocking brute force attacks and site hacking.

I set rule like this:

image

Thanks for the help:

image

Please let me know if you have any other recommendations.

Thanks for all the helps :wink:

1 Like

Your rule match only needs to be *wp-bullet.com/wp-login.php*
You can leave off the scheme, so the match will apply to http/s, and the leading * handles any possible subdomains, such as www. I’m also recommending the trailing * in case someone tries to add a query string to bypass enhanced security.

This topic was automatically closed after 14 days. New replies are no longer allowed.