This is one of those things all WordPress developers stumble upon at some point in time. WordPress Login Redirect Loop occurs when you are redirected continually to the wp-admin page even when you have the correct login details.
It’s scary but really easy to fix. We’ll explain 5 proven ways of solving this problem. These methods include:
- Clearing Your Browser Cache
- Manually Deactivating Plugins
- Reverting Back To Default WordPress Theme
- Renaming Or Deleting htaccess File
- Editing wp-config.php File.
To go straight to the solution part, click any of the methods above.
“I am trying to login to my WordPress dashboard but something is wrong?!?”
You have entered the right information, but the page keeps refreshing and redirecting you to the same location. So, what’s the problem?
If you were redirected to the same place, it all boils down to the same thing. What you are dealing with is the so-called WordPress login redirect loop. Let’s put our computational science caps and fix the issue.
WordPress Login Redirect Loop – The Causes
To find what’s causing the issue, we must first check a couple of things. Is it a faulty plugin? A wp-admin directory problem? An error in the WordPress theme? Is the WordPress redirect loop a result of a faulty wp-admin or wp-login.php files?
WordPress Login Redirect Loop – The Solutions
Now, it’s time to set this login page refreshing matter straight once and for all.
1. Clear Your Browser Cache
All you have to do in this case is to clear browsing data.
- In the top right corner, press on the 3 dots button. Then, follow the path from the image below.
- On the left side, you will see a “Clear browsing data” button, press it.
- Lastly, set a time range to “All time“, check the “Cookies and other site data” option, and click “Clear data”
2. Manually Deactivate Plugins
- Firstly, open your FTP Client (FileZilla is a great and free one).
- Enter the web host’s name, your username/password, and the port from which you will access the FTP client. *If you don’t know all that information you can ask your hosting provider.
- Open the wp-content folder.
- Locate the “Plugins” folder and rename it to something like “Plugins Backup”.
- Don’t close FileZilla yet, we may need it soon.
- Go back to your browser and refresh your WordPress website.
This should fix the WordPress login problem. If not, move to the next step.
3. Revert Back To Default WordPress Theme
Just like with plugins, something can go wrong with the theme itself. There could be a virus or something that is interfering with the code. Maybe the developers did not update the theme, so it is no longer compatible with the new version of WordPress.
As a result, you are experiencing WordPress redirect loop, thereby unable to login to wp-admin. What now?
Just as we did in the second solution, this fix revolves around renaming WordPress files too. The only difference is that you need to rename “Themes” instead of the “Plugins” folder.
Now, here is the catch, the renaming method only works when a current theme is not one of the default themes. But, what should you do if it is?
My Theme Is Already A Default WordPress Theme?!
Fear not, the only difference here is that you also need to overwrite some files.
- Go to the official WordPress site.
- Download the latest WordPress files.
- Then, open FileZilla if you did not leave it open.
- Unzip the WordPress files, and drag the “Themes” folder to the wp-content folder.
- Accept the overwrite, and now you have a fresh copy of the themes on your site.
- Go back to your browser and refresh it.
All in all, the WordPress wp-admin redirect loop should now stop.
4. Rename Or Delete htaccess File
The htaccess file contains a set of rules on how the internal server should respond to various requests. There are times when this relation gets altered and as a result creates a redirect loop on wp-admin. The fix is rather simple:
- Switch back to File Zilla.
- In the main directory, you will see the file named “.htaccess“.
- Delete it, or just rename it to have a backup.
- Refresh your browser.
- If you now have the WordPress wp-admin access, go to Settings/Permalinks.
- Scroll down to the bottom and press Save Changes.
- That’s it, you should no longer have any wp-admin redirect or similar server errors.
Note: The deleted htaccess file (or in our case renamed) is a very common fix. It can be a great trick for any website builder/developer.
5. Edit wp-config.php File
wp-config.php file is one of the more important files of the WordPress package. It contains information WordPress needs to connect to the database. Surely, it is not something you should mess around with for the fun of it.
In a case that you accidentally change something (e.g. Database Name) and you are using a WordPress hosting service, you can ask your provider for the information, and change it back.
Now, if all the steps above did not work, you can try the update site URL method.
To do that simply go to Filezilla, and open the wp-config.php file.
Before “/* That’s all, stop editing! Happy publishing. */” line, add the following:
*With yoursite.com part being the actual URL of your website.
And there you go, you’ve defined your Site URL and WordPress admin login redirect issue is now fixed.
Bonus Tip Of The Day: If you are in urgent developing trouble and need help with it, sites like Stack Overflow or Stack Exchange can surely help. They can assist you with problems related to meta (Meta Stack Exchange), WordPress security, refreshing and redirecting issues, and much more!
Note that these “forums” use the English language only.
WordPress Login Redirect Loop – Conclusion
Now you know what to do when the WordPress login page refreshing error occurs. If we managed to help you with this question or you would like to improve this answer, write a comment below.
To see more WordPress tutorials or WordPress related posts check the rest of our blog.
- How to Completely Delete WordPress Site
- Hide Page Title in WordPress – 4 Easy Methods
- How to Limit Login Attempts in WordPress