How to change the Magento administrative session timeout interval
This article describes how to change the administrative session timeout interval in Magento.
Changing the session timeout interval
By default, Magento automatically logs out administrators when connections are idle for a certain amount of time (specifically, the value of the session.gc_maxlifetime PHP directive). However, you can increase or decrease this interval according to your own requirements.
To determine the current value of the
session.gc_maxlifetime PHP directive on your server, use the
phpinfo() function as described in
this article.
Magento 2
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.
Magento 1.9 and older versions
To change the session timeout interval for the administrator in Magento 1.9 and older versions, follow these steps:
- Log in to Magento using your administrator account.
- On the top menu bar, click System, and then click Configuration.
- In the Configuration pane on the left side, scroll down the page, and then under ADVANCED, click Admin.
- Click Security.
- In the Session Lifetime 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.
Related Articles