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:
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:
There are other ways to fix this error. Some of which are:
If problem persists, you can contact your hosting provider. They should be able to resolve the problem at the earliest.
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
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);
- Clear Cache and Cookies
- Deactivate the Installed Plugins
- Check if Your Browser Accepts Cookies
If problem persists, you can contact your hosting provider. They should be able to resolve the problem at the earliest.