# Changing the Magento administrative session timeout interval

> Change how long Magento waits before logging out an inactive administrator, in Magento 2 or older Magento 1.9 stores.

Source: https://helpcenter.ruachost.com/apps/magento/changing-the-magento-administrative-session-timeout-interval/

Magento automatically logs out administrators after a period of inactivity. This is controlled by the **session timeout interval**. On **ruachost.com**, you can adjust this setting to balance convenience and security.

## Why Change the Timeout?

- **Security** → Shorter timeouts reduce risk if an admin leaves a session open.
- **Convenience** → Longer timeouts prevent frequent logouts during extended work.

## Steps to Change the Timeout Interval

### Magento 2

1. Log in to Magento using your **administrator account**.
2. In the left sidebar, click **Stores → Configuration**.
3. Under **Advanced**, click **Admin**.
4. Expand the **Security** section.
5. In the **Admin Session Lifetime (seconds)** field, enter the desired timeout value.

   - Example: `1200` = 20 minutes.
6. Click **Save Config**.
7. Log out and back in for the new setting to take effect.

### Magento 1.9 and Older Versions

1. Log in to Magento using your **administrator account**.
2. On the top menu bar, click **System → Configuration**.
3. In the left pane, scroll down and click **Advanced → Admin**.
4. Click **Security**.
5. In the **Session Lifetime (seconds)** field, enter the desired timeout value.

   - Example: `1200` = 20 minutes.
6. Click **Save Config**.
7. Log out and back in for the new setting to take effect.

## Important Notes

- The timeout value is measured in **seconds**.
- Default value is controlled by the PHP directive `session.gc_maxlifetime`.
- Always balance usability with security, avoid excessively long timeouts.
- If unsure, consult **ruachost.com  support** for recommended values.
