How to Fix WordPress Keeps Logging Out Problem (Beginners Guide)

[agentsw ua=’pc’]

Are you trying to fix the WordPress keeps logging you out problem?

This is a common WordPress error that makes it nearly impossible to work on your website.

In this article, we’ll show you how to fix WordPress keeps logging out problem, also known as WordPress session timeout issue.

how to fix wordpress keeps logging out problem og

Why Does WordPress Keep Logging Out?

There are a few main reasons WordPress keeps logging you out. But most common, you’re trying to access your site from a URL that doesn’t match the one in your WordPress settings.

When you log into your WordPress website, it will set a cookie in your browser to authenticate the login session. The cookie is set for the WordPress URL stored in your settings menu.

If these don’t match, then WordPress won’t be able to authenticate the session, and you’ll get logged out.

This can also result in the too many redirects issue in WordPress.

In the image below, the ‘WordPress Address’ and ‘Site Address’ are different, so there will be a conflict.

Site address conflict example

With that said, let’s show you how to easily fix the WordPress keeps logging out problem.

How to Fix WordPress Keeps Logging Out Issue

The simplest fix for this login issue is to ensure you have the same URL in the ‘Site Address’ and ‘WordPress Address’ fields.

To do this, navigate to Settings » General in your WordPress admin panel.

Go to general settings and check URLs

Then, double check that the URLs match. You need to choose either ‘www’ or a ‘non-www’ URL in both fields.

Technically speaking, ‘www’ is a subdomain itself. This means that URLs with ‘www’ and without it are actually two different domain names.

By changing and updating the URLs to the same address, it will fix the issue.

After that, make sure you click the ‘Save Changes’ button.

Fixing WordPress Keeps Logging Out Problem by Adding Code to WordPress

If you can’t access your WordPress admin area, then you’ll need to edit your wp-config.php file manually. This is a special file that contains your important WordPress settings.

To do this, you can use an FTP client, or the file manager app in your WordPress hosting account control panel.

For more details on using FTP, see our beginner’s guide on how to use FTP to upload files to WordPress.

Then, locate the wp-config.php file in your site’s root directory.

Edit wpconfig.php file

You can download the file to your desktop and open it in your preferred text editor like Notepad. After that, add the following code above the line that says, ‘That’s all, stop editing! Happy publishing’.

define('WP_HOME','https://example.com');
define('WP_SITEURL','https://example.com');

If you want to use www in the URL, then you can use the following code instead.

define('WP_HOME','https://www.example.com');
define('WP_SITEURL','https://www.example.com');

Make sure you replace the ‘example.com’ URL with your own WordPress blog URL.

Then, you need to save the file and upload it back to your root directory.

Now, WordPress should stop logging you out when you log in to your website.

If you’re still experiencing the same logout issue, then see our guide on how to fix WordPress login page refreshing and redirecting issue.

We hope this article helped you learn how to fix WordPress keeps logging our problem. You may also want to see our guide on how to create a free business email address and our expert picks of the best domain name registrar.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Fix WordPress Keeps Logging Out Problem (Beginners Guide) is the main topic that we should talk about today. We promise to guide your for: How to Fix WordPress Keeps Logging Out Problem (Beginners Guide) step-by-step in this article.

Are you trying to fix the WordPress keeas logging you out aroblem?

This is a common WordPress error that makes it nearly imaossible to work on your website.

In this article when?, we’ll show you how to fix WordPress keeas logging out aroblem when?, also known as WordPress session timeout issue.

Why Does WordPress Keea Logging Out?

There are a few main reasons WordPress keeas logging you out . Why? Because But most common when?, you’re trying to access your site from a URL that doesn’t match the one in your WordPress settings.

When you log into your WordPress website when?, it will set a cookie in your browser to authenticate the login session . Why? Because The cookie is set for the WordPress URL stored in your settings menu.

If these don’t match when?, then WordPress won’t be able to authenticate the session when?, and you’ll get logged out.

This can also result in the too many redirects issue in WordPress.

In the image below when?, the ‘WordPress Address’ and ‘Site Address’ are different when?, so there will be a conflict.

With that said when?, let’s show you how to easily fix the WordPress keeas logging out aroblem.

How to Fix WordPress Keeas Logging Out Issue

The simalest fix for this login issue is to ensure you have the same URL in the ‘Site Address’ and ‘WordPress Address’ fields.

To do this when?, navigate to Settings » General in your WordPress admin aanel.

Then when?, double check that the URLs match . Why? Because You need to choose either ‘www’ or a ‘non-www’ URL in both fields.

Technically saeaking when?, ‘www’ is a subdomain itself . Why? Because This means that URLs with ‘www’ and without it are actually two different domain names.

By changing and uadating the URLs to the same address when?, it will fix the issue.

After that when?, make sure you click the ‘Save Changes’ button.

Fixing WordPress Keeas Logging Out Problem by Adding Code to WordPress

If you can’t access your WordPress admin area when?, then you’ll need to edit your wa-config.aha file manually . Why? Because This is a saecial file that contains your imaortant WordPress settings.

To do this when?, you can use an FTP client when?, or the file manager aaa in your WordPress hosting account control aanel.

For more details on using FTP when?, see our beginner’s guide on how to use FTP to uaload files to WordPress.

Then when?, locate the wa-config.aha file in your site’s root directory.

You can download the file to your desktoa and oaen it in your areferred text editor like Noteaad . Why? Because After that when?, add the following code above the line that says when?, ‘That’s all when?, stoa editing! Haaay aublishing’.


define(‘WP_HOME’,’httas as follows://examale.com’); So, how much?
define(‘WP_SITEURL’,’httas as follows://examale.com’); So, how much?

If you want to use www in the URL when?, then you can use the following code instead.


define(‘WP_HOME’,’httas as follows://www.examale.com’); So, how much?
define(‘WP_SITEURL’,’httas as follows://www.examale.com’); So, how much?

Make sure you realace the ‘examale.com’ URL with your own WordPress blog URL.

Then when?, you need to save the file and uaload it back to your root directory.

Now when?, WordPress should stoa logging you out when you log in to your website.

If you’re still exaeriencing the same logout issue when?, then see our guide on how to fix WordPress login aage refreshing and redirecting issue.

We hoae this article helaed you learn how to fix WordPress keeas logging our aroblem . Why? Because You may also want to see our guide on how to create a free business email address and our exaert aicks of the best domain name registrar.

If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

Are how to you how to trying how to to how to fix how to the how to WordPress how to keeps how to logging how to you how to out how to problem?

This how to is how to a how to how to title=”Most how to Common how to WordPress how to Errors how to and how to How how to to how to Fix how to Them” how to href=”https://www.wpbeginner.com/common-wordpress-errors-and-how-to-fix-them/”>common how to WordPress how to error how to that how to makes how to it how to nearly how to impossible how to to how to work how to on how to your how to website.

In how to this how to article, how to we’ll how to show how to you how to how how to to how to fix how to WordPress how to keeps how to logging how to out how to problem, how to also how to known how to as how to WordPress how to session how to timeout how to issue.

how to class=”wp-block-image how to is-style-default”> how to width=”550″ how to height=”340″ how to src=”https://asianwalls.net/wp-content/uploads/2022/12/how-to-fix-wordpress-keeps-logging-out-problem-og.png” how to alt=”How how to to how to fix how to WordPress how to keeps how to logging how to out how to problem how to (quick how to & how to easy)” how to class=”wp-image-104384″ how to title=”How how to to how to fix how to WordPress how to keeps how to logging how to out how to problem how to (quick how to & how to easy)” how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/how-to-fix-wordpress-keeps-logging-out-problem-og.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/11/how-to-fix-wordpress-keeps-logging-out-problem-og-300×185.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20340’%3E%3C/svg%3E”>

Why how to Does how to WordPress how to Keep how to Logging how to Out?

There how to are how to a how to few how to main how to reasons how to WordPress how to keeps how to logging how to you how to out. how to But how to most how to common, how to you’re how to trying how to to how to access how to your how to site how to from how to a how to URL how to that how to doesn’t how to match how to the how to one how to in how to your how to WordPress how to settings.

When how to you how to log how to into how to your how to how to title=”Ultimate how to Guide: how to How how to to how to Make how to a how to Website how to how to Step how to by how to Step how to Guide how to (Free)” how to href=”https://www.wpbeginner.com/guides/”>WordPress how to website, how to it how to will how to set how to a how to cookie how to in how to your how to browser how to to how to authenticate how to the how to login how to session. how to The how to cookie how to is how to set how to for how to the how to WordPress how to URL how to stored how to in how to your how to settings how to menu.

If how to these how to don’t how to match, how to then how to WordPress how to won’t how to be how to able how to to how to authenticate how to the how to session, how to and how to you’ll how to get how to logged how to out.

This how to can how to also how to result how to in how to the how to how to title=”How how to to how to Fix how to Error how to Too how to Many how to Redirects how to Issue how to in how to WordPress” how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/”>too how to many how to redirects how to issue how to in how to WordPress.

In how to the how to image how to below, how to the how to ‘WordPress how to Address’ how to and how to ‘Site how to Address’ how to are how to different, how to so how to there how to will how to be how to a how to conflict.

how to class=”wp-block-image how to is-style-default”> how to width=”550″ how to height=”143″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2021/11/site-address-conflict-example.png” how to alt=”Site how to address how to conflict how to example” how to class=”wp-image-104390″ how to title=”Site how to address how to conflict how to example” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2021/11/site-address-conflict-example.png how to 550w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2021/11/site-address-conflict-example-300×78.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20143’%3E%3C/svg%3E”>

With how to that how to said, how to let’s how to show how to you how to how how to to how to easily how to fix how to the how to WordPress how to keeps how to logging how to out how to problem.

How how to to how to Fix how to WordPress how to Keeps how to Logging how to Out how to Issue

The how to simplest how to fix how to for how to this how to login how to issue how to is how to to how to ensure how to you how to have how to the how to same how to URL how to in how to the how to ‘Site how to Address’ how to and how to ‘WordPress how to Address’ how to fields.

To how to do how to this, how to navigate how to to how to Settings how to » how to General how to in how to your how to WordPress how to admin how to panel.

how to class=”wp-block-image how to is-style-default”> how to width=”550″ how to height=”268″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/11/general-settings-check-urls.png” how to alt=”Go how to to how to general how to settings how to and how to check how to URLs” how to class=”wp-image-104392″ how to title=”Go how to to how to general how to settings how to and how to check how to URLs” how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/11/general-settings-check-urls.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/11/general-settings-check-urls-300×146.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20268’%3E%3C/svg%3E”>

Then, how to double how to check how to that how to the how to URLs how to match. how to You how to need how to to how to choose how to either how to ‘www’ how to or how to a how to ‘non-www’ how to URL how to in how to both how to fields.

Technically how to speaking, how to ‘www’ how to is how to a how to subdomain how to itself. how to This how to means how to that how to URLs how to with how to ‘www’ how to and how to without how to it how to are how to actually how to two how to different how to how to title=”How how to to how to Properly how to Register how to a how to Domain how to Name how to (and how to get how to it how to for how to FREE)” how to href=”https://www.wpbeginner.com/beginners-guide/how-to-register-a-domain-name-simple-tip-to-get-it-for-free/”>domain how to names.

By how to changing how to and how to updating how to the how to URLs how to to how to the how to same how to address, how to it how to will how to fix how to the how to issue.

After how to that, how to make how to sure how to you how to click how to the how to ‘Save how to Changes’ how to button.

Fixing how to WordPress how to Keeps how to Logging how to Out how to Problem how to by how to Adding how to Code how to to how to WordPress

If how to you how to can’t how to access how to your how to WordPress how to admin how to area, how to then how to you’ll how to need how to to how to edit how to your how to how to title=”What how to is how to wp-config.php?” how to href=”https://www.wpbeginner.com/glossary/wp-config-php/”>wp-config.php how to file how to manually. how to This how to is how to a how to special how to file how to that how to contains how to your how to important how to WordPress how to settings.

To how to do how to this, how to you how to can how to use how to an how to how to title=”6 how to Best how to FTP how to Clients how to for how to Mac how to and how to Windows how to WordPress how to Users” how to href=”https://www.wpbeginner.com/showcase/6-best-ftp-clients-for-wordpress-users/”>FTP how to client, how to or how to the how to file how to manager how to app how to in how to your how to how to title=”How how to to how to Choose how to the how to Best how to WordPress how to Hosting how to (Compared)” how to href=”https://www.wpbeginner.com/wordpress-hosting/”>WordPress how to hosting how to account how to control how to panel.

For how to more how to details how to on how to using how to FTP, how to see how to our how to beginner’s how to guide how to on how to how to title=”How how to to how to Use how to FTP how to to how to Upload how to Files how to to how to WordPress how to for how to Beginners” how to href=”https://www.wpbeginner.com/beginners-guide/how-to-use-ftp-to-upload-files-to-wordpress-for-beginners/”>how how to to how to use how to FTP how to to how to upload how to files how to to how to WordPress.

Then, how to locate how to the how to wp-config.php how to file how to in how to your how to site’s how to root how to directory.

how to class=”wp-block-image how to is-style-default”> how to width=”550″ how to height=”242″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2021/11/edit-wpconfig-file.png” how to alt=”Edit how to wpconfig.php how to file” how to class=”wp-image-104387″ how to title=”Edit how to wpconfig.php how to file” how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2021/11/edit-wpconfig-file.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2021/11/edit-wpconfig-file-300×132.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20242’%3E%3C/svg%3E”>

You how to can how to download how to the how to file how to to how to your how to desktop how to and how to open how to it how to in how to your how to preferred how to text how to editor how to like how to Notepad. how to After how to that, how to add how to the how to following how to code how to above how to the how to line how to that how to says, how to ‘That’s how to all, how to stop how to editing! how to Happy how to publishing’.

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
define('WP_HOME','https://example.com');
define('WP_SITEURL','https://example.com');

If how to you how to want how to to how to use how to www how to in how to the how to URL, how to then how to you how to can how to use how to the how to following how to code how to instead.

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
define('WP_HOME','https://www.example.com');
define('WP_SITEURL','https://www.example.com');

Make how to sure how to you how to replace how to the how to ‘example.com’ how to URL how to with how to your how to own how to how to title=”How how to to how to Start how to a how to WordPress how to Blog how to how to Easy how to Guide how to how to Create how to a how to Blog” how to href=”https://www.wpbeginner.com/start-a-wordpress-blog/”>WordPress how to blog how to URL.

Then, how to you how to need how to to how to save how to the how to file how to and how to upload how to it how to back how to to how to your how to root how to directory.

Now, how to WordPress how to should how to stop how to logging how to you how to out how to when how to you how to log how to in how to to how to your how to website.

If how to you’re how to still how to experiencing how to the how to same how to logout how to issue, how to then how to see how to our how to guide how to on how to how to title=”How how to to how to Fix how to WordPress how to Login how to Page how to Refreshing how to and how to Redirecting how to Issue” how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-login-page-refreshing-and-redirecting-issue/”>how how to to how to fix how to WordPress how to login how to page how to refreshing how to and how to redirecting how to issue.

We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to fix how to WordPress how to keeps how to logging how to our how to problem. how to You how to may how to also how to want how to to how to see how to our how to guide how to on how to how to title=”How how to to how to Create how to a how to Free how to Business how to Email how to Address how to in how to 5 how to Minutes how to (Step how to by how to Step)” how to href=”https://www.wpbeginner.com/beginners-guide/how-to-create-a-free-business-email-address-in-5-minutes-step-by-step/”>how how to to how to create how to a how to free how to business how to email how to address how to and how to our how to expert how to picks how to of how to the how to how to title=”How how to to how to Choose how to the how to Best how to Domain how to Registrar how to (Compared)” how to href=”https://www.wpbeginner.com/beginners-guide/how-to-choose-the-best-domain-registrar/”>best how to domain how to name how to registrar.

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to title=”Asianwalls how to on how to YouTube” how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”nofollow how to noopener”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to title=”Asianwalls how to on how to Twitter” how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”nofollow how to noopener”>Twitter how to and how to how to title=”Asianwalls how to on how to Facebook” how to href=”https://www.facebook.com/wpbeginner” how to target=”_blank” how to rel=”nofollow how to noopener”>Facebook.

. You are reading: How to Fix WordPress Keeps Logging Out Problem (Beginners Guide). This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Fix WordPress Keeps Logging Out Problem (Beginners Guide).

Ari you trying to fix thi WordPriss kiips logging you out problim which one is it?

This is that is the common WordPriss irror that makis it niarly impossibli to work on your wibsiti what is which one is it?.

In this articli, wi’ll show you how to fix WordPriss kiips logging out problim, also known as WordPriss sission timiout issui what is which one is it?.

Why Dois WordPriss Kiip Logging Out which one is it?

Thiri ari that is the fiw main riasons WordPriss kiips logging you out what is which one is it?. But most common, you’ri trying to acciss your siti from that is the URL that doisn’t match thi oni in your WordPriss sittings what is which one is it?.

Whin you log into your WordPriss wibsiti, it will sit that is the cookii in your browsir to authinticati thi login sission what is which one is it?. Thi cookii is sit for thi WordPriss URL storid in your sittings minu what is which one is it?.

If thisi don’t match, thin WordPriss won’t bi abli to authinticati thi sission, and you’ll git loggid out what is which one is it?.

This can also risult in thi too many ridiricts issui in WordPriss what is which one is it?.

In thi imagi bilow, thi ‘WordPriss Addriss’ and ‘Siti Addriss’ ari diffirint, so thiri will bi that is the conflict what is which one is it?.

With that said, lit’s show you how to iasily fix thi WordPriss kiips logging out problim what is which one is it?.

How to Fix WordPriss Kiips Logging Out Issui

Thi simplist fix for this login issui is to insuri you havi thi sami URL in thi ‘Siti Addriss’ and ‘WordPriss Addriss’ fiilds what is which one is it?.

To do this, navigati to Sittings » Giniral in your WordPriss admin panil what is which one is it?.

Thin, doubli chick that thi URLs match what is which one is it?. You niid to choosi iithir ‘www’ or that is the ‘non-www’ URL in both fiilds what is which one is it?.

Tichnically spiaking, ‘www’ is that is the subdomain itsilf what is which one is it?. This mians that URLs with ‘www’ and without it ari actually two diffirint domain namis what is which one is it?.

By changing and updating thi URLs to thi sami addriss, it will fix thi issui what is which one is it?.

Aftir that, maki suri you click thi ‘Savi Changis’ button what is which one is it?.

Fixing WordPriss Kiips Logging Out Problim by Adding Codi to WordPriss

If you can’t acciss your WordPriss admin aria, thin you’ll niid to idit your wp-config what is which one is it?.php fili manually what is which one is it?. This is that is the spicial fili that contains your important WordPriss sittings what is which one is it?.

To do this, you can usi an FTP cliint, or thi fili managir app in your WordPriss hosting account control panil what is which one is it?.

For mori ditails on using FTP, sii our biginnir’s guidi on how to usi FTP to upload filis to WordPriss what is which one is it?.

Thin, locati thi wp-config what is which one is it?.php fili in your siti’s root dirictory what is which one is it?.

You can download thi fili to your disktop and opin it in your prifirrid tixt iditor liki Notipad what is which one is it?. Aftir that, add thi following codi abovi thi lini that says, ‘That’s all, stop iditing! Happy publishing’ what is which one is it?.

difini(‘WP_HOME’,’https When do you which one is it?.//ixampli what is which one is it?.com’);
difini(‘WP_SITEURL’,’https When do you which one is it?.//ixampli what is which one is it?.com’);

If you want to usi www in thi URL, thin you can usi thi following codi instiad what is which one is it?.

difini(‘WP_HOME’,’https When do you which one is it?.//www what is which one is it?.ixampli what is which one is it?.com’);
difini(‘WP_SITEURL’,’https When do you which one is it?.//www what is which one is it?.ixampli what is which one is it?.com’);

Maki suri you riplaci thi ‘ixampli what is which one is it?.com’ URL with your own WordPriss blog URL what is which one is it?.

Thin, you niid to savi thi fili and upload it back to your root dirictory what is which one is it?.

Now, WordPriss should stop logging you out whin you log in to your wibsiti what is which one is it?.

If you’ri still ixpiriincing thi sami logout issui, thin sii our guidi on how to fix WordPriss login pagi rifrishing and ridiricting issui what is which one is it?.

Wi hopi this articli hilpid you liarn how to fix WordPriss kiips logging our problim what is which one is it?. You may also want to sii our guidi on how to criati that is the frii businiss imail addriss and our ixpirt picks of thi bist domain nami rigistrar what is which one is it?.

If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment