Do you face the problem of WordPress logging you out? This issue can be annoying. It disrupts your work. But, don’t worry. We will help you fix it.
Why Does WordPress Keep Logging Out?
First, let’s understand why this happens. WordPress uses cookies to keep you logged in. If there is a problem with cookies, you get logged out. Below are some common reasons:
- Cookie settings are not correct.
- Your browser has issues with cookies.
- WordPress URL settings are wrong.
- Plugin conflicts.
- Theme issues.

Credit: www.dreamhost.com
Step-by-Step Guide to Fix WordPress Logging Out Issue
Follow these steps to fix the problem:
1. Clear Browser Cookies
Sometimes, old cookies cause problems. Clearing cookies can help.
- Open your browser settings.
- Find the option to clear browsing data.
- Select “Cookies and other site data.”
- Click “Clear data.”
Now, try to log in to WordPress again. If the problem is fixed, great! If not, move to the next step.
2. Check WordPress Url Settings
WordPress URLs must match your site URL. Follow these steps:
- Log in to your WordPress dashboard.
- Go to Settings > General.
- Check the “WordPress Address (URL)” and “Site Address (URL).” Both should be the same.
- If they are not the same, make them match.
- Save changes.
Log out and log in again. See if this fixes the problem.
3. Disable Plugins
Plugins can sometimes cause issues. Disable all plugins to check:
- Log in to your WordPress dashboard.
- Go to Plugins > Installed Plugins.
- Check the box to select all plugins.
- From the “Bulk Actions” dropdown, select “Deactivate.”
- Click “Apply.”
Now, check if you are still getting logged out. If not, one of the plugins is the problem. Reactivate plugins one by one to find the faulty one.
4. Switch To Default Theme
The theme can also cause issues. Switch to a default theme:
- Log in to your WordPress dashboard.
- Go to Appearance > Themes.
- Activate a default theme like “Twenty Twenty-One.”
Log out and log in again. See if this fixes the issue.
5. Increase Cookie Expiry Time
Sometimes, increasing the cookie expiry time helps. Follow these steps:
- Access your WordPress files using FTP or cPanel.
- Open the wp-config.php file.
- Add the following line:
define('AUTH_COOKIE_EXPIRATION', 31536000);
This sets the cookie to expire in one year. Save the file and upload it back.
6. Check Site Url In Wp-config.php
Incorrect site URL in wp-config.php file can cause this issue. Check and correct it:
- Access your WordPress files using FTP or cPanel.
- Open the wp-config.php file.
- Find the lines that define WP_HOME and WP_SITEURL.
- Make sure they are correct:
define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com');
Replace example.com with your site URL. Save the file and upload it back.

Credit: wpswings.com
Additional Tips
Sometimes, the problem is temporary. Here are some additional tips:
1. Update WordPress
Always use the latest version of WordPress. Updates fix many bugs and issues.
2. Use A Reliable Web Host
A good web host can prevent many issues. Choose a reliable hosting provider.
3. Keep Plugins And Themes Updated
Always update plugins and themes. Outdated ones can cause problems.
Frequently Asked Questions
Why Does WordPress Keep Logging Me Out?
WordPress logs out due to cookie issues or incorrect URL settings.
How Do I Clear WordPress Cookies?
Clear cookies from your browser settings. This helps reset your login session.
Can Plugins Cause WordPress To Log Out?
Yes, plugins can conflict and cause logouts. Deactivate plugins to test.
How Do I Check WordPress Site Url Settings?
Go to Settings > General. Ensure both URL fields match exactly.
Conclusion
WordPress logging out can be annoying. But, it is easy to fix. Follow the steps mentioned. Clear browser cookies, check URL settings, disable plugins, switch themes, and increase cookie expiry time. If all else fails, check your wp-config.php file. Keep WordPress, plugins, and themes updated. Use a reliable web host. These steps will help you fix the problem. Happy blogging!