Knowledge to Power Your Website

How to Fix the “WordPress Keeps Logging Out” Problem (8 Methods)

How to Fix the “WordPress Keeps Logging Out” Problem (8 Methods) thumbnail

WordPress is the most popular Content Management System (CMS) online, with an estimated 62% of the CMS market share. Despite this, it isn’t perfect and can trigger some issues. For example, you may need to deal with the “WordPress keeps logging out” problem.

Fortunately, there are many ways to ensure that being automatically logged out doesn’t happen so often. You can troubleshoot the problem by trying various possible solutions, such as clearing caches and disabling plugins. It can be a long process, but eventually, you can find out what is causing the issue.

In this article, we’ll look at the most common reasons why WordPress keeps logging out. Then we’ll explore eight methods you can use to solve the issue. Let’s get started!

Why WordPress Keeps Logging Out

WordPress requires you to enter your username and password when you want to access your website’s dashboard. This system prevents unknown users from reaching your website and potentially stealing your data.

However, when working on your website, you’ll likely want to keep your administrator dashboard open. If WordPress keeps logging you out, it can become frustrating to continually sign in to access your content.

There are various reasons why WordPress might log you out, such as:

  • Cookies with outdated information
  • Cached files with old data
  • An improperly configured WordPress site address
  • Faulty plugins or theme files

We’ll address each potential cause for the “WordPress keeps logging out” problem in our walkthrough. We’ll also explore fixes for each scenario.

Skip the Stress

Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

How to Fix the “WordPress Keeps Logging Out” Problem (8 Methods)

There are multiple ways to fix the “WordPress keeps logging out” problem. We’ll start by addressing the easiest ones and work our way up to the more complex methods.

1. Clear Your Browser’s Cookies

You can start by clearing all of the existing WordPress-related cookies from your browser. Cookies store information from previous browser sessions, such as login details and personal data. However, if they hold onto outdated data, they can trigger the logging out error.

The process is similar with all major browsers. However, we will show you how to do it in Chrome.

Go to the WordPress site URL in question, and click on the padlock icon to the left of the URL bar. You will then see a small box pop up.

Clearing browser cookies for a particular site.

As you can see, the browser says there are 19 cookies stored in the browser for this domain. To remove them, click on Cookies, and you will see another popup box.

Viewing cookies in use for a website in your browser.

Highlight the domains shown in the Allowed box and click on Remove at the bottom. When the domains disappear, select Done to save your changes.

Now restart your browser and try logging into WordPress again. A new cookie will be set if you click on the Remember Me box.

To find out how long until Chrome expires the cookie, just go to the Settings menu again. You can access it by clicking on the three vertical dots in the top-right corner of your browser.

Accessing browser settings with Google Chrome.

In the settings, click on Privacy and Security in the left-hand sidebar. On the right-hand side, you will then see an option called Cookies and other site data. Select it.

Accessing browser privacy and security settings in Google Chrome.

Scroll down the page until you see “See all cookies and site data.” Click on it.

Seeing all cookies and site data in Google Chrome browser settings.

You’ll now get a list of all the cookies on your computer. Use the search box at the top to find the one you’re looking for. Just type in the domain, and Chrome will show you what it has in storage.

Clearing all cookies and site data in the Google Chrome browser settings.

Click on the first result, and you’ll get a list of each cookie. Select the cookie name and scroll down right to the very bottom, where you will see the expiry date.

Viewing the cookie expiry date in Google Chrome.

As you can see, this cookie is valid for just over three months. It even includes the expiration time, so you know when your cookie will need a replacement.

2. Clear Your Browser’s Cache

If the logging out problem persists, it’s time to check your cache. A cache is a saved version of a website. Your browser uses this method to store information so pages will load faster when you next visit the site.

However, if the page is cached in the browser along with an expired cookie, it will likely keep logging you out. As such, you’ll need to clear out the stored information.

Again, clearing a cache is very similar with all major browsers, so we will focus on the most popular option: Chrome. Go to Chrome’s settings by clicking on the three vertical dots in the top right corner of the browser.

When the menu drops down, choose More Tools > Clear Browsing Data.

Clearing browser data in Google Chrome.

Choosing Clear Browsing Data brings up this box:

Clearing cached images and files in Google Chrome.

Tick Cached images and files and click on Clear data. When the box disappears, restart your browser. As you can see, you can also remove the browser cookies using this method.

3. Check Your Browser Settings

The logging out problem can also come from your browser settings. For example, if your browser forces cookies to expire, it will forget your login information. Therefore, it will require you to log back in continuously.

You’ll need to reaccess your browser settings as you did in the first step of this tutorial. Navigate to Settings > Privacy and Security > Cookies and other site data. Here, you can see if any cookies are blocked or enabled.

General settings for cookies in Google Chrome.

For example, you can see cookies are disabled during Incognito mode in our browser. However, there are also Block third-party cookies and Block all cookies options. If either of these are enabled, they could be interfering with your WordPress session and logging you out.

If this is the case, select Allow all cookies by clicking on the button next to it. Now your browser will save the cookie for your WordPress login session.

4. Clear Your WordPress Site’s Cache

If you’re using a WordPress caching plugin, this add-on could be at fault. For example, it could be storing an outdated version of your site, triggering the “WordPress keeps logging out” problem.

Site caches can be handy to have, especially if you have a high-traffic website. Still, they have the potential to cause problems down the line.

If you have a site caching solution installed, there is usually an option in the WordPress dashboard to clear the cache with one click. It sits in the top menu and generally says Delete Cache[a][b][d](Note: If you are using the Proxy Cache Purge plugin, you will also see this option, but deleting its cache will not fix the logging out issue.)

The Delete Cache button in the WordPress admin dashboard.

Once you click on this button, WordPress will direct you to your caching plugin. You can then click on Delete Cache or the specific control button for your software.

The plugin may also ask you to confirm your choice or choose specific cache elements to purge. You can clear all of the stored items. When you reload your WordPress site, it will automatically generate a new cache.

5. Double-Check Your WordPress Site Address

In your WordPress site settings (under General), you can set the site URL to either “http://www.yourdomain.com” or “http://yourdomain.com”. Some people prefer not having “www” before their domain name for branding reasons or to make their URLs easier to type.

The WordPress address URL and site address URL.

However, if these two addresses don’t match, WordPress may see the discrepancy and log you out by default. So, you’ll need to solve the issue to prevent the “WordPress keeps logging out” problem.

To fix the discrepancy, you’ll need to edit your wp-config.php text file. This document contains vital information for your WordPress website, such as its database connection details.

You can access this file using a Secure File Transfer Protocol (SFTP) client. One of the most popular options is the free FileZilla program. If you’re a DreamHost customer, you can also use our secure WebFTP program.

Start your SFTP client and look for the wp-config.php file. You can find it in the root directory of your domain.

Open the file and paste the following code into it. You’ll want to swap out the example text for your own domain names:

define( 'WP_HOME', 'http://example.com' );

define( 'WP_SITEURL', 'http://example.com' );

Now save the file and close your SFTP client. After that, you can go back to your WordPress dashboard to check if the problem is resolved.

Easily Build Your Dream Website

Don't know code? No problem. Our DIY Website Builder makes building a website as easy as sending an email.

6. Disable and Re-enable WordPress Plugins

Still no luck fixing the “WordPress keeps logging out” problem? Not to worry, there are a few more things you can try. The next troubleshooting step is checking for a plugin conflict.

A plugin is an add-on that you have installed on your WordPress site. You may have sourced it from the Plugins section on your site or through the WordPress plugin directory.

However, many plugins use cookies to function on your site. If these cookies have expired, they might trigger the logging out problem.

Additionally, poorly-coded plugins could interfere with your WordPress site. As such, you’ll need to identify if any add-ons are causing login or logout issues.

If you only have a few plugins, this will be an easy process. However, if you have many add-ons, this is going to take a while!

You can deactivate plugins by heading to Plugins > Installed Plugins in your WordPress dashboard.

Accessing plugins from the WordPress dashboard.

Tick the box next to Plugin and access the drop-down Bulk actions menu. Choose Deactivate and then Apply. This process will deactivate all your plugins.

Deactivating plugins in bulk can help with the "WordPress keeps logging out"problem.

Now you’ll need to reactivate each plugin and test to determine if it is the issue. You can do this by enabling them one at a time, logging back into your WordPress dashboard, and checking to see if they trigger the problem.

If you find the culprit, you’ll want to delete it from your website. You may even want to contact the relevant developer to let them know their add-on is functioning incorrectly.

However, suppose the logging out problem prevents you from accessing your Plugins dashboard. In that case, you can complete the process with an SFTP client. First, you’ll need to open up your website’s wp-content folder and look for Plugins.

Accessing the wp-content folder from an SFTP client.

Deactivate all your plugins by renaming the folder to something like “plugins_old”. Then you can navigate back to your WordPress dashboard and follow the manual process we described before.

7. Check for Theme Conflicts

The next possibility is a poorly-coded theme. WordPress has many high-quality themes available.

However, as an open-source CMS, any developer can create a theme. Therefore, a poorly-coded one can slip through the cracks. It can then cause issues on your site, such as the “WordPress keeps logging out” problem.

Every WordPress installation comes with the pre-installed Twenty Twenty-One theme. So you can quickly and easily check for a theme conflict by reverting your site to this default option. Then, you can determine if your previous choice was causing the logging out issue.

To switch themes, go to Appearance > Themes in your WordPress dashboard. You will then see your available options, including the Twenty Twenty-One theme.

However, if you deleted this theme, you can reinstall it for this tutorial. Type the name into the search box and select Twenty Twenty-One.

Accessing themes from the WordPress dashboard.

Mouse over the Twenty Twenty-One theme and click on the Activate box that appears.

Switching to the default Twenty Twenty-One theme could help with the "WordPress keeps logging out" problem.

The site will now switch to the Twenty Twenty-One theme. Now log out and back into WordPress and see if that fixed your problem. If it does, you might want to think about changing your theme to something else.

To avoid installing poorly-coded themes, you can read the reviews from other users. Just go to the WordPress theme directory and search for the name of the theme.

On the right-hand side, you’ll see the theme’s star rating, which will give you a quick overview of its popularity.

The star rating for a WordPress theme.

Now click on the See all link at the top to read the reviews.

Reviews for WordPress themes.

You should also continually monitor your Updates section in WordPress to see if your theme has a new version available. Doing this will ensure that you get all the latest security updates and bug fixes. You can find updates at the top of your left-hand sidebar.

Accessing updates in the WordPress dashboard.

By installing all updates and double-checking the safety of a theme before you install it, you can avoid using a poorly-coded option.

8. Contact Your Hosting Provider

By now, you’ve likely discovered what was causing your WordPress logging out problem. However, in the improbable event that it is still happening, you may need to contact your web hosting provider for assistance. The issue may be a domain or server misconfiguration.

If your hosting company is DreamHost, just get in touch with our customer support team! They will be more than happy to help you solve the problem.

You’re Cordially Invited

Join DreamHost’s Facebook group to connect with like-minded website owners and get advice from peers and experts alike!

Fixing Other WordPress Problems

If you’re running into any other issues with your WordPress site, we have a comprehensive list of troubleshooting tutorials:

If you need further assistance, you can check out our WordPress tutorials. These expert guides can help you master your admin dashboard in no time!

Conclusion

The “WordPress keeps logging out” problem can be frustrating. But as we’ve just seen, you can use multiple troubleshooting methods to identify and solve the issue.

By following the list we have provided here, you can start with the most straightforward possibilities and gradually work your way up to the more time-consuming ones. For example, clearing caches and cookies takes less than a minute. However, individually checking plugins can eat up a lot of time.

Are you looking for a WordPress host that can help you out with any technical problems? At DreamHost, we have a support team that can walk you through any website-related issues. Check out one of our WordPress hosting packages today!

About the Author:

Ellice comes to us from House DreamHost, the first of her name, Gatekeeper of All Things Content, Protector of the Brand and Ruler of Social Realms. tl;dr - Ellice is the Content Marketing Manager at DreamHost and oversees all social media and content efforts.