Magento allows configuring the customer session cookie lifetime from the Admin Panel. This guide explains how to adjust the browser-level session cookie lifetime through the Magento Admin Panel.
1. Log in to the Magento Admin Panel
2. Navigate to Stores > Configuration
3. Select Web > Default Cookie Settings
4. Locate Cookie Lifetime and enter the desired cookie lifetime in seconds (e.g., 3600 for 1 hour, 86400 for 24 hours)
Note: For a regular session cookie lifetime change, modifying Magento or PHP configuration files is not required. If customer sessions still expire earlier than configured, this should be investigated separately as a possible session storage, application configuration, browser, or environment-specific issue.
5. Click Save Config to apply the changes
After changing the settings, it is recommended to flush the Magento cache to ensure the changes take effect.
6. Navigate to the System > Cache Management
7. Click Flush Magento Cache