3

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.

6

3 Answers 3

4

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

4

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

2

To change the session timeout interval for the administrator in Magento 2, follow these steps:

  1. Log in to Magento using your administrator account.
  2. In the left sidebar, click Stores, and then under Settings, click Configuration.
  3. Click Advanced, and then click Admin.
  4. 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.
  5. Click Save Config.
  6. Log out of Magento, and then log back in. The new session timeout interval is now active.
2
  • Did it work for you?
    – Atif Ameer
    Commented Feb 9, 2019 at 12:56
  • Did not work for me. .. Thanks.. Commented Feb 9, 2019 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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