> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Changing the Magento administrative session timeout interval

> You can change the amount of time before Magento automatically logs out idle administrative sessions. Just use this article for step by step instructions!

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.

<Tip>
  To determine the current value of the\
  **session.gc\_maxlifetime** PHP directive on your server, use the\
  **phpinfo()** function as described in [this article](/docs/view-php-settings).
</Tip>

### Magento 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.

### 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:

1. Log in to Magento using your administrator account.

2. On the top menu bar, click **System**, and then click **Configuration**.

3. In the **Configuration** pane on the left side, scroll down the page, and then under **ADVANCED**, click **Admin**.

4. Click **Security**.

5. 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.

6. Click **Save Config**.

7. Log out of Magento, and then log back in. The new session timeout interval is now active.

## Related articles

* [Adding CAPTCHA protection to a Magento site](/docs/adding-captcha-protection-to-a-magento-site)

* [Optimizing Magento](/docs/optimizing-magento)
