If you have a blog on WordPress, and WordPress asks you to login again and again, then this article will help you solve just that. WordPress lets you set-up your blog on a sub-domain or on a naked domain(without www). If not properly configured, WordPress will log you out again and again, because a URL with www and the same URL without it are completely different.
Solving The WordPress Logout Issue
The solution is quite simple, go to your WordPress dashboard and navigate to Settings > General. Now make the WordPress Address and Site Address fields identical.
You can either use the domain name with www or without it, but make sure you type the same address in both the places. We use the domain name with www at Mstoic.
The Hard Coded Method
If you are facing problems in accessing the WordPress dashboard or you want to hard code the website’s address, then you can add a small code to your wp-config.php file. This file resides in your site’s root directory, which can be reached using a FTP client or cPanel.
define('WP_HOME','http://www.mstoic.com');
define('WP_SITEURL','http://www.mstoic.com');
Add the above code at the end of your wp-config.php. Don’t forget to change mstoic.com with your domain name. Having a misconfiguration here can also lead to redirection loop in WordPress. Make sure you use the same address site-wide.