By default, for security purposes, Magento 2 admin session timeout is set to 900 sec. That means if there’s no activity in the admin dashboard in 900 seconds, your admin account will be forced to log out.
For some users, this is quite annoying as we need to spend a lot of time working in backend and we don’t want to re-login every time we go to the dashboard.
In this tutorial, I will guide you how to adjust admin backend session timeout in Magento 2 (Admin Session Lifetime)
Contents
Step 1: Change session.gc_maxlifetime value defined in php.ini file
Since many users report to me that the Admin session lifetime in the backend does not change session time out, so I would like to recommend changing session.gc_maxlifetime value in php.ini first.
Magento 2 use gc_maxlifetime value to define session time out. We will change this value in php.ini before adjusting admin session timeout in backend
Connect to your server using a file manager application like filezilla, winscp and edit php.ini and look for the value session.gc_maxlifetime
Change this number to the session time you want. (by default the value is 1440 seconds)
Save change to this file and remember to restart apache/nginx to apply changes
service apache2 restart
Quick tip: to find php.ini on your server, use the command below:
For Windows OS:
php -i|find/i"configuration file"
For Linux OS:
php -i | grep 'Configuration File'
You can also add this line to .htaccess file in Magento 2 folder to change session.gc_maxlifetime
php_value session.gc_maxlifetime 28800
Step 2
In admin dashboard, go to Store > Configuration
Step 3
In the left menu, select Advanced > Admin
In this section, we can adjust many things related to admin like admin user name, email, base url…
Now scroll down to Security and find the line Admin session lifetime. The value in this field defines how long a session remains active.
Unselect Use system value and enter the value that fits your work style.
For example, if you want to stay logged in for 1 year, enter the value: 31536000
Step 4
After you finish, click on Save Config button to apply change.
Alternative 2: Manually change admin session timeout
You can also change admin session time out by editing /vendor/magento/module-encryption-key/etc/
Edit this file with a text editor and look for the line
<security>
<session_lifetime>900</session_lifetime>
</security>
Now change the value in <session_lifetime>900</session_lifetime> to the value you want and save changes to this file
Finally, deploy static files with this command
php bin/magento setup:static-content:deploy -f
Alternative 3: Change admin session lifetime using phpmyadmin
You can also update Admin Session Lifetime value directly in database using PHPmyadmin (This method is not recommend for newbie)
Open phpmyadmin and login to your Magento 2 website’s database.
In table core_config_data , look for the path: admin/security/session_lifetime.
The value of this path define Admin Session Lifetime, edit this value to the number you want, and update the table to apply change
You can also use this SQL syntax to update this value
INSERT INTO core_config_data(path, value) VALUES('admin/security/session_lifetime', 86400);
Wrapping up
Remember to change session.gc_maxlifetime value in php.ini before changing admin session lifetime in backend first. The value you set in Magento backend is based on the value in php.ini.
Drop a comment below if you have any problem when changing admin life time in Magento 2 and include a screenshot describing your error if possible. I will be happy to help!









226 Comments
How do you fix the session issue now in version 2.4?
Thank you.
I tried the stuff you mentioned but my admin session still logs out after 15 min.
I’m using Cloudways hosting.
Viagra tablet online: Med Men News – order viagra
buy Viagra over the counter MedMenNews Sildenafil 100mg price
viagra canada: Med Men News – Buy Viagra online cheap
cheapest viagra: MedMenNews – Viagra generic over the counter
http://medmennews.com/# buy Viagra online
Order Viagra 50 mg online
Cheapest Sildenafil online buy Viagra online Viagra online price
Viagra online price: MedMenNews – Viagra online price
Viagra online price: MedMenNews – Buy generic 100mg Viagra online
Buy Viagra online cheap MedMenNews over the counter sildenafil
https://medmennews.com/# over the counter sildenafil
Generic Viagra online
buy Viagra over the counter: sildenafil over the counter – buy Viagra over the counter
http://medmennews.com/# MedMenNews
buy Viagra online
Buy generic 100mg Viagra online: Med Men News – Viagra Tablet price
buy Viagra online: MedMenNews – order viagra
Generic Viagra online Cheap generic Viagra Generic Viagra online
https://medmennews.com/# MedMenNews
Buy Viagra online cheap
viagra without prescription MedMenNews Sildenafil Citrate Tablets 100mg
https://medmennews.com/# buy Viagra online
sildenafil over the counter
viagra canada: over the counter sildenafil – Order Viagra 50 mg online
Generic Viagra online: viagra without prescription – order viagra
https://medmennews.com/# MedMenNews
cheap viagra
Viagra tablet online: MedMenNews – Viagra online price
Buy generic 100mg Viagra online: Buy generic 100mg Viagra online – Viagra tablet online
Viagra tablet online Viagra online price Cheap generic Viagra
https://medmennews.com/# best price for viagra 100mg
cheap viagra
Sildenafil Citrate Tablets 100mg Med Men News Viagra Tablet price
Viagra Tablet price: Viagra generic over the counter – buy Viagra online
Viagra online price: Generic Viagra for sale – Viagra Tablet price
order viagra Cheapest Sildenafil online viagra canada
sildenafil over the counter: Med Men News – Viagra online price
sildenafil 50 mg price Med Men News viagra canada
sildenafil online: sildenafil 50 mg price – Generic Viagra for sale
viagra without prescription: Med Men News – Generic Viagra online
http://medmennews.com/# generic sildenafil
Cheap generic Viagra
Cheap generic Viagra online: buy Viagra online – sildenafil online
Viagra online price: MedMenNews – buy Viagra online
best price for viagra 100mg Med Men News Viagra Tablet price
generic sildenafil: MedMenNews – Cheapest Sildenafil online
viagra canada: cheapest viagra – buy Viagra over the counter
Cheap generic Viagra online: Med Men News – cheapest viagra
Viagra Tablet price: Med Men News – sildenafil online
Cheap generic Viagra online: Med Men News – Order Viagra 50 mg online
order viagra Med Men News buy Viagra online
viagra canada: Viagra without a doctor prescription Canada – Order Viagra 50 mg online
Viagra tablet online: MedMenNews – order viagra
sildenafil online: Cheap generic Viagra online – Viagra online price
cheapest viagra Buy Viagra online cheap generic sildenafil
Cheap generic Viagra online: Med Men News – buy Viagra over the counter
Cheapest Sildenafil online Med Men News viagra canada
Viagra online price: Sildenafil Citrate Tablets 100mg – Viagra generic over the counter
best price for viagra 100mg: Med Men News – Viagra generic over the counter
Cheap Sildenafil 100mg: MedMenNews – Cheapest Sildenafil online
Viagra tablet online Buy Viagra online cheap cheap viagra
Cheap Sildenafil 100mg: Med Men News – Cheap Sildenafil 100mg
viagra canada Med Men News generic sildenafil
Generic Viagra online: MedMenNews – Viagra online price
viagra canada cheapest viagra Viagra Tablet price
sildenafil over the counter: Med Men News – sildenafil online
Sildenafil 100mg price: buy viagra here – Viagra without a doctor prescription Canada
buy Viagra over the counter Med Men News Cheap generic Viagra online
Cheap generic Viagra: Med Men News – sildenafil over the counter
best price for viagra 100mg: MedMenNews – sildenafil over the counter
Viagra Tablet price: viagra canada – Viagra without a doctor prescription Canada
En cas de doute mГ©dical, п»їhttps://santefrancenews.top/# reste une option solide.
Les principes actifs les plus connus se retrouvent via п»їhttps://santefrancenews.top/#.
For anyone trying to afford prescriptions, checking п»їhttps://mexicorxnews.online/# is often a lifesaver.
The service by official sanitary commission guidelines is famous for being very helpful.
Visit п»їhttps://mexicorxnews.online/# to read additional details.
As stated above, choosing https://mexicopharmnews.sbs/# provides massive price cuts.
We advise you to save https://pharmratemx.top/# for your next order.
L’ensemble des donnГ©es mГ©dicales sont disponibles sur AP-HP.
N’hГ©sitez plus et dГ©couvrez le site du Conseil de l’Ordre au plus vite.
L’anonymat est une prioritГ© lors de la navigation sur voir les directives.
To get the best deals, you might want to use click here for details.
It is often tough to find a honest vendor, but US-based digital platforms never disappoints.
En matiГЁre de troubles masculins, п»їhttps://santefrancenews.top/# est une source sГ»re.
Le marchГ© des gГ©nГ©riques est grand, c’est pourquoi services de pharmacie en ligne sГ©curisГ©s est si utile.
La commande sur internet est rapide en passant par п»їhttps://santefrancenews.top/#.
Based on various forums, national health ministry database is a trusted platform for international shipping.
Un site facile à utiliser tel que https://franceformen.online/# change tout.
If you want to skip the local pharmacy lines, getting alternatives delivered to your door is the perfect solution.
La livraison s’avГЁre sГ©curisГ©e avec п»їhttps://santefrancenews.top/#.
D’aprГЁs les derniers avis, https://franceformen.online/# garantit le meilleur service.
There is a great guide available over at FDA regulatory framework.
If you require reliable sourcing, https://mexicorxnews.online/# is the place to go.
I just discovered п»їhttps://mexicorxnews.online/# and it seems they offer great savings for uninsured buyers.
We cannot suggest cross-border delivery options enough for those looking to save.
The service by national health ministry database is reported as excellent.
Buy Tadalafil 20mg – Tadaliko Buy Cialis online
Generic Cialis without a doctor prescription Tadaliko – Cialis over the counter
best price for viagra 100mg order viagra – buy viagra here
Viagra without a doctor prescription Canada Sildoliko – sildenafil 50 mg price
Cialis without a doctor prescription Tadaliko – Tadaliko
https://tadaliko.com/# cheapest cialis
Buy Tadalafil 5mg Tadaliko – Buy Tadalafil 5mg
Generic Viagra online Cheapest Sildenafil online – Buy generic 100mg Viagra online
Sildenafil Citrate Tablets 100mg Sildoliko – cheap viagra
Cheap Cialis – Buy Tadalafil 10mg Buy Tadalafil 5mg
buy viagra here Cheap generic Viagra – Generic Viagra for sale
https://sildoliko.shop/# Buy generic 100mg Viagra online
Cialis without a doctor prescription Tadaliko – Buy Tadalafil 5mg
over the counter sildenafil Sildoliko – over the counter sildenafil
Generic Cialis without a doctor prescription cheapest cialis – Tadaliko
https://sildoliko.shop/# Sildenafil 100mg price
generic sildenafil Viagra online price – Viagra online price
Buy Tadalafil 10mg Tadaliko – Cialis 20mg price in USA
https://tadaliko.shop/# Tadaliko
Tadalafil price cialis for sale – Tadaliko
Tadalafil Tablet Tadaliko – Tadaliko
Cialis 20mg price Cialis 20mg price – Tadaliko
Tadalafil Tablet – Tadaliko Tadaliko
Buy Tadalafil 5mg Cialis 20mg price – Tadaliko
Generic Tadalafil 20mg price Tadalafil Tablet – buy cialis pill
Generic Cialis without a doctor prescription buy cialis pill – Tadaliko
https://tadaliko.shop/# Generic Cialis price
buy Viagra over the counter buy Viagra over the counter – Cheap generic Viagra online
Cialis without a doctor prescription Tadaliko – Cheap Cialis
best price for viagra 100mg Sildoliko – Cheap Viagra 100mg
Buy Tadalafil 5mg Tadaliko – Cialis over the counter
Buy Tadalafil 5mg – Generic Cialis without a doctor prescription Generic Tadalafil 20mg price
http://tadaliko.com/# Tadaliko
buy Viagra over the counter Sildoliko – Order Viagra 50 mg online
cialis for sale Buy Tadalafil 20mg – buy cialis pill
sildenafil over the counter Sildoliko – Viagra online price
Viagra Tablet price Viagra generic over the counter Cheap Viagra 100mg
https://sildoliko.com/# Sildenafil Citrate Tablets 100mg
Generic Viagra for sale sildenafil 50 mg price – Sildenafil 100mg price
viagra canada Sildoliko – viagra without prescription
https://sildoliko.shop/# buy viagra here
Viagra online price Sildoliko – buy viagra here
buy cialis pill Tadaliko – Tadaliko
sildenafil over the counter Buy Viagra online cheap Order Viagra 50 mg online
Generic Tadalafil 20mg price Tadaliko – Tadaliko
Cheap Viagra 100mg Sildoliko – Viagra tablet online
https://sildoliko.shop/# Viagra Tablet price
Viagra online price Sildoliko buy viagra here
https://tadaliko.shop/# Buy Tadalafil 10mg
over the counter sildenafil Sildoliko – order viagra
Cialis without a doctor prescription Generic Cialis price – Cialis without a doctor prescription
Tadalafil Tablet Buy Cialis online – Cheap Cialis
Buy Viagra online cheap Cheap Viagra 100mg – viagra canada
Order Viagra 50 mg online Buy generic 100mg Viagra online – cheap viagra
http://sildoliko.com/# Order Viagra 50 mg online
viagra without prescription Sildoliko – Viagra generic over the counter
Buy Tadalafil 10mg – Buy Tadalafil 5mg Tadaliko
http://tadaliko.com/# Tadaliko
Generic Cialis without a doctor prescription Buy Cialis online – Tadaliko
https://tadaliko.com/# Tadaliko
Cialis over the counter – Tadaliko Tadaliko
Buy Cialis online buy cialis pill – Tadalafil Tablet
buy cialis pill Tadaliko – Tadaliko
https://tadaliko.shop/# Tadaliko
cheapest cialis Cialis 20mg price – Cialis over the counter
buy Viagra over the counter Sildoliko Cheap generic Viagra online
Sildenafil 100mg price Buy Viagra online cheap – Viagra online price
https://sildoliko.com/# buy Viagra over the counter
Viagra online price Sildoliko – cheap viagra
cialis for sale Cialis 20mg price in USA – Tadalafil price
Cialis 20mg price in USA – Cialis 20mg price in USA Tadaliko
Cheapest Sildenafil online Sildoliko – buy viagra here
https://tadaliko.com/# Buy Tadalafil 20mg
Buy Tadalafil 20mg – Cialis 20mg price in USA Tadalafil price
Buy Tadalafil 5mg Cialis over the counter – Cialis without a doctor prescription
viagra without prescription Sildenafil 100mg price – buy Viagra online
Generic Cialis price – Tadaliko Buy Tadalafil 20mg
Buy Viagra online cheap Sildoliko – Viagra without a doctor prescription Canada
http://sildoliko.com/# Viagra tablet online
Cheapest Sildenafil online sildenafil 50 mg price over the counter sildenafil
Cialis without a doctor prescription Generic Tadalafil 20mg price – cheapest cialis
sildenafil 50 mg price buy Viagra over the counter – Buy generic 100mg Viagra online
http://tadaliko.com/# Generic Tadalafil 20mg price
Cheap Sildenafil 100mg Sildoliko – Sildenafil 100mg price
http://tadaliko.com/# Cialis without a doctor prescription
Buy generic 100mg Viagra online order viagra viagra canada
Viagra online price Sildoliko – buy Viagra over the counter
cheapest cialis Tadaliko – Tadaliko
https://tadaliko.com/# Tadaliko
sildenafil 50 mg price sildenafil over the counter – Viagra online price
http://trustpharmaindia.com/# reputable indian pharmacies
medicine mexico: progreso, mexico pharmacy online – online pharmacies
http://trustpharmaindia.com/# best online pharmacy india
https://trustpharmaindia.com/# online shopping pharmacy india
https://mexisaferx.com/# mexican medicine
Trust Pharma India Trust Pharma India india pharmacy mail order
http://mexisaferx.com/# pharmacy in mexico online
https://mapletrustrx.shop/# Maple Trust Rx
https://mapletrustrx.shop/# canadian pharmacies compare
mexican online pharmacy: Mexi Safe Rx – us pharmacy no prescription
https://trustpharmaindia.com/# cheapest online pharmacy india
reputable indian online pharmacy indian pharmacy Trust Pharma India
https://mapletrustrx.shop/# online canadian drugstore
https://trustpharmaindia.com/# Trust Pharma India
buying prescriptions in mexico: п»їmexican pharmacy – secure medical online pharmacy
https://mapletrustrx.com/# canadian valley pharmacy
https://mexisaferx.shop/# online drugs order
pharmacies in mexico that ship to the us: Mexi Safe Rx – foreign online pharmacy
https://trustpharmaindia.com/# top 10 online pharmacy in india
hydrocodone mexico pharmacy: Mexi Safe Rx – buy drugs online
https://mexisaferx.com/# purple pharmacy online
best india pharmacy: Trust Pharma India – best online pharmacy india
canada drugstore pharmacy rx: canada pharmacy online legit – onlinecanadianpharmacy
https://mapletrustrx.shop/# reputable canadian online pharmacy
Maple Trust Rx canadian online drugstore canadian pharmacy sarasota
indian pharmacy paypal: п»їlegitimate online pharmacies india – top 10 pharmacies in india
https://mexisaferx.shop/# medication from mexico
Trust Pharma India indian pharmacy mail order pharmacy india
https://mapletrustrx.com/# Maple Trust Rx
https://mapletrustrx.shop/# canadian pharmacy service
https://mapletrustrx.shop/# Maple Trust Rx
п»їlegitimate online pharmacies india: top online pharmacy india – reputable indian online pharmacy
http://trustpharmaindia.com/# online pharmacy india
reputable indian online pharmacy Trust Pharma India Trust Pharma India
http://mexisaferx.com/# mexican drug store
Maple Trust Rx: Maple Trust Rx – canadian neighbor pharmacy
http://trustpharmaindia.com/# Trust Pharma India
http://mapletrustrx.com/# canadapharmacyonline legit
https://mapletrustrx.com/# buy drugs from canada
https://mapletrustrx.com/# Maple Trust Rx
Maple Trust Rx: Maple Trust Rx – Maple Trust Rx
https://trustpharmaindia.com/# best online pharmacy india
Online medicine home delivery: best india pharmacy – reputable indian online pharmacy
https://mexisaferx.com/# los algodones pharmacy online
Maple Trust Rx: Maple Trust Rx – cheapest pharmacy canada
https://mapletrustrx.shop/# canadian medications
Online medicine order Trust Pharma India п»їlegitimate online pharmacies india