WordPress in itself is an incredibly stable CMS to use for web development. Sometimes it can be affected by some WordPress errors that seem non-favorable for websites.
But, don’t forget that it is the world’s no.1 platform where there are numerous ways to fix WordPress errors.
For new users, any type of error can create botheration. What if they encounter “Too Many Redirects” error in WordPress? Simple, it needs to be resolved professionally without affecting the website’s content
Being a WordPress website owner or developer, you must have been irritated by numerous common WordPress issues like WordPress database error, Internal Server Error in WordPress, White Screen of Death, etc. These can be reduced or eliminated by implementing various techniques or by installing relevant WordPress plugin. But, when it comes to resolving the Too Many redirects error, there is a long list of solutions for different situations.
In this blog, you will find different sections like:
- Introduction of Too Many Redirects error
- Reasons that cause Too Many Redirects error
- Ways to Fix WordPress Errors - 404 page not found error (Too Many Redirects error)
Introduction to Too Many Redirects error:
Many of you may not be aware of the Too Many Redirects error. In our blog, you will get an extensive idea of eliminating this error from your website.
Too Many Redirects is a kind of 310 error and sometimes appears as 404 page not found error. It is a common WordPress error which occurs by setting improper URL redirects. WordPress has the function of URL redirect for all users so that they can create SEO-friendly URL structure. Almost all the webmasters use this function to redirect their old URLs to the new ones as it is mandatory to set and update a WordPress website.
If one doesn’t do it, he/she might face Too Many Redirects error frequently while running the website. This problem may also occur when someone redirects an old post or URL to other two locations. In this case, visitors are not able to access that redirected page and might encounter an error message of 404 page not found.
On Mozilla Firefox, this error message will be displayed as “The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
On Google Chrome, you might have seen this in the form of “This web page has a redirect loop”. You can see in below image.
You can also find this error by having a below-mentioned screenshot.
You must have got an idea that how you face such WordPress error. For more insights, we want to give you some specific reasons of occurring Too Many Redirects WordPress issue.
Let’s have a look at some major WordPress error reasons:
- Sometimes, you have entered the incorrect or different Home URL & Site URL.
- Improper changes made in your .htaccess file.
- You may have installed WordPress plugins with wrong configurations that redirect your pages in wrong paths.
- This error might occur when multiple websites or networks are hosted on a single IP address.
- When your site uses the URL which has deleted in the memory of WordPress.
After analyzing the reasons that can create WordPress errors, you should work on reducing or completely fixing WordPress errors like Too Many Redirects error.
Discover The Ways To Fix Too Many Redirects Error:
Prior implementing anything to fix this error, you need to log in to your desired WordPress dashboard and move to the General Settings. You need to do this in order to check whether there is something wrong with WordPress Address or Site URL or Address.
Points to remember:
Go to settings of your WordPress website
Select the General tab under settings
Check the WordPress Address and Site Address URLs
Make sure that you are adding the same prefix for the two. If not, you might face a WordPress error.
Click to save changes and exit
Now, move to the practical ways of fixing WordPress errors:
Technically, there are 3 ways to fix Too Many Redirects WordPress error. Professional WordPress developers can do it effectively as it is based on adding a few lines of code to the wp-config.php, wp-login.php and PHPMyAdmin files respectively.
Tweaking wp-login.php file
First of all, you need to open your wp-login.php file just after connecting your website with FTP client. Through the powerful cPanel (Control Panel), you need to target Files> File Manager. Now, seek the wp-login.php file form and get ready to edit it by appropriate commands. Right-click to the file to edit and insert below-mentioned command:
//FIXME: do comment/remove these hack lines. (once the database is updated) update_option(‘siteurl’, ‘http://yourwebsite.com/the/path’ ); update_option(‘home’, ‘http://yourwebsite.com/the/path’ );
Here, replace the yourwebsite.com with the one you own and save the changes to confirm settings. Keep this in mind that when you have fixed Too Many Redirects error, you need to remove the mentioned command from the wp-login.php file.
Tweaking wp-config.php file
This is the second technical method to resolve Too Many Redirects WordPress issue. This is about modifying the website’s wp-config.php file. To make changes, open this file in an editor just like you have made changes to your wp-login.php file through cPanel. Keep your file /public_html/wp-config.php and add the following lines in same format.
Similar to the previous file, change the website name to yours.
Tweaking PHPMyAdmin file
Moving to the next file modification is also considered as a valid solution to reduce or eliminate Too Many Redirects error. This is the proven way which can help you reach your target. Also, developers consider this a great tool for administration of MySQL database. Here, web owners need to go to the Databases > phpMyAdmin by logging in the cPanel. After successfully accessing the relevant interface, add the given command to the SQL and replace the website name with valid one.
UPDATE wp_options SET option_value = 'https://yourwebsite.com' WHERE option_name IN ('home', 'siteurl');
By following the aforementioned practical techniques, you can fix WordPress errors easily and effectively.
Some other course of actions to fix Too Many Redirects error:
Correcting The Settings of URL Redirect WordPress Plugin
After checking all of your WordPress internal files, the next step is to analyze the issue with your pre-installed URL Redirect plugin. These plugins allow one to create URL redirect in simple steps and with complete assurance. You can have a look at the below image depicting the process to add new website redirection.
Most of the times, developers forgot about their URL redirection and get conflicted with their URL functions. In this case, Too Many Redirects error can occur frequently. So, make sure that you’re not redirecting the previous URL again and again to the other paths.
If you are unable to find your redirection path, removing such URL redirection plugin will be the best alternative. This will delete the associated folder and cause the removal of all the plugins or the associated one.
Restoring The Website’s .htaccess File
Figure out that your website’s .htaccess file is running with some unmanageable commands. Checking this file is important because sometimes Too Many Redirects error occurs due to uneven changes in this file. Analyze the file keenly and if you don’t find any clue regarding wrong data, then restore this file with the default value. To restore:
- First copy & backup the .htaccess file
- Delete the existing version
- Log in to your WordPress dashboard and go to Settings> Permalinks
- Click on the Save Settings to get a new .htaccess file
Post saving the file to your WordPress website database, you can now check whether the error is still running or not. If you don’t find anything, you can add the data you have backed up from the previous file. But, make sure that you are adding the changes one by one so that you may come to know the reason for the particular WordPress error.
Clear Cookies & Cache
Suppose, you have made suggested changes to your files and settings and you are still getting that Too Many Redirects error message. What should you do? Now, you need to clear all your cookies and cache as sometimes changes are only seen or effective only when deleting the existing browsing details. Doing this is necessary because your browser saved a copy of your website in its memory which needs to be deleted if you want something new to be reflected.
We hope that you understand why the Too Many Redirects error occurs and how to fix them. So, don’t get panic when you encounter this type of error again and again and fix them by following the above-mentioned techniques. If you are still not able to fix these errors, you can take help of an expert or a professional web development company.
Just do it without any fear because WordPress proven ways are there!
About the Author: Williams Heilmann
Williams is an experienced WordPress developer in PSDtoWordPressExpert: PSD to WordPress Conversion Service Provider. He has years of experience in the same domain. By using his knowledge, he often tries to provide deep information to the readers who are interested in exploring topics about WordPress. This blog is one of his best and detailed copy describing WordPress errors.