One of the common errors in WordPress is the ‘Error Too Many Redirects’. It is a misconfigured redirection issue. And what makes it one of the frustrating errors to handle in WordPress is that the users get locked out of their own WordPress website when such an error occurs. If you are facing any such issue in your WordPress website, then we are here to help you. All you have to do is to go through the contents of this article. In this article, we will first discuss the causes of the ‘Error Too Many Redirects’ issue. Once you will be clear about all the possible reasons behind the error, we will present you with the different possible solutions to avoid or resolve the ‘Error Too Many Redirects’ issue in WordPress.
Causes of the Error Too Many Redirects Issue in WordPress:
The two most common causes of WordPress Error Too Many Redirects issues are:
- Because of a plugin
- Incorrect settings
WordPress employs the SEO-friendly URL structure feature. This feature utilises the redirect function. Numerous popular WordPress plugins make use of this feature. These plugins might need this feature for the below purposes:
- To set up temporary redirects
- To set up permanent 301 redirects
- For the 404 errors
In the case of a plugin, the below two could be the probable causes for the ‘Error Too Many Redirects issue’ in WordPress:
- Redirects getting affected while using a plugin to fix the SSL insecure content issue.
- Redirects getting affected while using a plugin to fix the WordPress caching plugin.
Error Message:
The Error message might look like this in most cases,
- The page isn’t redirecting properly.
- This page isn’t working.
Though an error message is generated, this message does not clarify the reason behind the conflict. This as well results in getting into a loop of redirect error.
Fixing the error of too many redirect issues in WordPress:
To reaccess your WordPress website, you will be first required to resolve the error of too many redirect issues. Since we are not sure about the cause of the error, we will try to look into each of the most probable causes, one by one, and will try to resolve the issues associated with it.
Step 1: Clear Browser Cookies and Cache:
Cookies are one of the common causes of many errors in WordPress, including the error of too many redirect issues in WordPress. To find out if the web browser cookies are causing the error, you can try accessing your WordPress website with other browsers. You can use any of the web browsers like Firefox, Microsoft Edge, Safari, Opera, etc.
If the error is not replicating in another browser, then you can follow the below steps.
- Go to your regular browser.
- Clear browser cookies and cache.
You can also take help from an article on clearing browser cache if you are not sure about what steps to follow for the same.
In case, the error replicates itself in other browsers also, all you have to do is to spend some more time resolving the error and will have to continue reading this article to find the right fix for your issue.
Step 2: Deactivate All WordPress Plugins:
When the plugin sets up a redirect, this redirect may cause a conflict between the plugin and WordPress. This conflict is between the redirect set up by WordPress and the redirect set up by the plugin. Though this conflict in itself might not be a concern for you. But when this conflict results in a WordPress error like the error of too many redirects, then this becomes a concern. And, in general, the conflict of redirects causes such an error. So, we will have to take it as a probable cause behind the error of too many redirects in WordPress.
After cache cleaning, the next check is for the plugin. To find out if the real cause is really a plugin or not and to fix it, you can follow the below steps:
- Visit the WordPress admin area.
- Go to the Plugins » All Plugins page.
- Deactivate all the WordPress plugins on your website.
- In most cases, you will be unable to access the WordPress admin area, so you can use the FTP client or the File Manager app in your WordPress hosting control panel.
- Use the FTP client to connect to your website.
- Go to the /wp-content/ folder.
- Locate the ‘plugins’ folder.
- Rename it to ‘plugins.deactivate’.
- By doing this, when WordPress will locate the plugin folder to load the plugin files, it will not find any such folder.
- The active plugins will thus get deactivated.
- Go to your WordPress website.
- Log in to your WordPress admin area.
- If you are able to reaccess it, the error gets resolved.
- But, you still have to activate your plugins and you also need to locate and disable the error-causing plugins to avoid any such future issues.
- Go to the FTP client or File Manager app.
- Rename your plugins.deactivate the folder back to ‘plugins’.
- Go to the WordPress admin area.
- Go to the Plugins » All Plugins page.
- Activate your plugins one by one.
- Check if the error reappears after activating each plugin.
- This way you will be able to detect the error-causing plugin.
- You can then contact your plugin support to get the necessary help related to the plugin.
- You can also install a new suitable plugin instead of the problematic one.
Step 3: Fix WordPress URLs:
The third check is the misconfiguration in WordPress URL settings. To detect the cause and fix it, follow the below steps:
- Use the FTP client to connect to your website.
- Go to the /wp-content/themes/your-theme-folder/.
- Locate the functions.php file.
- You can use Notepad or TextEdit to edit the functions.php file.
- Add the following code at the bottom of the functions.php file.
update_option( ‘siteurl’, ‘https://test.com’ );
update_option( ‘home’, ‘https://test.com’ );
- In the above code, replace https://test.com with your site URLs.
- Save the changes.
- Upload the functions.php file back to your website.
- Reconnect to your website.
If the error gets resolved, then you can continue with your website. If not, continue reading the article.
Step 4: Reset WordPress .htaccess File:
The redirects and other server settings are managed by the website servers using the .htaccess file. The .htaccess file is also utilised by the WordPress websites. But due to a change caused by a plugin, a fault may arise in the .htaccess file. And even if the plugin is now deactivated, it is not necessary that the issue is resolved in the .htaccess file too. Thus, you need to make some manual modifications to your WordPress .htaccess file. To do this, you can follow the below steps:
- Use the FTP client or the File Manager app in your WordPress hosting control panel.to connect to your website.
- Go to the root folder of your website.
- Locate the .htaccess file.
- In case, you can’t find any such file, you can check for an article on locating the .htaccess file in WordPress.
- Create a backup of your .htaccess file by downloading it to your computer.
- Now, delete the file from your WordPress website.
- Revisit your WordPress website.
- If the error gets resolved, then the error of too many redirects was caused by your .htaccess file.
- Now, you need to recreate your .htaccess file.
- It usually happens automatically on your WordPress website.
- But we here recommend you to create it on your own.
- Go to the Settings » Permalinks page.
- Click on the ‘Save changes’ button at the bottom.
And it’s done. Now you can continue using your WordPress website normally.
We hope that you were able to solve the error of too many redirects issues in WordPress using the above steps. If it is not so, we suggest you contact the WordPress support team.