Tips

How to fix the logout error in WordPress

When WordPress presents the error in which your account is automatically logged out and without warning, it’s quite annoying. It’s usually a communication problem between the cookies that WordPress hosts in your browser and the authentication process of the session.

In a more practical environment, this communication error happens when your website address starts with www and the WordPress address does not have www. It’s a detail that many times we overlook but for WordPress it’s a data that doesn’t match, it causes this error.

Let’s see how to solve it.

If you have a WordPress hosting

In this case the process is quite simple. Enter your WordPress administrator and then Settings. Then match your WordPress address and your site address by entering the same URL in both fields. Save the changes and that’s it.

With your FTP client

If you don’t have access to the administrator, use your FTP client to enter the wp-config.php file. Download this file and open it in a notebook on your computer because we will need to add some code.

At the end of the lines of code, we’ll add the one you will see below, it would be the same as the previous step but from the inside. Decide first which of the two versions you will use, whether the address with www or without it, so that both coincide in your WordPress.

If you prefer without www, use the following code and replace the information:

define (‘WP_HOME’, ‘http: //example.com’);
define (‘WP_SITEURL’, ‘http: //example.com’);

If you prefer with www, do the same with the following code:

define (‘WP_HOME’, ‘http: //www.example.com’);
define (‘WP_SITEURL’, ‘http: //example.com’);

Once you have added these lines with the information that best suits you, save the file and upload it again to your server via FTP. Verify that everything is in order and you will have solved this error. It’s important that when performing these tasks, don’t leave a diagonal or slash (/) at the end of the address you placed.

For WordPress, having two different addresses is as if you had two websites, and by not agreeing, “kicks you out” WordPress. Avoiding this error will avoid the later “Too many redirects” or “Isn’t redirecting properly” error as shown in Firefox, so it’s better to be safe than sorry. Finally, if you didn’t make any substantial changes to your WordPress recently and the error has not yet been solved, it’s advisable to contact your hosting company.

We hope you have solved it!

Jefferson Maldonado
the authorJefferson Maldonado
UX WordPress Designer
Ux & Web Designer. Portafolio: http://maldonadoz.com/portafolio/ Divi Blogger, WordPress Expert, UX Designer, Business Consultant.

Leave a Reply

× Hey there !