1. Home
  2. Blog
  3. Performance

Cache WordPress Pages for Logged-In Users, One Copy per Role

Performance

October 5, 2026

Most WordPress speed advice quietly assumes your visitors are anonymous. Turn on a page cache, the first visitor builds the page, everyone after them gets a static file, and your time to first byte drops to almost nothing. That works beautifully for a blog read by strangers.

It does almost nothing for a membership site. On a course platform, a private community, or a members-only publication, most traffic is signed in. The standard rule is that logged in requests bypass the page cache, because WordPress cannot be sure the page is the same for everyone. So the visitors who pay you get the slowest version of your site, rebuilt by PHP and the database on every click.

Lightify has a setting for exactly this. Cache Logged In Users lets you cache WordPress pages for logged-in users, with one cached copy per WordPress role. This guide explains how it works, when it is safe, how to exclude the pages that are genuinely personal, and how to recover fast if you get it wrong.

Lightify is the DaftPlug performance plugin. The feature described here lives on its Cache tab and, according to the Lightify docs, nothing on that tab is gated, so it is available in the free version too.

What Lightify actually ships here

From the Lightify documentation for Settings > Cache:

  • Cache Logged In Users is a toggle in the Page cache section, off by default.
  • It caches pages for signed-in visitors with a separate copy per WordPress role. Everyone with the same role shares a cached page.
  • The stated purpose: making caching viable on membership sites and communities, where most traffic is logged in and would otherwise bypass the cache entirely.
  • The warning that comes with it: only enable it if pages are identical for everyone in a role. If your theme prints a user’s name, points balance, or anything per person, one member’s page can be served to another.
  • Page Exclusions is a textarea of URLs or patterns that should never be cached, one per line, matched on any part of the URL.
  • WooCommerce cart, checkout, and account pages are excluded automatically by the WooCommerce integration.

The docs also say page caching is the largest single improvement Lightify offers and that it works without configuration. Cache Logged In Users is one of the settings that exist “for the cases where one cached copy is not enough.”

Why caching logged-in users matters

Signed-in traffic is often your most valuable traffic. Members, students, and customers are the people paying for access. Making them wait on an uncached render for every lesson, thread, or article is the opposite of what you want.

Uncached logged-in pages are expensive for the server. Every request boots WordPress, loads plugins, queries the database, and renders templates. On busy membership sites that load adds up fast, especially when a new lesson or announcement sends everyone to the same page at once.

Role-level caching matches how many sites are built. On a lot of membership and LMS sites, the content a member sees is decided by their level, not their identity. A “Gold” member sees the Gold lessons. A “Student” sees the course index. If that is how your site works, one copy per role is accurate and safe.

It speeds up the pages members open most. The course index, the article archive, the resource library, and individual lessons are typically the same for everyone in a role. Those are also the pages opened most often.

How role-based caching works

The model is simple. When a logged-in user requests a page, Lightify looks at their WordPress role and serves the cached copy built for that role. If no copy exists yet, the request is rendered normally and stored for that role. The next user with the same role gets the stored copy.

That means three things in practice:

  1. Anonymous visitors, subscribers, and members get different copies. Content that differs by role stays correct.
  2. Two users with the same role get the same copy. Content that differs by person will leak if it is printed in the page.
  3. Your cache grows by roughly the number of roles that browse the front end. A site with three front-end roles holds about three copies of each popular page.

The rule to remember comes straight from the docs: this is only safe when pages are identical for everyone in a role.

Audit your pages before you flip the switch

Spend fifteen minutes on this. It is the difference between a faster site and an incident.

Log in as two different test users who share a role. Open the same set of pages side by side and look for anything that differs. Common culprits:

  • Greetings like “Welcome back, Maria” in the header or menu.
  • Avatars and usernames in a top bar or account dropdown.
  • Balances and progress: points, credits, course completion percentages, streaks.
  • Personal lists: “Your bookmarks”, “Your recent orders”, “Continue where you left off”.
  • Notifications counters for messages or replies.
  • Forms prefilled with the user’s email or name.

For each difference, decide where it lives. If it appears only on specific pages, such as a profile or dashboard, exclude those pages. If it appears on every page, for example a greeting in the global header, you have two choices: remove or move that element (some themes let you load it client side), or leave Cache Logged In Users off. The docs are clear that leaving it off is the right answer when personal content is everywhere.

How to enable it in Lightify

1. Confirm page caching is actually active

The Lightify installation docs focus on getting page caching active before anything else. Visit a page as a logged-out user in a private window and confirm cached responses are being served. There is no point tuning logged-in caching if the base cache is not running.

2. Add your personal pages to Page Exclusions

Open Lightify > Settings > Cache and fill in Page Exclusions with the URLs that show per-person content. One per line, matched on any part of the URL. For example:

/my-profile
/dashboard
/members/messages
/notifications
/my-courses/progress

You do not need to add WooCommerce cart, checkout, or account pages. The WooCommerce integration excludes them automatically. If you are already excluding store pages by hand, the related guide on page cache exclusions for cart, checkout, and account explains which paths matter and why.

3. Turn on Cache Logged In Users

Enable the toggle and save.

4. Purge everything

The Lightify docs recommend using Purge everything after any settings change, because existing cached pages were built under the old settings. The admin bar on any page has the purge controls:

ControlEffect
Purge current pageRebuilds just the page you are viewing
Purge cache and preloadClears everything, then warms it again
Purge pages and preloadClears the page cache only
Purge everything and preloadClears all caches, including optimized assets

5. Test with two accounts in the same role

Repeat the audit from earlier with caching on. Log in as user A, load your key pages, then log in as user B with the same role in a different browser. User B should see their own name in any place that is not cached, and nothing of user A’s anywhere. Then test a user with a different role and confirm they see their own level of content.

6. Watch your real-visitor numbers

Lightify measures Core Web Vitals from your actual visitors rather than a synthetic test. After enabling logged-in caching, check whether time to first byte improves on the pages members use most. That is the metric page caching moves most directly.

If something leaks, act in this order

The Lightify troubleshooting page has an entry titled “Logged-in users see each other’s content”, and the instructions are short:

  1. Turn off Cache Logged In Users immediately.
  2. Purge the cache.
  3. Find the per-person content, exclude those pages, and only then turn the setting back on.

Keep this in your runbook. The fix takes less than a minute if someone knows where it is.

What page caching still cannot help

Some requests will always be uncached: wp-admin, excluded pages, and anything genuinely personal. The Lightify docs point to an object cache for those. It keeps database query results in memory and speeds up exactly the requests page caching cannot serve.

Lightify’s Object cache section is informational. It detects whether Redis or Memcached is available and whether an object-cache.php drop-in is installed and working, then tells you. It does not install anything. If a backend is available and no drop-in exists, the docs advise installing a dedicated object cache plugin. One warning is worth repeating: a drop-in that is installed but not working is worse than none, because WordPress tries to use it on every request.

The troubleshooting page also says that if TTFB is still poor on uncached requests after adding an object cache, the cause is your hosting rather than the plugin.

Who this is for

  • Membership and subscription sites where access is decided by level or role.
  • LMS and course platforms where lessons and course pages are the same for every enrolled student in a role.
  • Private communities and intranets where most browsing happens while signed in.
  • Publishers with paywalls whose subscriber pages are identical across subscribers.

It is less useful on sites where nearly every page is personalized, such as dashboards with per-user feeds. There, exclusions would cover most of the site, and object caching will help more.

Pitfalls (the ones that bite)

Turning it on without the audit. The most common failure is a username in a global header. Check before you enable.

Forgetting to purge after changing settings. Old cached pages were built under the old rules. Purge everything.

Enabling Separate Mobile Cache by reflex. The docs say to turn that on only if your site serves different HTML to phones. A responsive theme does not need it, and it doubles your cache for no benefit. Combined with per-role copies, the multiplication adds up.

Running two page caches. The troubleshooting page lists another caching plugin as a conflict. Run one page cache only.

Forgetting BuddyBoss private mode. If you run BuddyBoss in private network mode, it blocks REST routes for logged-out visitors. Lightify’s integration allows its own routes through, so you do not need to work around it, but it is worth knowing why it is there.

Practical checklist

  1. Confirm the base page cache is serving logged-out visitors.
  2. Audit two same-role accounts for any per-person content.
  3. Add personal pages to Page Exclusions.
  4. Leave WooCommerce cart, checkout, and account to the integration.
  5. Enable Cache Logged In Users.
  6. Purge everything and preload.
  7. Retest with two same-role accounts and one different-role account.
  8. Check TTFB in Lightify’s real-visitor data for member pages.
  9. Check the Object cache section for uncached requests.
  10. Write the rollback steps in your runbook.

Takeaway

You can cache WordPress pages for logged-in users safely when your pages are identical within a role. Lightify keeps one copy per role, excludes WooCommerce’s private pages automatically, and gives you a textarea for everything else that is personal. Audit first, exclude what is personal, purge after every change, and keep the two-step rollback ready.

Logged-in caching is part of the free Lightify cache. The Pro features that usually move the score most, according to the Lightify docs, are Remove Unused CSS, Delay JavaScript Execution, Auto Image Optimization to WebP, and Preload Critical Images. Pro comes through one DaftPlug membership that unlocks Lightify along with Progressify, Generatify, Rankify, and Snapshotify. Plans differ only by site count (Pro $37.99 a year for 1 site, Pro Plus $74.99 for 5, Pro Max $138.99 for 100), with a 14-day money-back guarantee. See pricing when your members deserve the same speed as your anonymous visitors.