By Basharat Ali Khan | Last updated: November 4, 2026
WordPress login redirect to homepage is a confusing problem because the login itself seems to work. You enter the right username and password, the page loads, and instead of the dashboard you land on your site’s homepage. Sometimes you cannot even tell whether you are logged in. The cause is usually one of a few things: your user account, a plugin that redirects logins, a URL mismatch or a cookie or cache problem.
This guide explains how to tell which one you have and walks through eight fixes in the order I would check them.
Quick Answer
WordPress login redirect to homepage is usually fixed by clearing cookies, then checking your user role, deactivating plugins that handle logins or redirects, and making sure your WordPress Address and Site Address match exactly. If that does not help, reset your .htaccess file, exclude the login page from caching and test with a default theme.
What WordPress Login Redirect to Homepage Really Means
Two different problems look similar, and the fixes are not the same, so identify yours first:
- Login succeeds but you land on the homepage: this is the problem in this guide. The login works, but something sends you to the wrong place or your account cannot enter the admin area.
- The login page just reloads and asks again: this is the classic redirect loop, usually caused by a URL mismatch or cookie failure. Fixes 1, 5, 6 and 7 below help with that too.
With WordPress login redirect to homepage, WordPress has usually accepted your credentials, and the redirect comes from a role, plugin, theme or setting that changes where you go next.
Fix 1: Clear Cookies and Use the Correct Login URL
WordPress login redirect to homepage is sometimes just stale cookies or the wrong address, and this takes two minutes to check.
- Open a private or incognito window and try logging in again. If it works, clear your browser’s cookies and cache for your site.
- Use the standard login address,
yoursite.com/wp-login.phporyoursite.com/wp-admin/. A custom login page or a made-up address such as/logincan behave differently. - If you use a security plugin that changed your login URL, use the new address it gave you.
- Try a different browser or device to rule out an extension.
Fix 2: Check Your User Role
WordPress login redirect to homepage can happen when your account is not allowed into the admin area. If your user has no role, or a role without access, WordPress lets you log in and then sends you to the front end. One support thread on WordPress.org described exactly this: an administrator account had been set to “no role,” and only creating a fresh admin fixed it.
- If you can log in with another administrator account, go to Users and check your account’s role.
- If you have SSH access and WP-CLI, list users and roles, and restore the role:
wp user list --fields=ID,user_login,roles
wp user set-role USER_ID administrator
If no administrator account works, WP-CLI can also create a temporary one, which you should delete once you are back in:
wp user create tempadmin you@example.com --role=administrator --user_pass='UseAStrongPasswordHere'
Take a backup first. If your administrator role changed without you doing it, treat it as a possible security problem (see the note at the end of this guide).
Fix 3: Look for Plugins That Redirect After Login
WordPress login redirect to homepage is very often caused by a plugin. These types of plugins are the usual suspects:
- Login redirect plugins that send each role to a chosen page
- Membership and course plugins, which may send everyone to a members page or the homepage
- Security plugins that hide
/wp-adminor change the login URL - WooCommerce, which sends customers to the My Account page by default
- Caching plugins that cache a page they should not
To test for a plugin cause, rename the plugins folder. This works even when you cannot enter the dashboard:
- In your File Manager or FTP, open
wp-content. - Rename
pluginstoplugins-off. - Try logging in. If you now reach the dashboard, a plugin is responsible.
- Rename the folder back, then activate plugins one at a time until the problem returns.
Fix 4: Check Your Theme and Custom Code
WordPress login redirect to homepage can also come from your theme or from code snippets. A code snippet that uses the login_redirect filter can send users to the homepage after login, and it may have been added by a developer or copied from a tutorial. Look in your theme’s functions.php or your code snippets plugin for anything that mentions login redirects.
To test your theme, switch to a default theme such as Twenty Twenty-Four. If the login works there, the problem is in your active theme or child theme. Do this on a staging site if your live site is busy.
Fix 5: Fix a URL Mismatch
This is one of the most common causes. If your WordPress Address and Site Address do not match exactly, for example one uses www and the other does not, or one is http and the other https, WordPress can set the login cookie for one address and then send you to the other, where it does not exist. WordPress login redirect to homepage or a login loop is the result.
- If you can enter the dashboard, go to Settings > General and make sure both addresses are identical.
- If you cannot, add these lines to
wp-config.php, just above the line that says “That’s all, stop editing,” using your real address:
define( 'WP_HOME', 'https://yourdomain.com' );
define( 'WP_SITEURL', 'https://yourdomain.com' );
This override forces the values and prevents the protocol and domain from switching. Take a backup before editing wp-config.php. After a move or a domain change, see my guide to migrating a WordPress site to a new host.
Fix 6: Reset Your .htaccess File
A corrupted .htaccess file can cause redirects at the server level.
- Connect with FTP or your host’s File Manager and turn on “Show Hidden Files.”
- Rename
.htaccessto.htaccess-backup. - Try logging in again.
- If it works, go to Settings > Permalinks and click Save Changes so WordPress creates a clean file.
If you are not sure what the file should contain, see my guide on WordPress permalinks not working.
Fix 7: Exclude the Login Page From Cache and Check Security Rules
WordPress login redirect to homepage can be caused by a cache that stores the wrong page for your login request.
- Check that your caching plugin does not cache
wp-login.phpor the/wp-admin/area. Most plugins exclude them by default, but custom settings or a CDN may not. - Clear your caching plugin’s cache and your CDN cache.
- If you use a firewall such as Cloudflare, check its rules and security log for blocked or rewritten login requests.
- Ask your host whether any server-level security rule changed recently.
Fix 8: Force the Dashboard and Check SSL Settings
As a diagnostic step, you can tell WordPress where to send you after login by using a login address with a redirect parameter. Visit this address, using your own domain:
https://yourdomain.com/wp-login.php?redirect_to=https%3A%2F%2Fyourdomain.com%2Fwp-admin%2F
If this takes you to the dashboard, the login works and something is rewriting your default destination, which usually points to a plugin or code snippet (Fixes 3 and 4). Also check that your site uses SSL consistently. If your site runs on HTTPS, make sure your URLs use https and that you are not mixing http and https in login requests.
Quick Reference Table
If WordPress login redirect to homepage still leaves you unsure where to start, match your symptom here.
| Symptom | Likely cause | Fix |
|---|---|---|
| Works in incognito, not in your normal browser | Cookies or cache | Fix 1 |
| You can log in but cannot enter the dashboard | Missing role or capabilities | Fix 2 |
| Different results for different users | Role-based redirect plugin | Fixes 2 and 3 |
| Started after installing or updating a plugin | Plugin redirect | Fix 3 |
| Works on a default theme | Theme or custom code | Fix 4 |
| Started after a move, SSL or a domain change | URL mismatch | Fix 5 |
| The login page reloads in a loop | URL, cookies or .htaccess | Fixes 5 and 6 |
| Fixed but the old page still shows | Cache | Fix 7 |
| The redirect_to test works | Something rewrites the destination | Fix 8 |
If It Started Suddenly and You Changed Nothing
If WordPress login redirect to homepage began without any update or setting change, take it seriously. A hacked site can redirect logins, change user roles or add unknown administrator accounts. Check the Users list for accounts you do not recognize, and read my guide to the WordPress security service and what to do after a hack.
Frequently Asked Questions
Why does WordPress log me in and then send me to the homepage?
WordPress login redirect to homepage usually means the login succeeded, but your account cannot enter the admin area, or a plugin, theme or setting changes where you go after login. Check your role (Fix 2) and your redirect plugins (Fix 3).
Is this the same as the login redirect loop?
Not exactly. In a loop, the login page keeps reloading. Here the login works but lands you on the wrong page. They share some causes, such as URL mismatches and cookies.
Will deactivating all plugins delete my settings?
Renaming the plugins folder only deactivates them. Their data stays in the database. When you rename the folder back and reactivate the plugins, the settings are usually still there, but take a backup first.
Can a WooCommerce setting cause this?
Yes. WooCommerce sends customers to the My Account page after login by default, and some membership and redirect plugins change this for each role. Check those settings if only certain users are affected.
I cannot enter the dashboard at all. What can I do?
Use File Manager or FTP to rename the plugins folder (Fix 3), reset .htaccess (Fix 6) or set the URL constants in wp-config.php (Fix 5). WP-CLI can also repair roles if you have SSH access.
Do I need a developer to fix this?
Often not. Most cases are fixed with cookies, a plugin test or the URL settings. A developer helps with roles, custom code or a possible hack.
Final Thoughts
WordPress login redirect to homepage almost always comes down to your role, a redirecting plugin or code snippet, a URL mismatch or a cache. Test in incognito first, then work through the plugin and URL checks, and keep a backup before you change files.
Need Help Getting Back Into Your Dashboard?
If WordPress login redirect to homepage has locked you out and you need it fixed quickly, contact me here and mention that it is urgent, or read about my WordPress emergency support.
About the author
Basharat Ali Khan is a WordPress developer in Gilgit, Pakistan with 8+ years of experience building custom plugins, Elementor sites and WooCommerce stores.
LinkedIn | WordPress.org profile
Related: WordPress Emergency Support | WordPress Password Reset Email Not Sending | WordPress Stuck in Maintenance Mode | WordPress Services
