Are you repeatedly experiencing the “WordPress keeps logging me out” error message?Experiencing frequent logouts while using the WordPress admin dashboard can be very frustrating.
Don’t worry: we’ve been there and this WordPress logging you out issue can easily be fixed it!
This article aims to identify the causes and provides solutions for resolving this WordPress issue.
Quick Troubleshooting Guide To Solve The “WordPress Keeps Logging Me Out” Issue
The WordPress login out problem is almost always a cookie issue.
1. To get rid of it, clear your website and browser cache.
2. Then verify your WordPress admin address (with www and without).
3. Ultimately, deactivate your plugins one by one until the log-in issue is resolved.
Why My WordPress Keeps Logging Me out?
It is important to understand how WordPress works in order to understand why you keep getting logged out.
In order to authenticate a login session, WordPress sets a cookie in your browser. This cookie is set for the WordPress URL stored in your settings section.
This means that a discrepancy between the URL set in this cookie and the URL with which you access your site will block WordPress from authenticating your session and logging you out.
Anything that may corrupt the interaction between this cookie and your WordPress website might cause the error. Most of the time, you’ll see the “Session expired” message.
Ready to boost your productivity, impress your clients and grow your WordPress agency?
Install WP Umbrella on your websites in a minute and discover a new way to manage multiple WordPress sites.Get Started for free
Fixing The “WordPress Keeps Logging Me Out” Issue
Step 1: Solve Browser-Specific Issues
Your browser might be causing the WordPress logout problem. An expired cookie could be trying to authenticate your session through a cached version of the page within your browser. If this is the case, clearing your browser’s cache will fix the issue.
The issue could also come from the cookie that was already installed in your web browser for the website. In this situation, an expired cookie might override the most recent one, causing an error.
If clearing your browser’s cache didn’t work, try to delete all the cookies linked to your website.
If none of this is working, your browser’s cookie settings may be causing the problem. You may need to adjust them if they force your cookies to expire or refuse any kind of cookies.
If you don’t know how to clear cache, cookies and update your browser’s settings, check out this ‘how to guide‘.
Step 2: Clear The Cache of Your WordPress Site
If you’ve reached this point and still have a problem, the issue’s not your browser’s fault. The “WordPress keeps logging me out” issue could thus be caused by your WordPress site’s cache.
WordPress caches files and database queries to save time and server resources. It thus affects the load time of your site and the user experience in a positive way.
Changes to webpage content can be overlooked by the caching system. This can lead to outdated content or cause you to constantly log out.
Site caches can be cleared in a few clicks, but the process can differ based on your host as well as if you are using caching plugins.
Clear WP Rocket Cache
Go to Settings → WP Rocket → Dashboard tab and press the Clear cache button.
You may also do this through the WordPress toolbar. Click on WP Rocket’s menu link, and you will see a dropdown menu. Clear your browser’s cache by clicking the link.
Clear Cache in W3 Total Cache
Head over to Performance » Dashboard page and click on ’empty all caches button.
If you are using another caching plugin check its documentation.
Step 3: Check Your WordPress Site Address To Fix The Login Issue
A mismatch between the Site Address and WordPress Address fields can also result in involuntary logouts. Hopefully, it can also be fixed by making sure that your Site Address and WordPress Address fields are the same.
Log on to your WordPress dashboard and click Settings » General. Make sure that the same address is entered in both fields. Pay attention to the www.
If you can’t access the admin area, then you can edit these fields using the wp-config.php file.
Use an FTP client to connect to your website, then download the wp-config.php file to your desktop.
Open the file with your HTML editor and add this code just above the line That’s all, stop editing! Happy blogging.
Make sure to substitute mysite.com with your own domain name.
Step 4: Disable Plugins to Identify Conflicts
If nothing has worked so far, there may be a conflict with one of the plugins you’re using.
Whenever a plugin authenticates the session with a cookie, and the cookie isn’t properly set up or there is an issue with it, it can cause the WordPress login timeout error.
You have to disable your plugins manually to troubleshoot this probable cause.
Step 1: Use your FTP client to go to /wp-content and rename the plugins folder. Choose a clear name to avoid confusion in the future.
Step 2: Try refreshing your site and see if the issue has been resolved. If the fix worked, then restore the plugin folder’s original name. Refresh the page in your browser.
Step 3: Activate each plugin one by one until the error disappears. Then delete this plugin and contact its support.
Resolving the “WordPress keeps logging me out” issue generally involves the following steps:
- Clear Your Browser’s Cache & Cookies
- Fix Your Browser’s Settings
- Clear Your WordPress Site’s Cache
- Check Your WordPress Site Address
- Disable and Re-Enable WordPress Plugins
By following these steps, the login process should function as expected and logging into and using WordPress should now be a piece of cake!
Frequently Asked Questions About Login Issues In WordPress
You can use the plugin “Inactive Logout” to achieve this. This plugin allows you to configure the login timeout.
The easiest way to track sessions on WordPress is to install the plugin WP Activity Log. It provides detailed and real-time user activity reports, so you can know who is logged on your WordPress sites.
By default, WordPress sessions are stored in your file system according to your PHP settings. Your PHP.ini file should contain a session.save_path setting where all user sessions are stored.
There is no built-in function for this in WordPress, but you can easily add it yourself if you don’t want to use the Plugin WP Activity Log. To keep track of each user’s last login time, you can use the wp_login hook. Afterward, you can see which users have logged in in the past 30 minutes or so. Then, you can echo out the users that logged in within the timeframe of your choice.
In WordPress, logged-in users and authentication are managed through cookies. Additionally, cookies are used to remember a user’s name and email address if they submit a comment.