How to Fix WordPress Login Page Refreshing and Redirecting Issue

How to Fix WordPress Login Page Refreshing and Redirecting Issue

Are you experiencing WordPress Login Page Refreshing and Redirecting Issue? This may be occurring because you got stuck in a redirect loop. This post will discuss how to Fix WordPress Login Page Refreshing and Redirecting Issue.

When your WordPress login page keeps refreshing again and again after entering your login details, then your site is experiencing a serious issue. 

This locks you out of your WordPress admin area, and you are unable to work on your website.

First, we will discuss what causes WordPress Login Page Refreshing and Redirecting Issues and how to fix them to access your website. 

 Causes of Login Page Refresh and Redirect Issue in WordPress?

There are many possibilities due to which your site may experience Login Page Refresh and Redirect Issue.

The common reasons could be the incorrect WordPress URL settings, a failure to set login cookies, or your browser storing outdated WordPress files and data.

It may also emerge when there is a problem with your .htaccess file or if you have recently updated or installed your plugin or your theme that may be faulty or incompatible with other plugins.

Now, moving on to the solutions you could use to resolve the WordPress Login Page Refreshing and Redirecting Issue.

Let’s get started!

Clear Cookies to Resolve Redirecting Issues

WordPress uses cookies for login authentication. 

Normally, when you access your WordPress, it validates your login details and then sets a login cookie in your browser. Then, it redirects you to the WordPress admin area. 

However, if it fails to set cookies, you may be redirected back to your login page. So the first step to fix the issue could be clearing your browser cookies and cache.

In Google Chrome, click on the settings menu and then click on More Tools » Clear Browsing Data.

This will bring the Chrome Settings page along with the ‘Clear Browsing Data’ popup shown on the screen.

From here, you have to click the check box next to ‘Clear cookies and other site data’ and ‘Cached images and files’ options provided there.

 

Then, click on the ‘Clear data’ tab, and it will clear the browser cache.

Also, make sure to check that the browser has enabled the cookies. After doing that, refresh your browser and then try to log in to your admin area. Usually, this fixes the issue. If it doesn’t, you can try the next method.

Update WordPress URL Settings

If you have newly changed your site domain settings, it’s worth checking the WordPress Site URL.WordPress comes with a settings option that contains your website’s URL and the URL of your WordPress.

If these URLs are wrong or inaccurate, then WordPress will redirect you to the login page again and again.

Now, since you can’t log in to your WordPress admin area, you have to edit the wp-config.php file to fix this redirecting issue.

To start, you have to connect to your site using an FTP client or File Manager app in your WordPress hosting account.

The wp-config.php file contains your important WordPress settings. 

Now, look for the wp-config.php file in your site’s root folder. Then, click to edit the file and paste the code given below just before the line ‘That’s all, stop editing! Happy publishing’.

 define('WP_HOME','https://www.example.com');

define('WP_SITEURL','https://www.example.com');

Note: Please replace example.com with your own domain name in the code.

Then, save your changes and upload the file back to your site.

Now, you can try to log in to your website, and hope this fixed the issue for you.

If it doesn’t, you can try the next method.

Deactivate All WordPress Plugins

Sometimes the error may arise due to WordPress plugins when there is a conflict between two plugins, or you installed a faulty plugin.

To check if the error is arising due to a plugin or not, you have to deactivate all the plugins on your site.

Now, since you can’t log in to your WordPress admin area, you have to visit the /wp-content/ directory to delete all the plugins.

To start, you have to connect to your site using an FTP client or File Manager app in your WordPress hosting account.

After that visit the /wp-content/ directory. You will notice a folder named ‘plugins’ inside it. WordPress installs all your plugins here.

You have to rename the plugins folder to anything like plugin .deactivate or plugins_backup.

Now, it will deactivate all WordPress plugins installed on your site.

You can also see our detailed tutorial on how to deactivate all WordPress plugins when unable to access WP-Admin.

After deactivating all the plugins, You can try to access your WordPress site. If you succeed, then this suggests that one of your plugins was causing the redirecting issue.

Now, you can activate the plugin one at a time to get the faulty plugin. When you find out the faulty one, you can delete it and find an alternative plugin for yourself. You can also describe the issue to the plugin developer.

If the error is still displaying on your site, you can move to the next method to Fix WordPress Login Page Refreshing and Redirecting Issue.

Switch to the Default Theme

If the above plugin solution does not fix the error, you can check for the faulty theme. For that, replace the current theme with a default theme.

If you can log in to your admin area, then switch your theme with a default theme. 

However, if you can’t log in to your admin area, then you have to connect to your website using an FTP client. Then, visit the /wp-content/themes/ folder. It includes all installed themes on your site.

Right-click on your current WordPress theme to select it and download it to your computer for a backup.

Then, you have to delete your current theme from your site. To do that, Right-click on your theme folder and click the ‘Delete’ option.

Now, Your FTP client will erase the theme from your WordPress website.

Now, if you have a default theme installed on your websites, such as Twenty Eighteen or Twenty Nineteen, then WordPress will automatically use it as the default theme.

But, if you don’t have a default WordPress theme installed, then you have to install it manually using an FTP client.

If switching the theme resolves the issue, then it was your theme creating the issue. Now you can reinstall a fresh copy of your theme if you want, or you can use other themes.

Delete .htaccess File in WordPress

Sometimes the .htaccess file can get corrupted, which can cause internal server errors or login page refreshing and redirecting errors.

If you can’t access your website, you have to connect to your website through an FTP client or File Manager from your WordPress hosting account.

After that, look for the .htaccess file in the root folder of your site and download it as a backup.

Then, you have to delete the .htaccess file from your website.

After that, go to the wp-admin directory and if you see the .htaccess file there, then delete it as well.

Now, go ahead and try to log in to your WordPress website. If you can access it, then this suggests that your .htaccess file was creating the issue.

Now, log in to your admin area and visit the Settings » Permalinks page. Then, click on the Save tab without making any changes. This will create a fresh .htaccess file for your website.

Contact your Web Hosting Provider

Usually, the Login Page Refreshing and Redirecting Issue can be fixed by any above solutions. However, if you’re still seeing this issue, then you can get in touch with your web hosting service provider and ask to fix the error.

Maybe a corrupted WordPress installation or a wrong line of code is creating the issue. Your hosting providers will help you detect that corrupted file or code and resolve this error for you.

To conclude- If you got stuck in a redirect loop and your WordPress login page keeps refreshing again and again and redirecting you back to the login page, then your site is facing the login page refreshing and redirecting issue. You can fix that by following the instructions in our tutorial.

We hope this post helped you Fix WordPress Login Page Refreshing and Redirecting Issue. If you are experiencing any other error on your site, you can fix it by following the steps told in our other article on what to do when you are logged out of the WordPress admin area.

Leave a Comment