There is no question that WordPress is by far, the most popular web publishing platform in the entire world accounting for an estimated, 800+ million websites as of 2023. Of course, as such, you would expect WordPress to have its fair share of technical problems. As a business owner running a WordPress website, perhaps one of the most perplexing and annoying problem commonly referred to as the “WordPress login redirect loop”.
What is WordPress Login Redirect Loop?
WordPress Login redirect loop is a situation that happens after entering the correct login username and password in your WP back end that upon hitting the “Log in” button, you are immediately redirected back to the home page.
Why is this Happening?
The WordPress Login redirect loop could be the result of a plugin conflict, or in some cases, an indication that your website may have been hacked.
How to Fix the WordPress Login redirect loop
There are a few ways to address this issue, here they are.
Empty/Clear Your Browser
Depending on the specific browser you are using, this can usually be accomplished by clicking on the browser curly refresh arrow to the left of the URL address field. Firefox, Chrome and Edge all have these curly refresh arrows. Doing so, should clear your cookies.
What are Cookies?
Cookies are means to store a small amount of information, such as a username and password, as a way to identify your computer and is created by the web server when you connect to it. When a visitor returns to a website at a later time, the web browser then provides that stored information to the web server in the form of a cookie.
Emptying or Clearing Your Browser Did Not Solve the Problem
If clearing/emptying your browser does not resolve this issue, your wp-config.php file may need to be updated with some code. If you do not feel comfortable editing PHP files and using FTP, you may instead want to call your hosting support.
Otherwise, if you do feel comfortable attempting a more technical approach to resolving this issue yourself, you will need FTP access to the server. This can be done via an FTP client or a WordPress plugin, such as File Manager By mndpsingh287.
Where to Update Your wp-config.php file
Once you’ve downloaded your wp-config.php file, open it (using notepad in a Windows operating system or a web editing software such as Dreamweaver), scroll down to the section that reads:
/* That’s all, stop editing! Happy blogging. */
Now, on the line directly above /* That’s all, stop editing! Happy blogging. */, copy and paste in the following code:
define( ‘WP_HOME’, ‘https://yourwebsitename.com’ );
define( ‘WP_SITEURL’, ‘https://yourwebsitename’ );
You must replace “yourwebsitename.com” with the domain name of your website.
For example, if your domain name is prominentweb.com then the code would look like this:
define( ‘WP_HOME’, ‘https://prominentweb.com’ );
define( ‘WP_SITEURL’, ‘https://prominentweb.com’ );
After pasting in the code, be sure to save the wp-config.php file and upload it back to the server.
If you are still unable to log in to your WP Admin, then you may have a plugin conflict, your htaccess file could be corrupt or your website could be hacked.
At this point, if you are not comfortable troubleshooting any further, you may want to contact your hosting provider technical support.