Yesterday, a site I was helping with had an issue where requests were erroring out with a browser message saying there were too many redirects or an infinite redirect loop. The site had been working for months, and no one could recall making any changes to the site since the last known working state.
The TL;DR and reason I’m writing this is give myself a quick list to check in future:
- Rename
.htaccess
file to confirm no issues there - Rename
plugins
folder to confirm no plugin issues. - Rename
themes
folder to confirm no theme issues. - Check in
wp-config.php
or in db_options
table to verify correct site URLs - Create a test HTML file and test navigating directly to it
- Create a test PHP file and test navigating directly to it
- Try to recall subpages that existed on the site, and navigate directly to them
In my case yesterday, I tried 1-6 above, and then figured it might be a cacheing problem. I turned off all the caching I could find on my host, and still didn’t get any change.
I connected with their chat support, and their first thought was that I had the wrong IP configured in DNS. Even though it had been working, I updated the IP address and waited for that to propagate, but still no change. Then we restored db and files from 2-week old backups, but still no change.
Eventually, chat support escalated the issue, and around the same time I tried #7 above, and noticed subpages worked. So I logged in to the WP dashboard and changed the site homepage to a different page, saved, and then changed the homepage back to the correct homepage and saved again.
Either that worked, or the escalated tech support made a change at the same time the fixed the issue.