
When wordpress admin login redirects to homepage, the experience is confusing. You type your username and password, click Log In, and the page loads. But instead of the dashboard, you see your own homepage, as if you were a visitor. You try again. The same thing happens. You are logged in, but you cannot reach the admin area, and every attempt to open the dashboard sends you straight back to the front page.
The good news is that this problem has a short list of causes. Your site address may be wrong, a plugin may be redirecting logged-in users, a redirect rule in your server files may be too broad, or a stale cookie may be confusing the browser. This guide explains each cause in plain words and walks you through eleven fixes in order, from the simplest check to checking redirect rules at your CDN and host. Follow them one by one and you will be back in your dashboard.
If the login page itself will not load at all, read our guide on fixing the WordPress login page first, because a page that cannot load needs a different set of fixes.
Table of Contents
- Why This Error Happens
- Quick Checks
- Diagnose: Match Your Symptom to the Cause
- Fix 1: Check the Address Bar and Use the Exact Admin Address
- Fix 2: Clear Cookies and Try a Private Window
- Fix 3: Check Your Site Address Settings
- Fix 4: Test With All Plugins Deactivated
- Fix 5: Switch to a Default Theme for a Short Test
- Fix 6: Check the Redirect Rules in Your htaccess File
- Fix 7: Fix a Broken Permalink and Cache Problem
- Fix 8: Correct the Site Address in the Database
- Fix 9: Check the Address Settings in wp-config.php
- Fix 10: Check Your SSL Settings and Fix the http and https Mix-Up
- Fix 11: Check Redirect Rules at Your CDN and Host
- What to Avoid
- Frequently Asked Questions
- Conclusion
Why This Error Happens
1. The Site Address in Settings Is Wrong
WordPress stores two addresses: the WordPress Address and the Site Address. If either one is wrong, WordPress sends you to the wrong place after login. A common mistake is changing the address from http to https in one field but not the other, or typing the address with www in one place and without it in the other. When wordpress admin login redirects to homepage, a mismatched address is the most common cause, and it is also one of the easiest to fix once you find it.
2. A Plugin Redirects Logged-In Users to the Homepage
Many plugins redirect users after login. A membership plugin may send members to a welcome page. A redirect plugin may send all users to the homepage by mistake. A login customiser plugin may have a setting that says “redirect after login” and points it at the homepage. The plugin is doing what it was told to do. The setting is simply wrong, or it applies to administrators when it should only apply to ordinary members.
3. A Redirect Rule in the htaccess File Is Too Broad
The htaccess file on your server can redirect visitors from one address to another. A rule meant to send old pages to new pages can accidentally catch the admin area too. A rule that sends everything to the homepage, or a rule with a small typo, will send every admin login back to the front page. This problem often starts after a site move, an SSL change, or a security plugin writing new rules into the file.
4. A Stale Cookie Confuses the Browser
WordPress uses cookies to remember that you are logged in. If a cookie is damaged, or if it was set for the old address before you changed to https, the browser can get stuck in a loop. It logs in, the cookie says one thing, the site says another, and the browser ends up back on the homepage. Clearing cookies fixes this in seconds, yet it is often the last thing people try.
5. The Theme Sends Users Away From the Dashboard
Some themes include code that redirects users who are not administrators away from the dashboard. That is a reasonable feature for a membership site, but it can go wrong. If the code checks the user role incorrectly, it can redirect administrators too. A theme update can also introduce this bug, so the problem may start on a day when you changed nothing yourself.
6. A Caching Layer Serves the Wrong Page
A cache plugin or a server cache can store a copy of the homepage and serve it for the admin address. The login works, but the cached homepage is what you see. This is more likely when the cache is set to cache pages for logged-in users, which it should never do for the admin area. Purging the cache and turning off caching for logged-in users usually fixes it.
Quick Checks
- Type the full admin address by hand, ending in /wp-admin/, and press Enter.
- Clear your browser cookies and try again in a private window.
- Try a different browser to rule out a browser problem.
- Check whether the problem started after you installed a redirect or login plugin.
- Check whether the problem started after you changed your site address or added SSL.
- Ask another administrator to try logging in from their own computer.
- Look at the address bar after the redirect and note the exact address it shows.
Diagnose: Match Your Symptom to the Cause
| Symptom | Cause | Go to Fix |
|---|---|---|
| Typing /wp-admin/ sends you to the homepage | Wrong address typed, or the address is being changed | Fix 1 |
| Login works in a private window but not normally | A stale cookie in your browser | Fix 2 |
| The problem started after an address or SSL change | Wrong site address in Settings | Fix 3 |
| The problem started after a new plugin | A plugin is redirecting logins | Fix 4 |
| The problem started after a theme change | The theme redirects users from the dashboard | Fix 5 |
| Every admin page redirects, even old bookmarks | A redirect rule in the htaccess file | Fix 6 |
| The dashboard loads once, then redirects again | Cache serving the wrong page | Fix 7 |
| You cannot open Settings to fix the address | The address must be corrected in the database | Fix 8 |
Fix 1: Check the Address Bar and Use the Exact Admin Address
Start with the simplest test of all. A small typing mistake can look like a serious redirect problem.
- Click into the address bar and type your full site address followed by /wp-admin/ at the end.
- Press Enter and watch the address bar carefully as the page loads.
- If the address changes to your homepage, something on the site is redirecting you.
- Try the address with and without www, and note which one works.
- Try the address starting with https and the one starting with http, and note which one works.
- If one version works and the other does not, your site address settings disagree with each other, and Fix 3 will solve it.
- Bookmark the working address so you do not type the wrong one again.
Do not use a saved bookmark from before a site move or an SSL change. Old bookmarks often point at the old address, and the old address redirects to the homepage by design.

Fix 2: Clear Cookies and Try a Private Window
A damaged cookie is a common cause of this problem, and it takes one minute to rule out.
- Open a private or incognito window in your browser.
- Go to your admin address and log in there.
- If the dashboard opens in the private window, your normal browser has a bad cookie.
- Go back to your normal browser and clear cookies for your site.
- In Chrome, open Settings, then Privacy and security, then Delete browsing data, and choose cookies for your site.
- Close the browser completely, open it again, and log in once more.
- Also remove any saved password for the site, so the browser does not fill in old details.
- If the private window fails too, the problem is on the site, not in your browser.
A private window is a clean test because it has no cookies, no saved passwords, and no extensions. When the dashboard opens there but not in your normal window, the browser is the problem, not WordPress.
Fix 3: Check Your Site Address Settings
If you can reach the dashboard at all, even once, check the two address fields. They must match your real site address exactly.
- In your dashboard, go to Settings, then General.
- Look at the two fields at the top: WordPress Address and Site Address.
- Both should show your real site address, including https if your site uses SSL.
- Both should agree on www. Either both use www, or neither does.
- If one field is wrong, correct it and click Save Changes.
- Log out, clear your cookies, and log in again to test.
- If you cannot open Settings because every admin page redirects, skip to Fix 8, which changes the same values in the database.
The official WordPress guide to the General Settings screen explains both address fields and what each one does: WordPress General Settings documentation.

Fix 4: Test With All Plugins Deactivated
A redirect plugin, a membership plugin, or a login customiser is the most likely cause when the problem started suddenly. This test finds it.
- If you can log in as an administrator, even briefly, go to Plugins and deactivate every plugin.
- Try logging in again. If the dashboard opens, one of your plugins is the cause.
- Reactivate your plugins one by one, testing the login after each one.
- When the redirect comes back, the last plugin you turned on is the culprit.
- Open that plugin’s settings and look for a redirect after login option. Point it at the dashboard, or turn it off for administrators.
- If you cannot log in at all, use your hosting file manager or FTP instead. Open the wp-content folder, rename the plugins folder to plugins-off, and try logging in.
- Renaming the folder deactivates every plugin at once. Rename it back to plugins afterwards, then reactivate plugins one by one from the dashboard.
This is the same method used to find a WordPress plugin conflict, and it works because it removes every suspect at once. Keep a note of which plugins were active before you start, so you can turn them all back on.
Fix 5: Switch to a Default Theme for a Short Test
Themes can redirect users too, especially membership themes and themes with custom login pages.
- If you can reach the dashboard, go to Appearance, then Themes, and activate a default theme such as Twenty Twenty-Four.
- Log out, clear your cookies, and log in again.
- If the dashboard opens with the default theme, your theme is part of the problem.
- Switch back to your own theme and check whether it was recently updated.
- Look in the theme settings for a redirect after login option, and turn it off for administrators.
- Contact the theme developer and tell them the exact time the problem started.
- If you cannot reach the dashboard at all, rename your theme folder in the wp-content/themes folder using your hosting file manager. WordPress will fall back to a default theme on its own. Rename the folder back afterwards.
Do not edit theme files yourself unless you know PHP well. A small mistake in a theme file can break the whole site, and a redirect problem is much easier to fix through settings than through code.
Fix 6: Check the Redirect Rules in Your htaccess File
The htaccess file can redirect every request on your site, including admin requests. A bad rule there explains why every admin page redirects.
- Make a full backup of your site before you touch this file.
- Open your hosting file manager and find the .htaccess file in the main folder of your site.
- Download a copy to your computer first, so you can restore it if anything goes wrong.
- Open the file and look for lines that mention Redirect, RewriteRule, or your homepage address.
- Look for a rule that redirects everything, or a rule that was added by a plugin you no longer use.
- If you find a suspicious rule, add a # at the start of the line to turn it off, save the file, and test the login.
- If the login works, that rule was the cause. Delete it or fix it properly.
- If you are not sure which rule is wrong, ask your hosting provider to check the file. They read these files every day.
Never delete the whole htaccess file. WordPress needs it for permalinks and for basic security rules. Only change the lines you understand, and keep the backup copy safe. A redirect that sends admin pages to another address is also covered in our guide on fixing a WordPress site that redirects to another address.

Fix 7: Fix a Broken Permalink and Cache Problem
A damaged permalink setting and a stale cache can work together to send you to the wrong page after login.
- If you can reach the dashboard, go to Settings, then Permalinks.
- Without changing anything, click Save Changes. This rebuilds the permalink rules.
- Log out and log in again to test.
- Next, purge every cache on the site: your cache plugin, your hosting server cache, and any CDN cache such as Cloudflare.
- Check your cache plugin settings and make sure it does not cache pages for logged-in users.
- Turn off any setting that caches the admin area or the login page.
- Clear your browser cache as well, then try the login once more.
- If the problem started after you added SSL, read our guide on fixing too many redirects after SSL, because an http and https mix-up causes the same symptom.
Saving the permalink settings costs nothing and fixes a surprising number of redirect problems. It rebuilds the rules that WordPress uses to decide which page each address should show.
Fix 8: Correct the Site Address in the Database
This is the last resort, for when you cannot open Settings at all. Take a full backup first, and stop if any step feels unclear.
- Make a full backup of your site, including the database, and download it to your computer.
- Open your hosting control panel and find the database tool, which is often phpMyAdmin.
- Open your WordPress database and find the options table, which is usually called wp_options.
- Find the row with the option name siteurl and check its value. It should be your real site address, including https.
- Find the row with the option name home and check its value the same way.
- If either value is wrong, click Edit on that row and correct it carefully.
- Save the row, clear your browser cookies, and try logging in again.
- If the values were already correct, the problem is not the address, and you should ask your hosting provider to check the server redirect rules.
Change only those two rows. The options table holds many important settings, and changing the wrong row can take your site down. If the site stops loading after a database change, restore the backup at once. Our guide on fixing a WordPress website that will not load can help if the site goes down during the repair.

Fix 9: Check the Address Settings in wp-config.php
Two lines in the wp-config.php file can set your site address, and when they are present they override the Settings page completely. The address fields in Settings then appear greyed out and cannot be changed from the dashboard, which is why Fix 3 seems to do nothing.
- Make a backup copy of wp-config.php and download it to your computer before you touch it.
- Open the file in your hosting file manager and search for the lines that mention WP_HOME and WP_SITEURL.
- If both lines are there, check their values against your real site address, including https and www.
- If a value is wrong or old, such as http instead of https, or an old domain name, correct it carefully.
- Save the file, clear your browser cookies, and try logging in again.
- If the lines are missing, that is normal. The Settings page controls the addresses in that case, so do not add the lines unless you need them.
- If the values are already correct, the address is not the problem, and the cause is a redirect rule somewhere else.
Change only those two lines. The wp-config.php file holds your database details and security keys, and a mistake there can take the whole site down, which is why the backup matters so much.
Fix 10: Check Your SSL Settings and Fix the http and https Mix-Up
Adding SSL changes your address from http to https, and if any part of the site still uses the old http address, WordPress can bounce you between the two versions until you land on the homepage. This fix checks the SSL setup itself, not just the address fields.
- Open your SSL plugin settings and check that the option to force https is switched on.
- Look for a mixed content fixer in the same plugin and make sure it is switched on too, so old http links are served as https.
- If you use Cloudflare, open its SSL settings and check the mode. It should say Full, not Flexible, because Flexible sends http to your server while showing https to visitors, and that mismatch causes redirect loops.
- After any SSL change, clear your browser cookies completely. Old cookies were set for the http address and can keep sending you to the wrong version.
- Log in again from a private window and watch the address bar. It should stay on https the whole time.
- If the problem started the day you added SSL, the mix-up is almost certainly the cause, and fixing the mode usually clears it at once.
Do not turn your SSL plugin off and leave it off. Your site needs https for security, and the fix is to set the mode correctly, not to remove the protection.
Fix 11: Check Redirect Rules at Your CDN and Host
Not every redirect lives in the htaccess file. Your CDN and your hosting panel can hold redirect rules of their own, and a rule there can send every admin page to the homepage before WordPress even sees the request.
- Log in to your CDN dashboard, such as Cloudflare, and open the Page Rules or Redirect Rules section.
- Look for any rule that matches your whole domain, or that sends traffic to your homepage address.
- Turn off any rule that catches the admin area, then test the login again.
- Open your hosting control panel and look for its Redirects section as well. Some hosts add a redirect there during a site move or an SSL change.
- Remove or fix any rule that sends admin pages to the homepage, and keep a note of what you changed.
- Purge the CDN cache after changing a rule, because a cached copy of the old rule can keep redirecting you for hours.
- Test the login in a private window after the purge, so no old cookie or cache hides the result.
- If you find no rule in either place, ask your host and your CDN support team to check the server-level redirects. They can see rules that do not appear in your dashboard.
Redirect rules stack on top of each other, so a rule in the CDN, a rule at the host, and a rule in htaccess can all push you in the same wrong direction. Checking each layer in turn is the only way to find the one that is wrong.
What to Avoid
- Do not delete the whole htaccess file. Only change the lines you understand, and keep a backup.
- Do not edit the database without a full backup saved on your computer first.
- Do not set a redirect after login to the homepage for all users. Administrators need to reach the dashboard.
- Do not use a redirect plugin from an unknown site. Only use plugins from WordPress.org or a vendor you trust.
- Do not use a nulled plugin or theme from an unofficial download site. These often contain hidden redirect code.
- Do not keep using an old bookmark from before a site move or an SSL change. Type the address fresh.
- Do not change the site address in two places at once. Change one field, save, and test before changing the other.
- Do not leave all plugins deactivated after testing. Reactivate them one by one and find the culprit.
Frequently Asked Questions
Why does WordPress send me to the homepage after I log in?
The most common reason is a wrong site address in Settings, so WordPress sends you to the address it thinks is home. A plugin that redirects users after login is the next most common cause. Check the two address fields first, then test with all plugins deactivated.
I can log in, but I cannot open any admin page. What is wrong?
A redirect rule in the htaccess file, or a plugin that blocks the admin area, is the usual cause. Try logging in from a private window first to rule out cookies. Then deactivate your plugins from the file manager and test again. If that fixes it, reactivate them one by one.
Is it safe to edit the htaccess file?
It is safe when you download a backup copy first and change only the lines you understand. Add a # at the start of a suspicious line to turn it off, then test. If you are not sure which line is wrong, ask your hosting provider to check the file for you.
Why did this start right after I added SSL?
Adding SSL changes your address from http to https. If the site address in Settings still says http, WordPress redirects you between the two versions and you can end up on the homepage. Update both address fields to https and clear your cookies.
Can a cache plugin cause this redirect?
Yes. A cache that stores pages for logged-in users can serve a copy of the homepage for the admin address. Purge the whole cache, turn off caching for logged-in users, and test again. The problem should clear as soon as the cached copy is gone.
What should I do if I cannot open Settings to fix the address?
Change the siteurl and home values directly in the database options table, using your hosting control panel. Make a full backup first and change only those two rows. If that feels too risky, ask your hosting provider to change them for you.
Conclusion
When wordpress admin login redirects to homepage, the cause is usually one of a short list: a wrong site address, a plugin redirect, a bad rule in the htaccess file, or a stale cookie. Start with the private window test and the address bar, then check the two address fields in Settings. If those are right, test your plugins one by one and look at the htaccess file. The database fix is there as a last resort for when you cannot open Settings at all.
Work through the eleven fixes in order and test after each one. Do not change five things at once, because then you will never know which change fixed it. Once the dashboard opens normally again, bookmark the correct admin address and check that your redirect plugin, if you use one, leaves administrators alone. A login that lands where it should is a small thing, but it is the front door to your whole site.
For the official guide to the WordPress admin screens, including the dashboard and settings pages, see the WordPress administration screens documentation.
