1. Home
  2. Blog
  3. Performance

Check That Your WordPress Page Cache Is Really On: WP_CACHE, Drop-In and Header

Performance

October 16, 2026

Page caching is the largest single speed win in Lightify. It is also the one feature that can fail without telling you. The plugin activates, the dashboard looks normal, minification and lazy loading work, and every page is still being built from scratch by PHP and the database on every visit.

The Lightify docs say it plainly: confirming page caching is active is the one check worth doing after installing, because caching can fail silently. If you suspect your WordPress page cache is not working, this post walks through that check, what each status means, and how to fix the two common blockers in a couple of minutes.

WordPress page cache not working? Why it fails quietly

To cache pages, Lightify needs to make two changes outside its own folder:

  1. Add a WP_CACHE constant to wp-config.php.
  2. Write an advanced-cache.php drop-in into wp-content.

That is why the installation requirements list wp-config.php and wp-content as writable. If either write fails, the docs explain, everything else still works but pages are not cached. You keep the smaller wins and lose the biggest one.

The most common cause is not a broken server. Managed hosts often make wp-config.php read-only on purpose. The Lightify docs are clear that this is not a bug to fight. You just add the constant yourself.

Step 1: read the cache status

Lightify records its own caching status and shows it on the overview page. Developers can also read it from the REST API with POST /cache-status (it needs manage_options). There are three possible values:

StatusMeaningFix
activeWP_CACHE is set and the drop-in is installedNothing to do
wpconfigThe drop-in is in place but WP_CACHE could not be writtenAdd the constant by hand
dropinadvanced-cache.php could not be writtenMake wp-content writable

If you see active, skip to step 3 and confirm it from the outside. If you see either of the other two, the next step fixes it.

Step 2: fix the blocker

Status wpconfig: add WP_CACHE yourself

Open wp-config.php (through your host’s file manager, SFTP or SSH) and add this line above the line that says That's all, stop editing:

php
define('WP_CACHE', true);

If you have WP-CLI, one command does the same thing:

bash
wp config set WP_CACHE true --raw

You do not need to reinstall anything. Lightify repairs its status on every admin page load, so it picks up the constant the next time you open wp-admin. A problem that was only temporary fixes itself once the blocker is gone.

Status dropin: make wp-content writable

Lightify could not create wp-content/advanced-cache.php. Fix the permissions on wp-content so WordPress can write to it (your host’s support can do this if you cannot), then load any admin page. Lightify writes the drop-in and the status moves on.

While you are in there, it helps to know what Lightify creates, so nothing looks unfamiliar:

ItemLocation
Cached pageswp-content/cache/lightify/
Drop-inwp-content/advanced-cache.php
Rewrite rules.htaccess, on Apache
Optimized assets and service workerwp-content/uploads/lightify/

Step 3: confirm a page is really served from cache

A green status means the setup is right. The proof is the response itself. The docs give a one-line check:

bash
curl -sI https://example.com/ | grep -i x-lightify

Run it twice against a public page while logged out (the first request may be the one that builds the cache). On our own site, daftplug.com/, the response includes:

x-lightify-cache: HIT

Two things can make this check look wrong when it is not.

The header is missing on Apache. On Apache without mod_headers enabled, the header is silently skipped even though caching is working. Before concluding anything is broken, look for the cache files themselves under wp-content/cache/lightify/.

You are logged in. By default, signed-in visitors bypass the page cache. Test from a private window or with curl, not from the browser where you are logged into wp-admin. (If most of your traffic is logged in, Lightify has a separate Cache Logged In Users setting, with one copy per role. It is only safe when pages are identical for everyone in a role.)

The three ways Lightify serves a cached page

Once caching is active, which path serves the file depends on your server rather than your settings. The docs describe three serving levels:

  1. Rewrite rules, on Apache. .htaccess rules serve the cached file before WordPress loads at all. Fastest, because no PHP runs.
  2. A drop-in, everywhere else. The advanced-cache.php drop-in serves the cached file very early in WordPress, before plugins and the theme load.
  3. Output buffering, as a fallback. WordPress loads normally and Lightify serves the cached HTML from a buffer.

Every level serves the same file. The difference is how much work happens before it does. All three are in free Lightify.

When pages are cached but changes do not show

This is the other half of “is my cache working?” and the docs list it as the number one source of confusing reports. A cached page built before your change is still being served. Purge before you conclude anything.

The order the docs recommend is: purge Lightify, then your CDN, then your host’s cache. Lightify’s integrations handle much of this for you. It detects and purges Cloudflare (through the official Cloudflare plugin), Varnish, and the server caches of hosts such as Kinsta, WP Engine, SiteGround, Cloudways with Breeze and others. If you use Cloudflare without the official plugin, Lightify has no credentials to purge it, so purge Cloudflare by hand.

The admin bar has four manual purge controls: purge current page, purge cache and preload, purge pages and preload, and purge everything and preload. After any settings change, use purge everything, because existing cached pages were built under the old settings.

Common mistakes

Running two page caches. Another caching plugin alongside Lightify means two drop-ins fighting and unpredictable serving. Run one page cache only. (A host’s own server cache is different. Lightify is built to run alongside it and keep the two in step.)

Editing wp-config.php below the stop line. Constants defined after WordPress has started loading come too late. Put WP_CACHE above the “stop editing” comment.

Testing while logged in. You will see uncached pages every time and conclude caching is broken.

Judging speed before checking the status. If the status is not active, no other optimization will make up for it. Fix this first.

Where this sits in Lightify

Page caching, all three serving levels, the cache status, purging and preloading are all in free Lightify, and nothing on the Cache tab is gated. Pro adds the heavier optimizations such as removing unused CSS, delaying JavaScript and converting images to WebP. For a full walkthrough of the cache settings, see setting up full-page caching in WordPress. Lightify Pro comes with every other DaftPlug plugin under one membership; see pricing.