Home Tutorials How to Fix the WordPress Keeps Logging Out Problem (6 Strategies)

How to Fix the WordPress Keeps Logging Out Problem (6 Strategies)

When you’re making an attempt to work in your web site however WordPress retains logging you out, you’ll possible begin to really feel fairly pissed off. Not solely is it annoying to have to re-enter your credentials each couple of minutes, nevertheless it will also be time-consuming and interrupt your workflow.

This drawback is commonly the results of a problem with the cookies WordPress makes use of to ensure you’re licensed to entry the backend of your website. Luckily, this implies the resolution is normally pretty easy.

On this tutorial, I’ll stroll you thru the go-to fixes for the WordPress retains logging out drawback (also called WordPress session timeout error).

Let’s get proper to it!

1. Clear Your Searching Information

The primary resolution you may strive is clearing your browser’s cookies and cache. Your website could also be making an attempt to use an expired cookie to confirm your login credentials.

This course of can fluctuate a bit relying on which browser you’re utilizing. I’ll exhibit with Chrome because it’s the hottest possibility. First, entry your browser settings by clicking on the three-dot icon in the top-right nook of the window:

The Chrome settings button.

You may navigate to Privateness and safety > Clear shopping information from the main settings display, or for a shortcut, choose Extra Instruments > Clear shopping information from the settings menu:

The Clear Browsing Data option in the Chrome settings menu.

In the ensuing window, be sure that Cookies and different website information and Cached pictures and information are each checked. Then, click on on Clear information:

Clearing the Chrome cache and cookies.

Test your WordPress website to see if it labored. When you’re nonetheless being logged out repeatedly, you may strive the subsequent resolution.

2. Clear Your Website Cache

When you’re utilizing a caching plugin to assist velocity up your website, you might also want to clear your website’s cache. You may normally discover this feature in your caching plugin’s settings:

Clearing the site cache with W3 Total Cache.

Your plugin can also immediate you to clear the cache in the event you’ve not too long ago run an replace.

3. Test Your Browser’s Cookie Settings

It’s additionally doable that your browser is configured in order that it doesn’t permit cookies in your WordPress website. Checking this concern will fluctuate just a little bit relying on which browser you’re utilizing. Right here, I’ll present you the way to discover the correct settings in Chrome.

First, head to your Privateness and safety settings:

Chrome's privacy and security settings.

Click on on Website Settings, after which search for the Cookie and website information part:

Chrome's cookies and site data settings.

If it says “blocked” below Cookie and website information, that is in all probability what’s inflicting the WordPress retains logging out drawback. Click on on this part, after which choose Enable all cookies from the choices on the subsequent display:

Allowing all site cookies in Chrome.

After that, you may strive accessing your website once more.

4. Confirm that Your WordPress Deal with and Website Deal with Match

If none of the fixes above have labored, it is perhaps that the URL tackle in your WordPress website’s cookies doesn’t match your Website Deal with. To verify this, navigate to Settings > Common in your WordPress dashboard:

Accessing WordPress' general settings.

Search for the WordPress Deal with and Website Deal with settings and ensure they match. That features guaranteeing that they each use the similar protocol — both HTTP or HTTPS:

Checking the WordPress Address and Site Address.

Make any essential modifications and save your settings. When you’re having hassle finishing this process as a result of WordPress retains logging you out, you may specify your WordPress Deal with and Website Deal with in your wp-config.php file as an alternative.

To entry it, you’ll want a File Switch Protocol (FTP) consumer comparable to FileZilla and your FTP credentials that are supplied by your host. Enter them into your FTP consumer to join to your server, after which search for wp-config.php in the public_html listing:

Accessing wp-config.php via FileZilla.

Open it for modifying, then add the following code earlier than the line that reads That’s all, cease modifying! Pleased publishing:


Simply be sure that to change the URLs with your personal website’s tackle. Save the file, after which you may strive logging in to WordPress once more.

5. Troubleshoot for a Plugin Error

If none of the above options have labored, the subsequent step is to decide if a plugin is inflicting WordPress to log you out repeatedly. This can be the case you probably have a plugin put in that makes use of cookies and is experiencing a problem with them.

To check your plugins, I like to recommend that you simply create a staging website that permits you to carry out this motion safely, exterior of your dwell website.

First, deactivate your entire website’s plugins utilizing the Bulk actions function on the Plugins display:

Bulk deactivating plugins in WordPress.

Navigate round your website as you usually would to see if WordPress logs you out once more or if the concern appears to be resolved. When you’re ready to keep logged in, you may re-activate your plugins separately to see which ones causes the drawback to re-occur.

When you’ve pinpointed which plugin is inflicting WordPress to maintain logging you out, you may delete it and change it with an identical instrument or troubleshoot the drawback additional (possible with assist from the developer or the sources they’ve supplied).

When you can not entry your WordPress dashboard lengthy sufficient to deactivate your entire plugins, you are able to do so by way of FTP as an alternative. Join your consumer to your server, after which navigate to public_html > wp-content > plugins:

Accessing the plugins directory in FileZilla.

Right here, rename every of your plugin folders to deactivate them (e.g. plugin-name-deactivated). Altering the names again will re-activate the plugins.

6. Change How Lengthy WordPress Ought to Keep in mind Customers

Lastly, you may change the size of time WordPress ought to bear in mind customers who’ve checked the Keep in mind Me field on the login display:

The Remember Me option on the WordPress Login screen.

This gained’t essentially repair the drawback that’s inflicting WordPress to maintain logging you out. Nevertheless, it ought to allow you to entry your dashboard for longer stretches of time, which can be helpful whereas additional troubleshooting the underlying supply of the drawback.

To perform this, add the following code to your theme’s (or, ideally, your youngster theme’s) features.php file:

add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );

operate keep_me_logged_in_for_1_year( $expirein ) {
    return YEAR_IN_SECONDS; // 1 12 months in seconds

You should use the DAY_IN_SECONDS, WEEK_IN_SECONDS, or MONTH_IN_SECONDS time constants as an alternative of YEAR_IN_SECONDS in the event you choose WordPress to bear in mind customers for a shorter time period.

Needless to say enabling customers to keep logged in for prolonged durations of time may turn into a safety danger, comparable to if somebody had been to entry the pc of a consumer who has left their account logged in. Due to this fact, you’ll want to weigh the execs and cons of the length you’ve chosen fastidiously.


It may be annoying to try to work in your website when WordPress retains logging you out. Luckily, there are a number of fast fixes you may strive to get again to your uninterrupted workflow.

On this tutorial, we reviewed a number of potential options for this drawback. You can begin by clearing your shopping information and your website’s cache in addition to checking your browser’s cookie settings. If that doesn’t work, verify your WordPress and Website Addresses, troubleshoot for a plugin error, or lengthen the allowed session length.

Do you’ve gotten any questions on what to do if WordPress retains logging you out? Depart them for us in the feedback part under!


Buckle Up!
5 Steps To Velocity Up
Your WordPress Website

Make your website run 30-40%
quicker with a number of easy methods

Be a part of Free Course