Have you ever encountered this very frustrating problem where WordPress Admin dashboard keeps logging you out?
I had this peculiar problem for a while. I log in to my WordPress admin dashboard, check for any comments or update. But when I click the back button, I’m already logged out. My browser says “Can not find the URL”. That was very intriguing and problematic.
If you are facing this issue getting logged out of wordpress admin session. Here is a very simple solution.
Why WordPress dashboard keeps Logging Out?
In order to understand why we get logged out of wordpress admin session, we need to understand how the WordPress login process work.
WordPress sets a cookie in your browser to authenticate a login session. This cookie is set for the WordPress URL stored in your settings section. But if we are accessing from a URL that does not match the one in your WordPress settings, then WordPress will not be able to authenticate that session. So for security WordPress logs you out for that session.
See the screen shot below. Its my wordpress admin dashboard. Can you detect the problem here ?
I had two different URLs for the same site. WordPress Address URL is a non www, but the Site Address URL is www. That was the problem, why I was getting logged out of wordpress admin session.
Fixing Login Issue: Logged out of wordpress admin session:
A very simple fix for this Getting logged out of wordpress admin session issue, is to make sure that you have the same URL in your site address and also WordPress Address fields, in your wordpress settings.
This also means, you need to choose either www or non-www in both the URL fields.
First log in to your WordPress dashboard. Under Settings in the left panel > go to the General settings page, as shown in the image.
Here make sure that both the WordPress Address URL and Site Address URL are same. For example both fields should either be http://www.yoursite.com or http://yoursite.com. After making the changes, save your setting’s and log out. See the image below.
Clear your browser cache, or sites cache if you are using any wordpress cache plugin, like wp super cache or w3 total cache. The issue of getting logged out of wordpress admin session should be gone (solved).
The above screen shot is my web site setting. You can use www or non-www URL. The choice is yours. It does not really make any difference, as long as both fields are same.
Why This simple solution Work and How ?
Well technically www (world wide web) by itself is a subdomain.This means URLs with www prefix and URLs without are treated as two different domains.
So by changing the URLs in both the fields to the same address and updating, fixes the issue.
I hope this simple fix has worked for you to solve the issue of getting logged out of wordpress admin session frequently.
Ben Jamir is the Founder and Author of Tipsnfreeware. He is a part time Blogger, sharing his experience and giving a Helping hand to Home users. You will find here the best Windows Tips,Tricks and quality Freeware.