September 1, 2024
This article will walk you through the process of automatically logging out your WordPress users daily or on specific dates using the Inactive Logout Pro plugin. Auto-logout is a crucial feature for maintaining the security and integrity of your website, particularly when dealing with sensitive or premium content accessible only to paying members. By ensuring that user sessions are regularly terminated, you protect your site from unauthorized access or potential security breaches, safeguarding both your content and your users’ data. Whether you’re managing a membership site, an online course platform, or a secure portal, this proactive approach helps to reinforce your site’s defenses against intrusions and maintain the privacy your users expect.
People wanting to logout users each day or specific day regardless of their active sessions should use this as this will logout all users at the time of which user has defined from the settings page. All users or role specific users will be logged out even if they are actively engaged in the site at that time period.
One of the benefits would be to enhance security of unwanted sessions so that you can take action if you feel the sessions does not seem right.
You will first need to install inactive logout pro plugin and navigate to the “Inactive Logout” pro settings page where you will see various options to choose how you want your users to be logged out automatically certain days.
This works by adding a cronjob into your WordPress site which is then triggered in specific time that you have selected from the settings page. The settings page also gives you an idea of when your cron would run each day and time.
You will be able to define your own options like:
Beware when you define a time for this we recommend to schedule during midnight or morning when your users are not using your site because this will logout all users even the active and idle users.
If sometimes your logout times are unnatural and giving wrong times then this might be because of how default WordPress cron works. Normally, WordPress cron is only triggered if there are active sessions to your site so you might want to use a server cron if this behaviour is not working for you. You can check this post here to understand this behaviour.
We are always looking for solutions on your session security and we believe that this feature should be reasonably handy for certain users. If you have any feedbacks or want improvements to this you can always reach out to us through our support.
This feature will have developer hook support incase any developers want to integrate their own logout day time logics in the future but until version 2.11.0 this feature is locked with UI settings only. We’ll probably write down a post if this change is applied in future versions.
Cheers! Have some great Inactive Logouts in the meantime!
Get concurrent logins, browser close logout, and more by upgrading.