# Longer session time - how to change it?

**URL:** <https://forum.mautic.org/t/longer-session-time-how-to-change-it/24877>\
**Category:** General Discussion\
**Created:** [July 26, 2022, 3:18pm UTC](https://forum.mautic.org/t/longer-session-time-how-to-change-it/24877 "2022-07-26T15:18:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [July 26, 2022, 3:18pm UTC](https://forum.mautic.org/t/longer-session-time-how-to-change-it/24877/1 "2022-07-26T15:18:49Z")

</div>

How do we change session time to longer than 10-15 minutes before we are booted off Mautic which sometime wrecks our session because when we log back in then start working on something, it would pop up some token error and state to refresh our browser to fix it.

Refreshing our browser is what we wound up losing our work due to timeout on session time. We would like to change it to 12 hours before it times out on us in the middle of our works.

We did a search and it seems some asked about it in Mautic 3 but it all went unanswered.

Is there a way to change sessions timeout in Mautic 4 now?

Thank you  
BIll

---

<div class="post-metadata">

**Author:** ![leonardoborlot](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/leonardoborlot/32/72_2.png) [@leonardoborlot](https://forum.mautic.org/u/leonardoborlot)\
**Post date:** [July 26, 2022, 5:39pm UTC](https://forum.mautic.org/t/longer-session-time-how-to-change-it/24877/2 "2022-07-26T17:39:55Z")

</div>

Maybe could you enhance the session time in php.ini

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 26, 2022, 6:18pm UTC](https://forum.mautic.org/t/longer-session-time-how-to-change-it/24877/3 "2022-07-26T18:18:34Z")

</div>

> [@CSRF token error. Try to refresh the page and try again](https://forum.mautic.org/t/csrf-token-error-try-to-refresh-the-page-and-try-again/16839/11):
>
> I applied another workaround but not sure how good it is, but it works well. change php.ini from session.gc\_maxlifetime = 1440 to session.gc\_maxlifetime = 14400 Whoa, 10x longer cookie lifetime. (restart apache of course)
