Fixing the WordPress Keeps Logging Out Problem: A Complete Guide

Fixing the WordPress Keeps Logging Out Problem: A Complete Guide

At times, you’ll notice that the WordPress software with which you built your website is logging you out every time you log in. If you have no clue what’s going on, then you will be both worried and afraid. In this article, we explain the reason behind this error and what you need to do to fix this.

What causes the Error?

It turns out a cache that is placed in your browser. The cache sets a browser cookie that authenticates your login into the website. But if it gets corrupted or there are any errors, then it will be unable to log you in, thus keeping you logged out.

How to Fix this Problem?

To fix this problem, you need to check if the WordPress URL is the same as the Site address. If they are different from each other, then WordPress can’t authenticate with your credentials and keep you logged out. So you need to fix the conflict in the URL setting. Here are the steps involved for this purpose:

  • Log in to your WordPress admin dashboard with the credentials
  • Navigate to Dashboard >> Settings >> General
  • Check if the WordPress URL and Site URL are same or different. If you’re unable to log in, chances are they are different. The difference can be as modest as “http” and “https”, or one has “www” in front of the URL while the other hasn’t. You need to make both the URLs exact
wordpress.png

Once you’ve done the matching, you should be able to log in as usual.

But what if you’re unable to log into the WordPress dashboard? In such cases, you can edit the wp-config file. For this purpose, you’d have to use the FTP access. Here are the two line of command you need to execute after you’ve connected to the FTP server:

Code:
define(‘WP_HOME’,’http://mysite.com);
define(‘WP_SITEURL’,’http://mysite.com);
There are other ways to fix this error. Some of which are:
  • Clear Cache and Cookies
The second method to fix this error is to clear the browser cache and that will effectively delete the cookies. Most of the login-related cookies are stored in your browser and regulate the authentication. Once you’ve deleted the caches and cookies, the problem should get resolved.
  • Deactivate the Installed Plugins
Plugins conflict is not uncommon in WordPress. You’ll notice that whenever you install an plugin or update it, you run into one error or the other. The logout error might result because of that update. So it’s recommended to uninstall the recently updated or installed plugin and check if the error is resolved.
  • Check if Your Browser Accepts Cookies
You must ensure that your browser accepts cookies from website, especially to the website you’re trying to log in. If it doesn’t then WordPress will not be able to authenticate you in. In most cases, you’ll get notified of the same and the error will read “Allow cookies for this website”.

If problem persists, you can contact your hosting provider. They should be able to resolve the problem at the earliest.
Author
kumkumsharma
Views
1,814
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top