PHPackages                             augustash/wordpress-cache-protection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. augustash/wordpress-cache-protection

ActiveWordpress-plugin[Caching](/categories/caching)

augustash/wordpress-cache-protection
====================================

WordPress equivalent of drupal\_cache\_protection. Strips/redirects tracking params so Varnish caches canonical URLs, augments robots.txt with bot-throttling rules, and exposes filters for site-specific extension.

1.0.2(3w ago)07GPL-2.0-or-laterPHPPHP &gt;=7.4

Since May 15Pushed 3w agoCompare

[ Source](https://github.com/augustash/wordpress-cache-protection)[ Packagist](https://packagist.org/packages/augustash/wordpress-cache-protection)[ Docs](https://github.com/augustash/wordpress-cache-protection)[ RSS](/packages/augustash-wordpress-cache-protection/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

WordPress Cache Protection
==========================

[](#wordpress-cache-protection)

Protects WordPress page cache from fragmentation by tracking parameters and bot abuse.

Install
-------

[](#install)

```
ddev composer require augustash/wordpress-cache-protection && ddev wp plugin activate wordpress-cache-protection
```

What it does
------------

[](#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` / `REQUEST_URI`. 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`, `gad_source`, `gad_campaignid`, `utm_*`, `hsa_*`, `_hsmi`, `_hsenc`, `__hstc`, `__hssc`, `__hsfp`.

Also strips Pantheon's `*=PANTHEON_STRIPPED` leftovers.

Augments `robots.txt` with bot-throttling rules for known abuse patterns.

Search protection
-----------------

[](#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: `private, no-store` on search responses so Varnish never caches them.
- Empty `?s=` (bare search form) doesn't trigger — stays cacheable.
- Default search param: `s` (WP core). Configurable.

Enabled by default; toggle off in Settings → Cache Protection.

Configuration
-------------

[](#configuration)

Settings → Cache Protection in the WP admin. Two textareas for redirect and strip lists, one param per line. Trailing `*` for prefix wildcards (e.g. `utm_*`). Search protection has its own section with the windows/thresholds.

Testing
-------

[](#testing)

```
ddev exec bash -c 'cd wp-content/plugins/wordpress-cache-protection && composer install && vendor/bin/phpunit'
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

25d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f09f3094dbf20ec7c4e7539132ab26b92f16b4aad1aed8812740383ca2af18?d=identicon)[kazajhodo](/maintainers/kazajhodo)

---

Top Contributors

[![kazajhodo](https://avatars.githubusercontent.com/u/1173204?v=4)](https://github.com/kazajhodo "kazajhodo (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/augustash-wordpress-cache-protection/health.svg)

```
[![Health](https://phpackages.com/badges/augustash-wordpress-cache-protection/health.svg)](https://phpackages.com/packages/augustash-wordpress-cache-protection)
```

###  Alternatives

[wp-media/wp-rocket

Performance optimization plugin for WordPress

7501.3M3](/packages/wp-media-wp-rocket)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[rhubarbgroup/redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

52799.8k1](/packages/rhubarbgroup-redis-cache)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[humanmade/batcache

A memcached HTML page cache for WordPress.

17464.7k6](/packages/humanmade-batcache)[vdlp/oc-redirect-plugin

Advanced redirect plugin for October CMS.

27100.7k1](/packages/vdlp-oc-redirect-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
