WordPress keeps logging out is one error that can be quite frustrating. If you are currently facing this issue, we understand how you feel.
Your site suddenly starts logging you out of your Admin Dashboard when you try to use it, leaving you unable to make changes to your site, and usually without a clue why this is happening.
Though there are many things that could cause this error, the source can usually (somewhat easily) be traced, and the problem fixed.
In this article, we will take you through the common causes of the WordPress keeps logging me out error, and steps you can take to fix it.
In This Article
- What Causes WordPress Keeps Logging Me out Error
- How to Fix This Error
What Causes WordPress Keeps Logging Me out Error
When you login to WordPress, it sets a browser cookie with which it authenticates your login session. If there are any errors with this cookie, such as a difference between the URL set in the cookie and the URL with which you are accessing your site, WordPress will be unable to authenticate your session and will thus log you out. Usually, you will see a message like “your session has expired”.
How To Fix This Error
The steps to fix this error usually involve working with cookies, cache or your site URL.
1. Check Site URL
In many cases, this problem occurs because of a simple error in site URL settings.
To access your site URL settings, go to Settings > General.
In the General Settings page, check to ensure the WordPress Address (URL) and Site Address (URL) are exactly the same.
If there are any differences, this would very likely be the cause of your issue.
For example, if one uses “https://” and the other uses “http://”, or one has www in front and the other doesn’t, then correct this so that they are both the same, and access your site.
If you are unable to access your dashboard, you can make these changes by accessing your site files with FTP, and editing your wp-config file to include the following information (insert this above the line that says “That’s all, stop editing! Happy blogging”):
2. Clear Browser Cookies
Since the log out issue is related to cookies stored in your browser, one simple solution that could resolve this issue is clearing your cookies.
Go ahead and clear cookies for your browser, and then login to your admin panel to see if the issue is resolved.
If yes, awesome! Otherwise, read on.
3. Clear Browser and Site Cache
Clearing your browser cache is another solution that could fix login issues. This should be pretty easy to do, depending on the browser you are using.
After successfully clearing your browser cache, login to WP to check if this error is resolved. If not, try clearing your site cache if you are using a caching WordPress plugins. When done, login to your site. Hopefully, this fixes your error.
4. Ensure WordPress Sites Are Permitted to Save Cookies
In some cases, this error might occur because your web browser is disabled from accepting cookies. When this happens, WordPress will be unable to save your session cookies, which means you will be logged out time and again.
To fix this error in chrome, click the 3 dots that open up your menu options and click Settings.
In the settings page, scroll down and click Advanced.
In the advanced options, look for Content Settings and click on it.
Check to see if Allow Site to Save and Read Cookie Data option is enabled. If it isn’t, enable it.
To do this in Firefox, click on Settings (the gear icon in the top-right). Next, click Privacy and Security, scroll down to the “Cookies and Site Data” section, and ensure Accept Cookies and Site Data is selected.
Now login to your site to see if this issue is resolved.
5. Disable Plugins
This is the last step to try if all else have failed. In some cases, an issue from one of your plugins could be causing this issue, and you can track down the source of the error by disabling plugins.
Read this article to learn how to do this: How to Disable WordPress Plugins Using FTP.
How Can You Use This Information?
You should now have no problems logging into and using your site. The steps covered in this guide provide the best fixes for the login issue you were encountering. If you are facing more WordPress errors you can always contact us or check our other WordPress tutorials and guides on our blog.
However, this error in WordPress can be quite hard to trace and fix in some cases. If this is so for you, you may decide to have one our developers check your site. Request our service now and we will get to work on it immediately.