I have increase cookies lifetime for the customer but it not working. After customer login, 1 to 2-hour customer stay login if he/she close browser then again start browser at that time customer need to log in again is anyone have an idea how to set cookies lifetime for a customer?



Look inside your server php.ini file

SSH in and type to found your php.ini location: php -i | grep "Loaded Configuration File"


Lifetime in seconds of cookie or, if 0, until browser is restarted.

session.cookie_lifetime = 0

0 value= Clear session every time you restart the computer or close and open browser.


After this number of seconds, stored data will be seen as 'garbage' and

cleaned up by the garbage collection process.

session.gc_maxlifetime = 1440

1440 value Sec = 24 Minutes

both Values need to be at least: 86400

if you change this two values to 86400 your issue must be solved.

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.