Ref - same issue link

Everything enabled but still facing cart expiry in hour issue for guest checkout, any idea? My Magento version is 2.3.1


"If a guest shopper later logs in or creates a new account, the shopping cart is restored." (from the Magento documentation, link below).

Therefore you will lose the cart information when the session expires but will see the data again if you create an account or login.

You can also just increase the session lifetime to a higher value (default is one hour). Depending on the traffic you have, the session handling / system ressources and the expectation of how long the cart should be available you can use here a value that could be an option for you.


  • why guest user cart empty in 1 hour? I set cookie time - 86400 sec – Magento2 Devloper Jul 5 at 12:01
  • If you have set that value for the session lifetime, first check if the cookie set in your browser has the correct lifetime. If yes, most likely you have some kind of garbage collection for your sessions (e.g. standard PHP session storage in filesystems has by default a garbage collector which removes sessions with 24 minutes incativity - session.gc_maxlifetime = 1440). session.gc_maxlifetime should be greater than your Magento session lifetime. – HelgeB Jul 5 at 13:01
  • Without server side it's not possible to fix code base? – Magento2 Devloper Jul 5 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.