Have you ever encountered the issue of WordPress logging you out? If your WP keeps doing that, you can try these troubleshooting methods:
- Empty your WordPress cache.
- Deactivate your plugins and reactivate them one by one.
- Clear your browser’s cookies.
- Restore your WordPress from backup.
Sure, you can try all those methods to troubleshoot the solution to your problem. However, we recommend a simpler method – and that’s what this post is all about. Note that the WordPress keeps logging you out issue is also called WordPress session timeout. Therefore, the solutions presented below are applicable to both.
Table of Contents
Possible Reasons Why WordPress Keeps Logging You Out
While the WP session timeout issue can be annoying, there’s a reason behind it. It’s actually for security reasons why WordPress has allowed this problem to happen. First of all, WP has set cookies in your browser so that it can check and authenticate each and every login from your computer or device.
The cookies are set for your website address which is found in the Settings section of your Dashboard. Therefore, if you’re using a different address (URL), this will not match up with your current WordPress settings. And as such, WordPress will refuse to authenticate your login details and log you out every time you get in (if you do get in, that is).
WordPress Timeout Issue – Option 1
For the simple problem of having 2 different addresses in your settings, just go to your website’s WordPress Dashboard and click on the Settings option. After that, click on the General tab to check on your site’s addresses.
At this point, just make sure that your WordPress address and Site address are the same. Basically, you just need to choose between having the www or not having it. If you see that they’re not the same, this is probably the reason why your session keeps logging out. So, just edit and correct the details and the problem will be solved (just make sure that the addresses are the same, ok?).
If that doesn’t solve the problem, you can try Option #2 below.
WordPress Timeout Issue – Option 2
If you can’t execute Option #1 because you can’t access the WordPress Dashboard and Admin area, you can edit your site’s wp-config.php file on your server.
For this option, you need to connect to your website through an FTP client like FileZilla. Once connected, go to the root directory and look for the wp-config.php file. Download said file and open it using a text editor like Notepad (any text editor will do).
Insert this code above the text:
The only difference in the above codes is that the first one has the www prefix while the second one doesn’t carry it.
How Do Options #1 and #2 Work?
Both Options #1 and #2 work for the logging out issue because there’s a big chance that you are logging into two different URLs. Yes, technically, a domain or website that use www is different from one that doesn’t use the www prefix.
Yes, that’s mostly the problem (different addresses) and solution (make them the same). So, just update the information in your system and there’s a big chance that the timing out and logging out issues won’t happen again.
More Tips on WordPress Issues
While we’re on the subject, please note that incorrect settings in the WordPress and Site Addresses can cause other problems – that’s why it’s really important to fix this problem quickly. You see, even if you’re not logged out, redirect issues can happen – and you don’t want that, right?
Rebecca’s strengths are in SEO and data analysis, but she also knows her way around WordPress pretty well, and is in charge of finding specific WordPress problems that people have, and then offer solutions.
Check our about page for more info.