I have tried to increase session time, cookies time from admin panel And php.ini file. But both ways are not working for me. Still, the session expires in 30 mins. I want to make it for a day.
-
Thanks for the reply. But I have tried this before posting question, this is not working for me.– kaustubh borateCommented Feb 9, 2019 at 10:57
-
admin user or customer?– Satish DubariyaCommented Feb 9, 2019 at 11:51
-
For both admin and customer– kaustubh borateCommented Feb 9, 2019 at 12:01
-
[magento.stackexchange.com/questions/209710/…– kapil jivanrao dixitCommented Feb 14, 2019 at 11:44
-
@kaustubhborate Did You Find Any Solution For That?– Savan PatelCommented May 9, 2019 at 5:43
3 Answers
Stores > Settings > Configuration > Advanced > Admin > Security > Admin Session Lifetime (seconds)
Also there is a possibility to set this parameter directly to database, just put a value under path
admin/security/session_lifetime
in the table core_config_data
Update
Magento 2.1 admin cookie life time = Stores > Settings > Configuration
Advanced > Admin > Security > Admin Session Lifetime (seconds) or till the user closes the browser
Since Magento 2.1 introduces lifetime for admin cookie as "expires on browser close", together with value in Stores >Settings > Configuration > Advanced > Admin > Security > Admin Session Lifetime (seconds). That means, that session life time equals value in Stores > Settings > Configuration > Advanced > Admin > Security > Admin Session Lifetime (seconds) or when a browser is closed.
Or you can set up a new value for admin cookie, like it is proposed in fschmengler's answer
For Customer Session
Please check this magento user guide related to customer session
https://docs.magento.com/m2/ce/user_guide/customers/customer-online-options.html
I hope this will help
You can set the expired time in below configuration which can solved your problem. But If you close the browser then it will automatically session expired. Also after Magento 2.1 there are some enhancement build in version which can timeout the session after sometime for security reason.
Stores => Settings => Configuration => Advanced => Admin => Security => Admin Session Lifetime(Seconds)
Hope it can be helpful for you.
Thanks
To change the session timeout interval for the administrator in Magento 2, follow these steps:
- Log in to Magento using your administrator account.
- In the left sidebar, click Stores, and then under Settings, click Configuration.
- Click Advanced, and then click Admin.
- Under Security, in the Admin Session Lifetime (seconds) text box, type the session timeout interval in seconds that you want to use. For example, a value of 1200 sets a timeout interval of 20 minutes.
- Click Save Config.
- Log out of Magento, and then log back in. The new session timeout interval is now active.