No matter how popular and convenient WordPress is, it’s full of annoying issues you must get rid of as quick as possible. One of these issues is when WordPress keeps logging out. Users feel clueless about why their website is logging them out of their admin dashboard and preventing from making any changes.
There are many reasons why this happens. In this post, we have discussed all common causes of the WordPress keeps logging out error and the solutions to fix it.
WordPress Keeps Logging out Error – Common Causes
Your WordPress saves a browser cookie when you log into it. Doing so helps the website authenticate your sign in session. If this cookie gets corrupted, your WordPress logs you out immediately with the message: “your session has expired”. This issue also occurs due to faulty plugins and outdated cache which resultsin signing out the user.
5 Easy Ways to Fix WordPress Keeps Logging out Problem
The following steps can help you easily get rid of the repeated logging out issue on WordPress.
- Check website URL
Most commonly, a simple error in your website’s URL setting can cause this problem. You can fix this by following these steps:
- From your WordPress admin account, go to Settings > General
- When the page opens, make sure that the Site Address and your WordPress Address are the same
- If they are dissimilar, it is causing the issue. For instance, if one is http:// and the other is https:// or if the one has www attached to it but the other does not, your website will keep you logging out
- Make the faulty one correct according to the right one
- If you can’t access your website’s dashboard, you can fix this error using FTP. Here, you need to edit the wp-config file and insert the following code before the line: “That’s all, stop editing! Happy blogging”:
define(‘WP_HOME’,’http://yoursite.com);
define(‘WP_SITEURL’,’http://yoursite.com);
- Clear Browser Cookies
As we said earlier, corrupt cookies can be a common reason why your WordPress is logging you out. All you need to do is simply go to your browser’s settings and clear all the cookies. Once done, check if the issue is resolved by logging into your account.
- Allow WordPress to save cookies
Sometimes, when your WordPress keeps logging you out, it’s because your web browser is not allowing it to save cookies. This means your WordPress is unable to save your login sessions. So, it logs you out.
You can resolve this issue by going to your browser’s settings and enable permission for WordPress to save cookies. The following are the steps for Chrome:
- Head to the three dots on the top of your browser and click Settings
- Click Advanced > Content Settings
- Enable “Allow Site to Save and Read Cookie Data” if it isn’t already
- Clear Cache of your Browser and website
One of the easy solutions to this issue is clearing browser and website cache. Depending on your browser, you can quickly remove cache. Once done, you can try logging into your WordPress again to see whether the issue has been resolved. In case, WordPress still logs you out, removing bad plugins will resolve the login issue.
- Disable Plugins
This one should be your last resort since it demands a bit of efforts. Many times, when others seem not to be the causes of the login problem in WordPress, it is the bad plugins that are found to be guilty. You can disable all active plugins and see if the problem is resolved. If yes, then you can try enabling each plugin one by one and checking which one actually caused the issue.
This method resolves WordPress login issues most of the time. So, you can try this one.