How To Fix The “WordPress Keeps Logging Me Out” Problem

by Jos Velasco
How To Fix The “WordPress Keeps Logging Me Out” Problem thumbnail

If you’re on this page, you’ve probably searched for something like, “Help! WordPress keeps logging me out!”

WordPress is the internet’s most popular Content Management System (CMS), with an estimated 62% of the CMS market share. Despite this, it isn’t perfect. Things can still go wrong. For example, you may need to deal with the “WordPress keeps logging out” problem that’s landed you here.

Fortunately, being logged out of WordPress frequently is usually a pretty minor problem that most beginners can solve by using some basic troubleshooting methods, like clearing caches and disabling plugins. This is generally enough to isolate and solve the issue. And if that doesn’t work, reaching out to your hosting provider should shed some light on what’s going on.

DreamHost Glossary


WordPress is an open-source Content Management System (CMS). Since it is free and accessible, WordPress is used to power almost any type of website, from blogs to e-commerce businesses.

Read More

In this article, we’ll look at some of the most common reasons why WordPress keeps logging you out. Then we’ll explore 10 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 admin dashboard. This login process prevents unknown users from reaching your website’s back end, where they could take control of your site and potentially steal your data.

However, when you’re actively working on your website, you probably want to keep your admin dashboard open so you can easily access different areas of your back end. If WordPress keeps logging you out, we know how frustrating it can be to have to log in constantly.

There are a few reasons why WordPress might log you out:

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

We’ll address these potential causes for the “WordPress keeps logging me out” problem in more detail in our walkthroughs below. We’ll also explore troubleshooting methods for each one.

How To Fix The “WordPress Keeps Logging Out” Problem (10 Methods)

How to fix the “WordPress keeps logging me out” problem depends on what’s causing it. If you’re having this issue, start with the simplest solutions and work your way up to more complex ones.

1. Clear Your Browser’s Cookies

One of the most common reasons for WordPress to repeatedly log someone out is when they’re trying to access their site with an expired cookie saved in their browser —which means their most recent browser session can’t be authenticated. Clearing your cookies should solve this issue if it’s the culprit for you.

Note: To make a quick test if caching or cookie settings are logging you out of WordPress, you could use incognito mode. Private browsing works by initiating a separate temporary session from the main one, allowing you to rule out session-related problems. This won’t fix the problem, but it can help troubleshoot possible issues!

DreamHost Glossary


Cookies are pieces of data sent to a user’s computer or mobile device by a web server. They are then stored on the user’s device. Cookies can be used for authentication, identification of a user session, personalization of web content, or collecting information about the use of a website.

Read More

Clearing cookies is straightforward in most major browsers. We’ll take you through how to clear your cookies in the four most popular web browsers: Chrome, Firefox, Safari, and Edge Browser.

Google Chrome

At the top right, click on the three vertical dots icon, then click Clear browsing data. A new tab will open with a popup box. Make sure you’re in the Basic tab.

Choose a time range to delete your cookies. To delete everything, choose All time.

Check the box next to Cookies and other site data.

Click Clear data.

Chrome's 'Clear browsing data' window with the 'Cookies and other site data' box selected.


In the Menu bar at the top of the screen, click on Firefox and select Preferences.

Click Privacy & Security from the menu on the left-hand side. Then, go to the Cookies and Site Data section. Click the Clear Data… button, and the Clear Data cookie notification dialog box will pop up.

Both Cookies and Site Data and Cached Web Content will be checked by default, so un-check Cached Web Content if you only want to clear cookies. Then, click Clear.


In the menu bar at the top of the screen, click Safari and select Settings.

Choose Privacy from the options across the top of the popup box, and then click Manage Website Data. From there, you can choose specific sites to remove just their cookies or click Remove All to clear all cookies.

Microsoft Edge

At the top right, click on the three horizontal dots icon. In the drop-down menu, click the gear icon for settings. From the settings menu, select Privacy, search, and services.

Choose Clear browsing data, then Clear browsing data now, and Choose what to clear.

Choose a time range to clear. Then, select Cookies and other site data and click Clear now.

2. Clear Your Browser’s Cache

If you clear your cookies and the logging out problem persists, it’s safe to assume it’s not a cookie issue. Now it’s time to clear your cache. Your browser cache contains saved versions of the websites you visit. Browsers keep a cache to store information, so pages load faster when you visit the same pages multiple times.

However, if a page is cached in your browser with an expired cookie, it could be the cause of your logging out issue. Clearing out the stored information in your browser cache is a common troubleshooting step that can help.

Like clearing browser cookies, clearing your cache is a simple and straightforward fix on most major browsers. Below, we’ll walk you through the steps, which should already look familiar if you follow the tutorial to clear your cookies.

Google Chrome

Once again, click on the three vertical dots icon at the top right of your browser, then click Clear browsing data. A new tab will open with a popup box. Like before, make sure you’re on the Basic tab.

Choose a time range to clear your cache. To delete everything, choose All time.

Check the box next to Cached images and files.

Click Clear data.

Chrome browser's 'Clear browsing data' window with the 'Cached images and files' box selected.


In the Menu bar at the top of the screen, click on Firefox and select Preferences.

Click Privacy & Security from the left side menu. Then, go to the Cookies and Site Data section. Click the Clear Data… button, and the Clear Data popup box will appear.

Both Cookies and Site Data and Cached Web Content will be checked by default, so un-check Cookies and Site Data if you only want to clear your cache. Then, click Clear.


In the menu bar at the top of the screen, click on Safari and select Settings.

Choose Privacy from the options at the top of the popup box, and then click Manage Website Data. From there, you can see a list of sites and whether they have cookies, cache data, or both saved. You can select specific sites to clear their data, or click Remove All to clear your entire cache and all cookies simultaneously.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Microsoft Edge

Go to Settings, then Privacy and Clear browsing data. Then, use the keyboard command Ctrl + Shift + Del. You can also go to edge://settings/clearbrowserdata in your browser to clear your browser cache.

3. Check Your Browser Settings

If clearing your browser cache and cookies didn’t stop WordPress from logging you out, then it’s time to look at your browser settings. A usual suspect is your browser cookie settings, which may be forcing cookies to expire and forget your login details,  prompting you to log back into WordPress constantly.

Luckily, this is another pretty easy fix. Below, we’ll show you how to access and check your browser settings in the four major browsers we’ve been using so far.


Once again, click on the three vertical dots icon at the top right of your browser, then click Settings. Select Privacy and security in the lefthand menu and then on the right, select Site settings.

'Privacy and security' tab on the Google Chrome Settings window with 'Site settings' annotated.

Scroll down and click Third-party cookies under Content. From there, you can choose to:

  • Allow third-party cookies
  • Block third-party cookies in Incognito mode
  • Block third-party cookies

If cookies are blocked, that could be interfering with your WordPress session and logging you out. If this is the case, select Allow third-party cookies by clicking on the button next to it. And voila! Now your browser will save the cookie for your WordPress login session.

Chrome's 'Default behavior' dialog box with the 'Allow third-party cookies' option selected.


In the Menu bar at the top of the screen, click on Firefox and select Preferences.

Choose Privacy from the options at the top of the popup box. This is where you can view your settings for Enhanced Tracking Protection, which includes cookies.

From here, you can choose:

  • Standard
  • Strict
  • Custom

If Strict or Custom is selected, some or all cookies may be blocked. Selecting Standard will revert Firefox to default cookie settings and allow all cookies.


In the menu bar at the top of the screen, click on Safari and select Settings.

Choose Privacy from the options at the top of the popup box. From here, you can choose an option for Cookies and website data from these four:

  • Always block
  • Allow from current website only
  • Allow from websites I visit
  • Always allow

Choose Always allow to make sure cookies are allowed and won’t cause WordPress-related issues.

Microsoft Edge

At the top right, click on the three horizontal dots icon. In the drop-down menu, click the gear icon for settings. From the settings menu, select Cookies and site permissions.

Click Manage and delete cookies and site data. From here, you have three options:

  1. Allow sites to save and read cookie data
  2. Block third-party cookies
  3. Preload pages for faster browsing and searching

Choose Allow sites to save and read cookie data to make sure your cookie settings aren’t causing the “WordPress keeps logging out” error.

4. Clear Your WordPress Site’s Cache

Now that we’ve covered browser-related causes, it’s time to explore other potential reasons WordPress keeps logging you out. If you have a WordPress caching plugin installed, it’s the next place to look. It’s possible that the plugin is storing an outdated version of your site, triggering the “WordPress logging out” issue.

Depending on which caching plugin you use, you’ll typically have an option (or a set of options) on your admin dashboard to clear your WordPress cache with just one click. Go to your dashboard and look at the admin bar at the top of the menu. It’ll likely say something like Delete Cache or Purge Cache.

WordPress's dashboard with 'Page Cache' circled in the admin bar at the top of the page.

Once you click the button or choose the option you want, WordPress will direct you to your caching plugin, where you can either select more options or confirm that you want to delete your cache. You may even be able to choose specific cache elements to delete. When you reload your WordPress site, it will automatically generate a new cache.

5. Clear Your CDN Cache

DreamHost Glossary


CDN is an abbreviation for “Content Delivery Network”. It refers to a geographically-distributed network of web servers (and their data centers). The entities that make up a CDN collaborate to ensure speedy content delivery via the internet.

Read More

Although it’s rare, a CDN caching issue could be the reason WordPress keeps logging you out. Some caching plugins allow you to integrate your CDN with them, meaning you can clear your CDN cache within the plugin options. We’ll show you how to do this in the W3 Total Cache plugin— a free, easy-to-use cache plugin option.

'Performance' tab selected from WordPress's dashboard to display CDN plugins.

From your WordPress admin dashboard, click on Performance, then CDN.

From there, the W3 Total Cache plugin should give you two buttons:

  • One to purge single objects from the CDN
  • One to purge the CDN completely

In this case, you’ll want to click the second button and purge the entire CDN cache. Then, you can see if the login issue has been resolved.

If you don’t have a cache plugin with integrated CDNs and you don’t want to download one like W3 Total Cache, you’ll need to contact your CDN provider to find out how to clear your CDN cache.

6. Check Your WordPress Site Address

Another reason why WordPress might keep logging you out is because there’s a mismatch between your WordPress site address and the URL saved in the login session cookies. Often, this happens after a domain name change or when you add an SSL certificate, usually because you might forget to update the website URLs in WP-Admin.

You can check this by going to Settings (in the menu on the left side menu on your admin dashboard) and clicking on General. You may need to scroll down a bit, but you should see two URL fields labeled:

  • WordPress Address (URL)
  • Site Address (URL)
'Settings' tab selected from WordPress's left-side menu with 'WordPress Address (URL)' and 'Site Address (URL) fields annotated.

WordPress Address is the location of your WordPress files, while Site Address is the address visitors need to type to find and access your website.

In the Site Address field, you can set the URL to either or Some people prefer not to have “www” before their domain name for branding reasons or to make their URLs easier to type.

What you’re looking for here is if the two addresses in both these fields are mismatched. If that’s the case, WordPress may see the discrepancy and log you out by default. You may be able to just edit the URLs right there in your Settings, then click the Save Changes button at the bottom of the screen. However, if that doesn’t work or if you can’t stay logged in for long enough to update the URL settings, you’ll have to fix this another way.

The best way to do this is to edit your wp-config.php file. This document contains vital information for your WordPress site, like 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’, ‘’ );
define( ‘WP_SITEURL’, ‘’ );

Now save the file and close your SFTP client. After that, you can go back to your WordPress dashboard to check if the logging out issue was resolved.

7. Disable And Re-enable WordPress Plugins

Are you still with us? If none of the reasons we’ve covered so far seem to be causing your WordPress logging-out issue, the next troubleshooting step is to check for conflicts with plugins.

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.

A faulty plugin could be causing WordPress to log you out if it performs login authentication using cookies to function on your site. To see if this is your problem, you need to isolate and disable the faulty plugin.

Apart from the reasons we’ve mentioned so far, a faulty WordPress plugin could also be behind the “WordPress keeps logging me out” issue. This is particularly likely if that plugin performs login authentication using cookies. Poorly-coded plugins can also be the cause of login or logout issues. To see if this is the cause of your problem, you will need to pinpoint the faulty plugin first and then disable it.

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

You can deactivate plugins by clicking Plugins and then Installed Plugins on the left side menu on your WordPress admin dashboard.

'Plugins' drop-down menu with 'Installed Plugins' selected and an option to 'Add New Plugin.'

Check the box next to Plugin at the top of the list to select all of your installed plugins, then access the Bulk actions drop-down box above the list. Choose Deactivate and then click Apply.

'Bulk actions' chosen from the drop-down menu and highlighted on top of the installed plugins options.

You’ll need to reactivate each plugin one at a time and test to determine if it is the issue. You can do this by enabling one plugin, logging back into your WordPress dashboard, and checking to see if it triggers the problem. Clear your cache in between each plugin. When you start having login issues again, the last plugin you reactivated is most likely to blame.

If you find a faulty plugin, you’ll want to delete it from your website. You may even want to contact the plugin author to let them know their add-on isn’t functioning correctly.

If the logging out issue prevents you from accessing your Plugins dashboard, you can deactivate all your plugins via FTP instead. Using an SFTP client, like our WebFTP program, open your site’s wp-content folder and look for Plugins. When you find the Plugins folder, rename it something like plugins_old. This will make your plugins inaccessible to your site, effectively deactivating them. Then, change the name of the Plugins folder back. This will restore access to your plugins without reactivating them.

Now, log back into your WordPress site. It’s time for the next part of this troubleshooting method: figuring out which faulty plugin was causing your login issues. Head back to the Installed Plugins area of your admin dashboard and follow the same steps we outlined above for reactivating plugins one by one to test them. Don’t forget to clear your cache in between each plugin!

8. Increase Cookie Expiration Time

Could your WordPress logging-out issue be just a session timeout problem?

Suppose you click the Remember me checkbox on your WordPress login screen but find that it’s logging you out too often anyway. In that case, you can increase the time period you stay logged in by extending the expiration period for your site’s authentication cookie. Doing this will increase the amount of time you stay logged in, but keep in mind that this can create security concerns, so if you plan on increasing your cookie expiration time to stop WordPress from logging you out as often, you should tighten up your site’s security in other ways.

You’ll need to use your SFTP client again to increase your site’s cookie expiration time. Locate the functions.php file of your child theme and add this code:

function qode_change_auth_cookie_expiration_period( $expiration_period ) {
$expiration_period = MONTH_IN_SECONDS; // 1 month in seconds
return $expiration_period;
add_filter( 'auth_cookie_expiration', 'qode_change_auth_cookie_expiration_period' );

This code uses a time constant (MONTH_IN_SECONDS) to set the authentication cookie expiration period to one month. You can also use one of these time constants instead if you want to set a different time period for your authentication cookie expiration period:


Note: If you don’t want to edit any code, Biscotti is a plugin that modifies the expiration of the logged-in user cookie in WordPress to three months, six months, or one year. There’s a plugin for every problem!

9. 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 custom theme and upload it for others to use. Therefore, a poorly-coded one can slip through the cracks. It can then cause issues on your site, including the “WordPress keeps logging me out” problem.

Each year, WordPress releases a new default theme. This year, it’s Twenty Twenty-Four. To quickly and easily check for a theme conflict, you can revert your site to this or one of WordPress’ past default themes like Twenty Twenty-Three or Twenty Twenty-Two. Just go to the side menu of your admin dashboard, hover over Appearance, and then click Themes.

'Appearance' tab selected and 'Themes' chosen from the drop-down menu with options also for menus and widgets.

From this page, you can activate a past default theme (unless you deleted it, in which case you’ll need to reinstall it first). Before activating an older theme, see if a new version is available. You can also check the left-side menu for updates.

Once a new theme is activated, log out of WordPress and log back in to see if your issue is resolved.

To avoid compatibility issues from installing poorly-coded themes, make sure to read 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 idea about its popularity. Click the See all link at the top to read its reviews.

10. Contact Your Hosting Provider

Hopefully, you’ve discovered what was causing your WordPress logging-out problem by now. However, if none of these common errors were the culprit, it may be time to call in some reinforcements. At this point, it’s a good idea to contact your web hosting provider for assistance because the issue could be a domain or server misconfiguration.

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

Fixing Other WordPress Problems

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

Mastering The “WordPress Keeps Logging Me Out” Problem

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

Where clearing your cookies or cache takes less than a minute, individually checking for conflicting plugins can eat up a lot of time. Following the steps in this tutorial, you can start with the most straightforward possibilities and gradually work toward more difficult and time-consuming ones.

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

Ad background image

Your Great Idea Starts with a Domain Name

Don’t let someone else register your URL. Search DreamHost’s 400+ TLDs to find the perfect fit for your website.

Master Your Domain

Jos Velasco is a WordPress Professional Consultant at DreamHost. His responsibilities include helping with advanced WordPress cases, creating training material, and identifying trends impacting the WordPress community. In his free time, he enjoys climbing mountains, eating healthy, and watching drama movies. Follow Jos on LinkedIn: