Magento set session cookie lifetime to 1 day
Is your Magento shopping cart kicking out all the items after 24 minutes? Are you frustrated because your customer’s cart items are getting flushed every few hours even though you have correct setting in Magento? Do you want to increase your shopping cart sessions to last for 1 day (or anything you wish)?
Here are the things to look for to increase/decrease Magento’s session cookie lifetime.
In your php.ini file:
session.gc_maxlifetime 86400 |
If you have not changed this, it should be by default 1440 i.e. 24 minutes. Change it to 86400 for one day session lifetime
In your Magento admin:
System -> Configuration -> Checkout -> Shopping Cart | |
Quote Lifetime (days) -> 1 |
System -> Configuration -> Web -> Session Cookie Management | |
Cookie Lifetime -> 86400 |
Make sure to check if you are in correct website/store if using multi-website/multi-store Magento setup. You can change the scope by changing the website/store from the upper left Store Switcher drop down in System -> Configuration screen.
If you are changing php.ini value, make sure you reload apache to reflect the changes.
4 Comments
Leave a comment
Welcome to my Blog
Certifications
Honor
Recognition
Contributions
Categories
- Apache (2)
- ChatGPT (1)
- Domain name (2)
- eCommerce (2)
- htaccess (1)
- Humor (3)
- Instagram API (1)
- jQuery (4)
- JSON (1)
- Linux (10)
- Magento (142)
- Magento admin (58)
- Magento Certification (5)
- Magento error (13)
- Magento frontend (68)
- Magento Imagine (2)
- Magento Interview (5)
- Magento Master (2)
- Magento2 (10)
- Mobile (1)
- MySQL (7)
- OpenAI (1)
- OroCRM (2)
- Performance (2)
- PHP (8)
- Prototype JS (3)
- Security (4)
- Wordpress (3)
- XML (2)
Very useful post… thanks a lot !
Thank you for summary this effective solution to this recurring magento issue!
Thanks for putting this together. I am surprised that there are magento stores who have not implemented this. This directly impacts all the marketing campaigns.
I am pretty new to magento but May I know that the above setting will work for non logged in user ? If not then what should be the approach.