ERR_TOO_MANY_REDIRECTS: How to fix error on WordPress

Introduce

During the development of WordPress, you may experience many bugs. One of the most common errors is ERR_TOO_MANY_REDIRECTS. In Google Chrome it will appear as This webpage has a redirect loop, in Firefox it will be displayed as The page is not redirecting properly. This error usually occurs when the configuration is wrong in the WordPress setting, it causes the website to fall into the state of the site is constantly redirected. This error could be due to URL configuration, WordPress plugins or .htaccess, this tutorial will provide you with the most effective solution to fix this redirect.

What do you need?

Before you start this tutorial, you need to prepare:

  • Access the hosting control panel or FTP.
  • Access to the WordPress administration area (optional).

Step 1 – Check the URL settings

The first thing you should do to fix err_too_many_redirects is to check the URL settings.

Option 1 – Check the URL settings via the Administrator Dashboard to fix the ERR_TOO_MANY_REDIRECTS error

In WordPress Admin Area, click Settings. In General Settings, check the WordPress Address (URL) and Site Address (URL) for correct defaults. Make sure the URL you see is correct. If WordPress is installed under a subdirectory (for example, / public_html / wp /), it will appear as, www.example.com/wp).

If you make any changes, make sure you click the Save Changes button at the bottom of the page.

Option 2 – Check / Change the URL settings manually

You may not be able to access the Admin Area so in this case you can change the URL setting using the wp-config.php file. You can edit this file by File Manager or by editing the file, editing and uploading to the host via the FTP client. In this example we will edit the file via File Manager:

  1. Access File Manager, through the hosting control panel.
  2. Find the file wp-config.php.
  3. Click Edit.
  4. Add the following lines to the file and make sure http://example.com matches the URL your WordPress should use (for example if you installed WordPress in the root: / public_html / directory, use your domain name if It’s in the subfolder (/ public_html / wp), replacing it with a URL to the subfolder (http://example.com/wp) You can add the following lines to the end of the file:

    define(‘WP_HOME’,’http://example.com’);

    define(‘WP_SITEURL’,’http://example.com’);

  5. Make sure you click the Save button.
  6. Visit your website and check that after fixing WordPress fixed URLs, ERR_TOO_MANY_REDIRECTS errors are fixed.

Another option is that you can also edit the URL setting via the database. You can find how easy this is, follow these instructions.

Step 2 – Disable plugins

Another more common reason is due to broken / old plugins. Please disable all and try to visit your website again, see if it is correct or not. AtHostinger and other WordPress hosting providers, you can disable the entire plugin quickly and easily as follows:

  1. Access File Manager through the hosting control panel.
  2. Accessing the wp-content directory, you will see the Plugins folder.
  3. Select the Plugins folder, and then select the Rename option. Now try changing your directory name to plugins_backup, or any other name. Do not worry, plugins will remain safe, and you will only need to rename them after defining which ones are causing the problem.
  4. Save changes by clicking the Save button.Once you have renamed the plugins directory, try accessing your website again. If the error is gone, the big possibility is that one of the plugins was corrupted or outdated. Try deleting some of your latest plugins and rename the folder as Plugins. The way to delete is to also visit the Plugin directory, select the folder containing the plugin you want to delete and delete it. In this example, we will remove WooCommerce via File Manager. Just select the plugin you want to delete and click the Delete button:

Step 3 – Disable the .htaccess file

Another possibility that causes redirect errors is due to the .htaccess file causing the site to be redirected repeatedly. If so, you need to disable .htaccess file to access your site.

  1. Access File Manager through your hosting control panel.
  2. Select the .htaccess file, right-click it and hit the Rename button. If you can not find the .htaccess file, try the following tutorial.
  3. Rename .htaccess to any other name, for example .htaccess1
  4. Access your domain, and check if your website is working.

If the site is working, you can try to re-check the .htaccess file. To check click the Edit button. If you are unsure how to do this, try using the default .htaccess configuration:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] </IfModule>
# END WordPress

.htaccess and paste the rules on. When done, rename .htaccess1 to .htaccess. If your WordPress website works with the default rules, that is the error caused by incorrect .htaccess file configuration.

IMPORTANT: Because your website may not work because of this change, you must always back up the original .htaccess file before making any changes. Also, if you choose to make the default configuration, some permalinks, plugins and configurations will not work.