How to Fix the WordPress Login Page Refreshing and Redirecting Issue (3 Ways)

How to Fix the WordPress Login Page Refreshing and Redirecting Issue (3 Ways) thumbnail

Are you trying to log in to your WordPress website but can’t get past the login page? If so, you might be stuck in a redirect loop.

When your WordPress login page keeps refreshing after entering your username and password, you’re likely dealing with a caching problem or a plugin error. Fortunately, this is an issue that can be solved quickly.

In this post, we’ll look at the common causes of this redirect loop and then walk you through three simple fixes to help you log back into your website. Let’s get started!

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Common Causes of the Login Page Refresh and Redirect Issue in WordPress

The WordPress login redirect issue occurs when the login screen keeps refreshing and redirects you back to the same page. As a result, you’ll be locked out of your site’s admin area.

The WordPress login page.

There are three possible reasons for this error:

  • Your browser might be storing outdated WordPress files and data.
  • A recently-installed WordPress theme or plugin might be faulty or incompatible with other plugins.
  • Your WordPress site might have a corrupted .htaccess file.

You’ll be pleased to know that there’s an easy fix for each scenario. Next, we’ll show you how to troubleshoot the WordPress login redirect error so you can get back into your site.

Skip the Stress

Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

How to Fix the WordPress Login Page Refreshing and Redirecting Issue (3 Methods)

Now, let’s go through the three main steps to fixing the WordPress login redirect error. Before proceeding, you might want to perform a backup of your site just in case something goes wrong and you need to restore an earlier version.

1. Clear Your Browser Cookies and Cache

The quickest way to solve the WordPress login redirect issue is by clearing your browser cookies and cache. WordPress uses cookies to store authentication data. Sometimes your browser might retain old files, resulting in a redirect loop when you try to log in to your site.

To clear the cookies and cache in Google Chrome, click on the three-dot icon in the top-right corner of your browser. Go to More Tools in the drop-down menu, and then choose Clear browsing data.

“Clearing your browsing data in Chrome.”

In the popup window that appears, set the time range to All time and check the following options: Cookies and other site data and Cached images and files. Finally, click on Clear data.

If you’re not a Chrome user, don’t worry. You can easily find instructions for clearing your cache and cookies in different browsers.

Once you’ve completed this process, restart your browser and try logging in to your WordPress site. If you’re still facing the same login error, head to the next step.

2. Check New Installs and Updates (Plugins and Themes)

As we mentioned earlier, the WordPress login redirect issue may be caused by a theme or plugin you’ve recently installed. Perhaps this new theme or plugin is faulty, or it is incompatible with other plugins on your site.

To determine whether the problem is caused by a theme or plugin, you can do two things:

  • Deactivate the plugins on your site
  • Revert to your site’s default theme

First, you’ll need to access your WordPress site via a Secure File Transfer Protocol (SFTP) client or the file manager in your website’s hosting account. If you have a DreamHost account, you can log in and navigate to WordPress > Managed WordPress in the sidebar.

Then find your domain and select Manage. On the next page, click on the Manage Files button in the Details section. This will take you to the file manager. Next, locate and open the folder labeled with your domain name.

“Accessing your WordPress site’s files.”

To deactivate your plugins, open the wp-content folder in your site’s root directory, and then find the plugins folder and rename it plugins_test.

 “Renaming the plugins folder.”

If this solves the login problem, you’ll need to determine which specific plugin is at fault. To do that, restore the folder’s original name, open it, and rename one of the plugin folders instead. You can repeat this process to deactivate one plugin at a time, testing your login page after each one to identify the culprit.

If you’re still unable to log into your WordPress site after deactivating the plugins, return to the wp-content folder and find the themes folder. Rename the folder themes_test. Your WordPress site will automatically revert to a default theme.

“Renaming the themes folder.”

If deactivating these elements solves your login problem, you can head to your WordPress dashboard and perform any necessary updates. You might also want to replace the plugin or theme causing trouble or contact the developer for assistance.

3. Restore Your Default .htaccess File

If you’ve tried the above two methods and are still stuck in the loop, don’t worry. There’s still one last method you can try.

Another possible cause of the WordPress login redirect loop is a corrupted .htaccess file. Located in your site’s root directory, the .htaccess file enables WordPress to interact with your server and generate permalinks for your site.

To access this file, connect to your website through an SFTP client or the file manager in your hosting account. From there, go to your site’s root directory, locate the .htaccess file, and delete it.

“Deleting the .htaccess file.”

Next, try logging in to your site. If you’re successful this time, you’ll know that the problem was the .htaccess file.

Finally, you’ll need to create a new .htaccess file. Go to Settings in your WordPress admin dashboard, select Permalinks, and click on the Save Changes button at the bottom of the page.

“Creating a new .htaccess file.”

Note that you don’t need to make any changes on the Permalinks Settings page. Simply hit the blue button, and a new .htaccess file will appear in your site’s root directory.

Additional WordPress Error Resources

Do you want to learn how to troubleshoot other WordPress errors? We’ve put together several guides to help you solve several common WordPress issues:

If you’re looking for more WordPress tips, check out our WordPress Tutorials. This is a collection of guides designed to help you navigate the WordPress dashboard like a pro.

Login Issue Be Gone

The WordPress login redirect loop may seem intimidating, but it is a common error. It’s generally caused by a caching issue, a faulty plugin or theme, or a corrupted .htaccess file.

There are three things you can do to get out of this redirect loop:

  1. Clear your browser cookies and cache.
  2. Check to see if the problem is caused by a newly installed theme or plugin.
  3. Delete and restore the .htaccess file in your website’s root folder.

If you want to avoid dealing with WordPress errors in the future, consider switching to DreamPress. Our managed WordPress hosting service takes care of all technical problems for website owners, which means you get to spend less time troubleshooting and more time growing your business!

Photo of Jason Cosper
About the Author:

Jason is DreamHost’s WordPress Product Advocate, based out of Bakersfield, CA. He is currently working on making our DreamPress product even better. In his free time, he likes to curl up on the couch and watch scary movies with his wife Sarah and three very small dogs. Follow him on Twitter.