I am using Web Page Test to test the speed of my site and after activating a cache html page rule it was loading at 3.5 seconds when adding a second rule to bypass the WordPress admin example.com/wp-admin/. I looked at the cache analytics and noticed there where URLs like wp-cron and wp-json so I changed the admin page bypass rule to example.com/wp-*. However, after checking the speed of my site it now loads after 4.5 seconds so I have lost 1 second. Why has this happened and how do I get it back to 3.5 sec?
If you bypass cache for wp-*, then you’re bypassing cache for all the static files in wp-content, such as themes and uploads.
I have used the Dr Flare chrome extension and noticed there are also many .js files from wp-includes/js which are not being cached. So what should my bypass rule be if I want to include these 2 folders but not include dynamic URLs such as wp-cron?
Using a Cache Everything rule for a WordPress site is like playing with fire. And that’s why Cloudflare doesn’t cache HTML by default. You can try some more moderate page rules like:
- Match example.com/wp-* and add settings: Always Online (Off), Security Level (High), and Disable Apps. This makes the backend run smoothly, yet retain the caching for static files (Images, CSS, JS).
- Match example.com/* and add settings: Cache Level (Cache Everything), Edge Cache TTL (One Month). This will cache pages for your visitors.
For good reason.
In your response you stated “This makes the backend run smoothly, yet retain the caching for static files (Images, CSS, JS).” ? This is what I would like to achieve.
This topic was automatically closed after 14 days. New replies are no longer allowed.