Litespeed cache plugin issue with login

ello HivePress team,

I’m experiencing a consistent issue with the login functionality on the homepage of my website.

Symptom: the user logs in successfully, but the homepage still shows the “Log in / Register” link. When navigating to any other page, or even refreshing the menu updates and correctly displays the account area, confirming that the login itself is valid.

I have carefully applied all the recommendations shared by HivePress in previous threads reporting the exact same behavior with LiteSpeed Cache. However, the issue persists with any combination of those settings; the only way to fully resolve it is by completely deactivating the LiteSpeed Cache plugin.

I saw a post with the same problem, but the fix there was not useful at all. Iv been fighting with this problem for weeks now, can someone please help.

Hi @TheWorke888,

It sounds like you need to disable caching for logged-in users.

This snippet may do the trick:

Code snippet to disable caching for logged in users

I hope this helps!

Cheers,
Chris :victory_hand:

2 Likes

Hi,

Please let me know if the solution provided by ChrisB resolved the issue. If not, could you please specify which HivePress theme and plugin version you’re using?

1 Like

Thank you for your answer, i already disabled it directly in the litespeed cache plugin, it ended up getting fixed, im not entirely sure how but i think it was caused by the multiple layers of caching i’v had on the website (the plugin, hostinger and cloudflare)

2 Likes

Pleased to hear you’ve got things sorted out, @TheWorke888! :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.