manifest / performance / wordpress-cache-protection
WordPress Cache Protection
Stop site cache busting bots/params.
by August Ash · github.com/augustash/wordpress-cache-protection · website
★ 0stars
7composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/augustash/wordpress-cache-protection/archive/refs/heads/master.zipAlso on Packagist as augustash/wordpress-cache-protection:
composer require augustash/wordpress-cache-protectionFrom the readme
WordPress Cache Protection
Protects WordPress page cache from fragmentation by tracking parameters and bot abuse.
Install
What it does
Hooks at plugin load and runs before WordPress queries posts.
Two modes for handling cache-busting query params:
- Redirect — 301 → clean URL. Varnish caches the 301, so subsequent dirty hits cost no PHP. Used for params that on-site JS doesn't read from window.location (default: srsltid, fbclid).
- Strip — internal rewrite of $GET / REQUESTURI. Browser URL stays dirty so client-side analytics/ads scripts can still read attribution from window.location; the application sees clean. Used for default: gclid, msclkid, kx, gbraid, gadsource, gadcampaignid, utm, hsa, hsmi, hsenc, hstc, hssc, hsfp.
Also strips Pantheon's =PANTHEONSTRIPPED leftovers.
Augments robots.txt with bot-throttling rules for known abuse patterns.
Search protection
Per-IP rate-limit + page-cache kill on search responses. Every search query is unique, so the page cache can never help; meanwhile bots blast random queries to fragment cache and stress the DB.
- Two flood windows: burst (default 5/10s) + sustained (default 30/60s). Either limit triggers 429.
- Cache-Control: pr