When entering the WordPress dashboard for website management, many webmasters will click the “Remember Me” box. This way, when next time they need to enter the website back-end, they can get an auto login without the need to type the long and complicated account name and password.
However, it is possible to lose this great convenience when encountering the issue of WordPress auto logging out your account. If you are bothered to take time for remembering and typing your account and password each time you log in your WordPress admin, the following tips can be effective to resolve this issue.
Tip 1 – Deactivate All Your Plugins and Third-Party Templates
No matter what issue you have met in your WordPress site, this is the first practice you should carry out. After all, you cannot ensure that the plugins and templates you have downloaded from some third parties are bugging-free, without any conflict between each other.
If you can enjoy the auto account login after disabling all of them, it means that one of your plugins or themes is the reason for causing this issue. Then, you can active them one by one to target the trouble maker.
For deactivating the plugins in a bulk manner, you simply need to go to the Plugins tab of your administrative panel, click the Deactivate button under the Bulk Actions drop-down menu, and then click the Apply button. As for disabling your current theme, you can go to the Appearance tab and click the Themes button. Then, target the default WordPress themes like Twenty Fifteen for activation.
Tip 2 – Clear Cache and Cookies
This step is required if you have installed a cache plugin and have fixed the issue. After all, the old cache data and browser cookies may override your recent modification, bringing the logging out issue one more time.
For website cache, you can click the Delete Cache button in your WordPress admin.
For browser cookies, here, we take Google Chrome as an example. You only need to click the Menu icon and then hit the Tools button. After that, target the Clear Browsing Data option. Or, you can clear the cookies by typing Ctrl+Shift+Del in your keyboard.
Tip 3 – Revert Back to Previous Website Version
It is possible that the changes you have made on your WordPress architecture simply cause the issue. Therefore, you can try to use your latest backup file to restore your site to the previous version. If the issue is resolved, you can double check the two versions to figure out which part leads to the problem. You can check this post to learn about WordPress backup and this one for WordPress restoration.
Tip 4 – Check Out WordPress General Settings
In the General Setting of your WordPress admin, you can find two settings about WordPress Address and Site Address. The former one indicates the location where the WordPress core files reside, and the latter one is the online address for people to enter your content. Both of these two URLs should be totally same, coming with the HTTP in the beginning and a slash at the end. Any difference between them can lead to the issue of WordPress logging out.
This is because WordPress sets a cookie to authenticate your login session for WordPress Address. If you enter from the Site Address that does not match WordPress Address, the system cannot authenticate your login.
In this case, simply go to your General Settings and make the two URLs totally same.
Tip 5 – Configure the Login Timeout of WordPress
By default, WordPress sets a timeout cookie for each login, which does not force you to authenticate your account one more time. Generally, the cookie expires after 48 hours, but you can extend the session to stop WordPress from logging you out.
To achieve this, you simply need to edit the function.php file of your current template and enter the following coding stuff. The number of days can be configured based on your preference.
If you are not comfortable with the coding, you can also adopt the Configure Login Timeout plugin. In the setting page, you can decide the number of days for normal authentication timeout and the “Remember Me” authentication timeout.