“wordpress redirect too many times" is a type of WordPressCommon Errors(math.) genusUsually by plug-insmaybeIncorrect settings cause. This is one of the most common errors our readers and other WordPress users encounter.
This error mayCan cause administrators to be unable to access their own websites, so fixing it may be a bit tricky. But don't worry, we've already troubleshot and fixed it multiple times"Too many redirects" issue and therefore know very well what to do about it.
![图片[1]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216102318200-image.png)
What causes the "Too many redirects" error in WordPress?
"wordpress The "Too many redirects" error is caused by improperly configured redirects in WordPress.
When choosing a product to usewordpress As you may have previously known, WordPress has an SEO-friendly URL structure feature that relies on redirection functionality. Similarly, many popular WordPress plugins utilize this feature to set up temporary redirects, createPermanent 301 redirectsas well asFix 404 errors. Details of how to do this can be found in the articleThe Complete Guide to WordPress 301 Redirects: Best Practices for Fixing Dead Links and Improving User ExperienceThe
If certain plug-ins are being used toFix SSL insecurityContent issues, or the use of WordPress caching plugins that may affect the redirection settings, resulting in "Too many redirects"Error.
Here's what the "ERR_TOO_MANY_REDIRECTS" error looks like in Google Chrome:
![图片[2]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216094344280-image.png)
Too many redirects error in Google Chrome
However, this error doesn't tell you exactly what triggered the conflict that caused the redirection loop in WordPress.
In Firefox, this error is displayed as "This page could not be redirected correctly".
![图片[3]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216094356216-image.png)
Too many redirects error in Firefox
With that in mind, let's take a look at how to fix the "too many redirects" error in WordPress.
We'll walk you through a step-by-step process to troubleshoot the issue, regain access to your WordPress site, and prevent this error from happening again.
1. Clear your browser's cookies and cache
A common cause of this error may be a cookie in your web browser. try visiting the site using another browser such as Firefox, Safari, Opera or Microsoft Edge.
If the website can be accessed normally through other browsers, then you need to clear the cookies and cache in your favorite browser.
![图片[4]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216094741928-image.png)
Clearing Cookies and Cache in Google Chrome
We provide a detailed guide on how toClear Browser CacheYou can refer to it.
2. Disable all WordPress plugins.
The most common cause of WordPress redirection loops or "ERR_TOO_MANY_REDIRECTS" errors is plugin conflicts. This error can be triggered when a WordPress plugin tries to set up a redirect that conflicts with the default WordPress redirect.
To resolve this issue, disable all WordPress plugins on your website. Usually, this can be done by going directly to the WordPress admin backend in the Plugins " Installed Plugins page and disable the plugin from there.
![图片[5]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216095128544-image.png)
Disable all plug-ins
However, administrators may not be able to access the WordPress admin backend due to redirection errors.
In this case, it is necessary to use an FTP client (e.g. FileZilla) or aMainframe Control Panel(e.g. Pagoda) in the File Manager to disable the WordPress plugin.
1. Use an FTP client to connect to the site, go to /wp-content/ Folder.
![图片[6]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216095144171-image.png)
2. Finding plugins folder and rename it to plugins.deactivateThe
![图片[7]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216095155176-image.png)
Rename plugin folder via FTP
After renaming, all WordPress plugins on the site will be disabled.
Renamed plugin folders
WordPress will automatically find the file named plugins folder to load the plugin files. If that folder is not found, WordPress will automatically disable all activated plugins in the database.
Now, try visiting the website. If you can successfully log into the WordPress admin backend, it means that a plugin is the cause of the error.
Next, you need to use the FTP client or file manager again to set the plugins.deactivate rename a folder back to pluginsThe
Then, go to the WordPress admin backend of the Plugins " Installed Plugins page, activate the plugins one by one and visit the site to check if the error reappears.
Once you find the plugin that is causing the error, you can look for a replacement plugin with the least amount of trouble.
3. Fix WordPress URLs
Another major cause of this error is a misconfiguration in the WordPress URL settings. Typically, this can be configured in the Settings " General page to view these options.
WordPress URL Settings
For most websites, theWordPress Address respond in singing site address The URL should be the same in both fields. However, some users may use a URL with "www" in one field and a URL without "www" in the other.
![图片[8]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216100019849-image.png)
Since administrators may not have access to the WordPress admin backend, you will need to fix the WordPress URL through an FTP client or file manager.
1. Connect to the site using an FTP client and go to the /wp-content/themes/your-theme-folder/ Folder.
![图片[9]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216100714375-image.png)
2. Finding functions.php file and edit it using a text editor such as Notepad or TextEdit.
Edit the functions.php file
Add the following code at the bottom of the file:
phpCopy codeupdate_option( 'siteurl', 'https://example.com' );
update_option( 'home', 'https://example.com' );
Don't forget to put 'https://example.com'
Replace it with the URL of your own website.
Save the changes and upload the file back to the website.
Then, refresh to try to access the site and see if the error has been resolved.
4. Reset WordPress .htaccess file
.htaccess file is a special file through which the web server manages redirects and other server settings.WordPress also uses this file to implement the SEO Friendly URLs and other redirects.
Sometimes, WordPress plugins can have a negative effect on a site's .htaccess file to make changes that would trigger this error. Even if the plugin is disabled, these changes may not be made from the .htaccess Removed from the file.
In this case, you'll need to manually reset WordPress' .htaccess Documentation.
It is necessary to access your website using an FTP client or a file manager in your hosting control panel. After connecting, you will see in the root directory of your website .htaccess Documentation.
![图片[10]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216101814690-image.png)
Editing .htaccess files via FTP
1. First, the .htaccess filecopy to download to your computer as a backup.
2. The file was then deleted from the website.
Now, try visiting the WordPress website. If everything works, it means that .htaccess file is the cause of the redirection error.
As a result of the deletion of the .htaccess file and now need to recreate it. Normally, WordPress will automatically regenerate this file. To make sure it's generated correctly, just go to the Settings " Fixed Links page, then click on the bottom of the page Save Changes Button.
Refresh fixed links to create .htaccess files
![图片[11]-如何修复WordPress“重定向次数过多”错误:完整指南](https://www.361sale.com/wp-content/uploads/2024/12/20241216101820313-image.png)
Preventing WordPress from Getting "Too Many Redirects" Errors
Hopefully, the above steps have resolved the redirection issue on your website. If the issue is still not resolved, then it may be necessary to contact your WordPress hosting provider to confirm if there is a server issue.
Once the hosting provider fixes the problem on the website, it can also be used to figure out the exact cause of the error.
- If the problem is caused by a plugin, consider looking for an alternative plugin with similar functionality.
- If the problem is due to a WordPress site configuration error, document the issue and ensure that the site settings have been properly configured.
I hope this article will help you to solve the "too many redirects" error on your website.
Link to this article:https://www.361sale.com/en/30492The article is copyrighted and must be reproduced with attribution.
No comments