WordPress Keeps Logging Me Out – The Problem Is Solved.
December 28th, 2016 | by Ravi Chahar || 4 Comments |
Doesn’t it one of the frustrating moments when you get logging out from your WordPress admin panel?
There are a many people who are facing such problem and they keep ask why “WordPress keeps logging me out” to every WordPress expert.
You may check it in many WordPress forums and people suggest the normal solutions.
In this tutorial, you will get all the solutions.
Let me list some normal solutions.
#1. Deactivate All The Plugins.
This is one of the most common solutions people prefer. It’s because sometimes, any of the plugins can conflict with WordPress.
Maybe the plugin is poorly coded or it doesn’t work properly with any other plugin. Anything can be the reason. You can deactivate all the plugin from your admin panel.
And if you are not able to login to your WordPress admin panel, you can also deactivate all WordPress plugins from cPanel.
#2. Clear All The Browser Cookies.
It is possible that whenever you login and you get logged out within a few minutes because of those old cookies for any other login session. Clear all the browser cookies and try again.
#3. Empty The Cache Files.
Just like cookies, browser gathers the cache files so that whenever you open the website, it won’t take much time as it takes for the first time.
It would be great if you empty the cache storage and then login to your WordPres admin panel.
The Best Solution Is Here.
The above-mentioned solutions can’t work for everyone.
And if you have tried them then there is another solution. You should know that WordPress uses the cookies and the settings are also stored.
All the WordPress settings get stored. If the settings are wrong, you will get logged out again and again.
Let me show you about what I am talking.
Go to Settings>>General and you will see the WordPress URL and the Site URL options.
If you have filled two different URLs then the problem will occur.
As you see in the screenshot, one URL consists the “WWW” and another one doesn’t.
WordPress consider them two different URLs and you will get logged out just because of those.
To fix this issue, you should add the same URL in both the fields.
What Would You Do If You Aren’t Able To Login To Your Admin Panel?
If you’re facing the WordPress login redirect problem or you are completely locked out of the admin panel then you have to use your cPanel for that.
You have to edit the wp-config.php file from your cPanel.
Go to cPanel>>file manager>>wp-config.php file.
Open it and place the code in the file and save. If you see any other code then replace it with it.
define ( ‘WP_HOME’, ‘http://www.yoursite.com’ );
define ( ‘WP_SITEURL’. ‘http://www.yoursite.com’ );
If you find out two different URLs then make them the same.
Don’t forget to replace “yoursite” with your domain name.
It will solve your “WordPress keeps logging me out” problem.
If you keep using the wrong settings then it is possible then you will get the white screen of death. It may cause the redirection problems.
Make sure that you always use the correct URL settings so that WordPress stores the cookies accordingly.
If you still get the problem then there is only one solution.
You should restore your website from the backup. If you have any old backup then it would be great to restore it. Or maybe you can talk to your web hosting providers.
But most probably, the problem will get solved by checking the URL settings and you won’t get to say “WordPress keeps logging me out”.
This is awesome, Ravi!
I remember one, maybe twice, ok I won’t confess to any more than that…. I locked myself out. I was totally freaking out! Thankfully, my host was able to help me get back in. You would have thought I learned my lesson from the first time! Nope, silly me. 🙂
Thanks for sharing this with us. I know many will love this!
We all look for the solutions but finally end up contacting the web hosting support. Though this is the best idea. But what if you can solve it yourself?
Don’t you want to be self-dependent?
I always try to experiment and new things come to me.
Thanks for sharing your experience.
Sincerely speaking, how I wish I got this information some four months ago.
Just right after I migrated my blog to another hosting provider, this problem of redirection or white blank space started to occur.
We battle this over and over but couldn’t come to a solution. At the time, I was of the believe that the data base has been hacked or corrupted.
So I decided to start with a fresh installation of WordPress on the blog.
From reading this tutorial, I’m now of the believe that the problem might have occurred as a result of different URL version in the wp.config.php file.
Well, one lessoned learned.
Thanks for your useful tutorial.
It happens all the time. Even in my starting days, I have faced this problem. The problem was with the SITE URL. I forgot to change it from the old one.
And most of the people think that any plugin is conflicting. It may happen, but the this is how you manage to find out the problem and its solution.
I am glad that now you know.
I hope you won’t go for a new installation.
Thanks for sharing with us.