Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] swpm_session cookie slows my site to a crawl

Simple Membership Plugin › Forums › Simple Membership Plugin › swpm_session cookie slows my site to a crawl

  • This topic has 1 reply, 1 voice, and was last updated 2 months, 1 week ago by admin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 12, 2026 at 5:16 am #32303
    smallwarfare
    Participant

    Seems lie every page creates an swpm_session cookie from the Simple WordPress Membership plugin. It is preventing StackCDN from caching public pages…which makes my site slow down to a crawl.

    If I go into → StackCache → Advanced Settings and consider Remove All Cookies From My Homepage is that going to disrupt anything? what is the other option?

    September 12, 2026 at 5:18 am #32305
    admin
    Keymaster

    First, some context on that cookie. swpm_session is not the login cookie. The plugin assigns every visitor a random session ID, and that ID is used only as a key for short-lived front-end status messages (registration errors, profile update confirmations, password reset notices). It expires when the browser closes and holds no member data.

    It is also only issued once per visit, not on every page. The Set-Cookie header goes out on the first request, and after that the cookie is simply present in each request. So what is slowing you down is the CDN treating any request that carries a cookie as uncacheable, rather than the plugin re-issuing it each time.

    The cookie you actually want the cache to react to is swpm_in_use (and wp_swpm_in_use). We set that one only when a member logs in, specifically so caching layers can bypass the cache for logged-in members while still serving cached pages to everyone else. Full cookie list here:
    https://simple-membership-plugin.com/cookies-used-by-simple-membership-plugin/

    What I would recommend:

    1. Ask their support to ignore swpm_session in the StackCDN caching decision, and to bypass cache only when swpm_in_use, wp_swpm_in_use or wordpress_logged_in_* is present. This is the proper fix and it applies site-wide. StackCache itself has no cookie exclusion field, so this has to be done at the CDN/edge level.
    2. In StackCache > Cache Exclusion, exclude your membership pages: the login page, the join/registration page, the thank you page, and any member-only pages. Those should never be served from cache.
    3. Leave everything else cached as normal.

    On “Remove All Cookies From My Homepage”: it only affects the homepage, so it will not solve the problem across the rest of your site. It is safe if your homepage is plain public content with no membership elements. Do not enable it if your homepage contains the login form or login widget, the registration form, or protected content, because stripping cookies from that response also strips the login cookies and the login will silently fail.

    I would also leave “Remove PHP Session Cookies From All Pages” alone. That targets PHPSESSID, not our cookie, and it can break other plugins.

    More background on caching and membership sites:
    https://simple-membership-plugin.com/understanding-the-impact-of-caching-on-membership-sites/

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy