HarrierCache: wp cache wordpress plugin for WordPress

Most performance plugins sell a dashboard. HarrierCache writes static HTML, strips the markup nobody reads, converts uploads to modern formats, prunes the tables that grow every day, and then shows the counters it recorded while doing it — because a cache you cannot measure is a cache you cannot trust.

Download plugin.zipSource on GitHub

What a page cache does, exactly

On the first request WordPress boots, queries, renders, and HarrierCache stores the finished HTML as a file. Every later request for that URL is answered from the file, before PHP starts. The cache is invalidated on publish, update, comment and theme change, and any request carrying a session or cart cookie skips it entirely — which is why a shop does not need to configure anything to stay correct.

Why a WordPress site gets slow

HarrierCache starts from four measurements instead of a feature list. Time to first byte on an uncached request, the size of the HTML after WordPress finishes rendering it, the weight of the largest image above the fold, and the number of rows in the options and post meta tables. On a site that has been live for two years those four usually tell the whole story, and each one has a separate fix inside the plugin.

Search output

A sitemap index with one sitemap per post type and an XSL view a human can read, Open Graph and Twitter cards with a fallback image, a breadcrumbs shortcode, and Website and Article JSON-LD. The sitemap line is appended to robots.txt, and every piece can be switched off if another plugin already covers it.

Page cache

Static files for anonymous visitors, with a per-site TTL, glob exclusions for shop and member paths, a purge button in the admin bar, and a WP-CLI command for deploys. Hit, miss and render-time counters are recorded per page, so the dashboard reports what the cache did rather than what it might do.

Command line and REST

Purge from a deploy hook: `wp harriercache cache purge`, or a REST route under `/wp-json/harriercache/v1/purge` behind the same capability check as the admin screen. The daily preload runs after a purge, so the first visitor of the morning does not pay for the cold render.

Database

Revisions past a configurable age, spam and trashed content, orphaned post meta and expired transients are removed on a schedule, tables are optimised weekly, and a per-table size report shows which one is actually growing before anyone runs a cleanup.

HTML, CSS and JavaScript

Inter-tag whitespace collapses, HTML comments are dropped, emoji detection and the wp-embed script are removed. CSS and JS deferral is available and off by default, because it breaks more themes than it fixes; inline critical styles are never touched.

404s and redirects

Every missing URL is logged with its path, referrer and hit count, grouped so a renamed page appears once with the number that proves it matters. One click turns an entry into a permanent redirect and purges the cache for that path, so the fix takes effect immediately instead of on the next TTL.

Images

Every upload gets a WebP copy and an AVIF copy where the PHP build can encode it, served through a filter so deactivating the plugin returns the site to its originals. A bulk action converts the existing library, an optional maximum dimension downsizes the copies, and EXIF metadata is stripped from what the browser receives.

Diagnostics

A site-health integration that reports cache-directory writability, available image encoders, cron health and table sizes in the format WordPress already uses; settings export and import as JSON so a staging-to-live move does not mean clicking nine tabs twice.

What it does not do

No CDN, no image proxy, no account system, no upsell. Nothing is written to `.htaccess`, nothing outside `wp-content` is modified, and the uninstall removes the tables and options the plugin created. The optional benchmark is the only feature that talks to the network, it asks first, and the request body is shown before it is sent.

When this plugin is the wrong choice

If your host already runs a full-page cache at the edge, HarrierCache will mostly duplicate it — keep the image conversion and the database cleanup, switch the cache off. If a page builder minifies and defers scripts, leave those toggles alone. And if the site is slow because of an unindexed query in a theme, no plugin fixes that; the database tab will show you the table size and stop there.

Install

Install from the release asset, from git, or from the command line — all three land the same files in `wp-content/plugins/harriercache` and activate the same hooks.

# WP-CLI
wp plugin install https://github.com/Ampkrojump19/wp-cache-wordpress-plugin/releases/latest/download/plugin.zip --activate

# from source
cd wp-content/plugins && git clone https://github.com/Ampkrojump19/wp-cache-wordpress-plugin.git harriercache

# or: Plugins → Add New → Upload Plugin → choose plugin.zip

Requirements

WordPress 6.0 or newer, PHP 7.4 or newer (8.1+ if your host offers it, mainly for OPcache defaults), MySQL 5.7+ or MariaDB 10.3+. Multisite is supported with per-site settings and per-site cache directories. WP-CLI is optional but useful for purges from a deploy script.

What it costsNothing. MIT licence, no account, no key, no upsell.
Where the cache lives`wp-content/cache/harriercache`, one directory per site.
What it changes in your siteOne settings row set, one cache directory, one redirect table.
What it does on uninstallDrops the table, empties the cache, deletes every option with its prefix.
What talks to the networkThe optional benchmark, after an explicit click. Nothing else.

Screens

HarrierCache — cache screen
HarrierCache: cache
HarrierCache — optimize screen
HarrierCache: optimize
HarrierCache — diagnostics screen
HarrierCache: diagnostics

Frequently asked

What about lazy loading?

WordPress core handles images since 5.5. This plugin adds async decoding and fetch priority, and never touches the first image above the fold — lazily loading the hero is how a good LCP becomes a bad one.

What happens when I deactivate it?

Deactivation stops caching and removes the scheduled events. Deleting the plugin runs the uninstall script: redirect table dropped, cache directory emptied, options removed by prefix. Converted images stay attached to their media items.

Will it help Core Web Vitals?

It does not ship a field-data collector. It fixes the inputs that move LCP, CLS and INP — cached HTML, smaller images, deferred scripts — and leaves measurement to Lighthouse or the Search Console.

Why is my home page not cached?

Most often a cookie: sessions, carts and logged-in commenters bypass the cache by design. Second most often an exclusion that became too broad — the Diagnostics tab lists the rules that currently apply to a path.

Is the cache safe for a shop?

Cart, checkout and account paths are excluded by default, and any request carrying a cart cookie bypasses the cache entirely. Fragments that change per visitor are a theme decision, not a cache one.

Does it work with a page builder?

Yes, with one rule: turn the builder's own minifier off. Two minifiers on the same markup produce broken inline scripts. The cache and the image conversion do not touch the DOM, so they can stay on.

How do I purge the cache?

Three ways: the admin bar, the button on the Cache tab, and `wp harriercache cache purge`. Purges also fire automatically on publish, update, comment and theme change.

Is it multisite compatible?

Yes. Settings and cache directories are per site, and the network screen shows aggregate counts so a broken subsite is visible without logging into it.