Unable to login directly from my website (LiteSpeed Cache)

Hi, I have a problem with the log in of my website:

Steps to reproduce

I create an account through the sign in button on my website and I am then logged in. As soon as I log out and try to log back in, it does not work. I only get redirected again to my home page without being logged in.

I can only log in through a php or admin link, but obviously my users will not have that link, only my normal website URL. How can it be fixed?

Actual result

User does not get logged in.

Expected result

User is logged in normally.

Hopefully you can help!

Hi @Leon,

Please have a read through the following topic, and check if the recommended solution works in your case.

I hope this helps!

Cheers,
Chris :victory_hand:

1 Like

Hi Chris,

I tried several things and now noticed that the LiteSpeed cache plugin is the problem. As soon as I disable the plugin, it works. Changing several things within the plugin does not work.

Is there anything I can do about it? because as far as I know, the LiteSpeed plugin is important for the overall performance of websites. Hopefully you can help.

Thank you very much for the help until now!

Hi @Leon,

Glad to hear you’ve managed to pinpoint the cause. I’m not sure if you already seen this documentation:

Following it will ensure you’ve got the plugin set-up as recommended by the HivePress team.

I don’t personally use LiteSpeed, as my hosting provider has their own in-house optimization plugin that I use instead.

If the settings mentioned in the tutorial are still causing issues for you, you can try asking your hosting provider for help resolving the issue. Otherwise, Kseniia or Ihor may have some other suggestions when they get round to replying.

I hope this helps!

Cheers,
Chris :victory_hand:

1 Like

Hi,

Please try the solution from the article that Chris linked. If the issue persists, please let us know and we will investigate further.

Hi Kseniia,

I tried all the steps of the solution that Chris linked but after that it still wouldn’t work. I had to deactivate the plugin again to be able to log in directly from my website link.

I don’t have any solution for it, maybe you can help once more? that would be great!

Thank you very much!

Please make sure that LiteSpeed is set up according to the Cache Settings described here How to Speed up a HivePress-built Website | HivePress Blog For example, please check if REST API cache and cache for logged-in users is disabled.

We also have LiteSpeed installed on all of the theme demos https://listinghive.hivepress.io/ Please let me know if the same issue persists there, if so, we’ll debug this further as we officially recommend LiteSpeed cache for HivePress optimization.

Hey ihor,

I did exactly as described but the issue persists, so I just have to turn the whole plugin off for the login to work…

Hi Leon,

Thanks for the details.

Could you please let us know if the issue also occurs on our demo site: https://experthive.hivepress.io/

We also use LiteSpeed Cache there, and it is configured according to our article. If the issue does not reproduce on the demo, then it is likely something environment-specific on your hosting side.

In that case, please also make sure that your hosting provider does not have any server-side caching enabled that could potentially conflict with the site behavior or override dynamic content.