I have written a custom WordPress plugin for a certain site (this is not a public plugin, it is private written for that specific site).
The plugin reads RSS entries from other sites, and then for each RSS entry, it goes to the specific url in the RSS entry, and donwloads more information from that page.
This process runs on request. Meaning, there is a 'run' button, and when this button is clicked, the process above starts; and it stops when all the RSS entries are read.
Everything works just fine. But sometimes during the run of the process described above, I get an infinite redirect loop error. I am not sure what is causing it. The error stays for about half an hour or an hour. What happens is whenever I go to my site site (while the process is running and when the error happened), I get the message: This webpage has a redirect loop. I cannot go to any webpage on the site, nor I can login to the admin area.
I noticed one weird thing as well. My WordPress site is setup in a subdirectory. In other words, if my domain was www.example.com, my WordPress files are located at www.example.com/subfolder as a security measure. But when I try to go to www.example.com and when the redirect error happened, the URL changes to www.example.com/wp-admin/install.php (it is even bypassing the subfolder setup, it should have been pointing to www.example.com/subfolder/wp-admin/install.php instead).
This whole thing clears automatically about half an hour or one hour later and the site would work normally! Now, I do not like this. I do not want this to even happen in the first place. Do you have an idea of why is this happeneing? And do you have an idea on how to fix this? Thanks a lot.