If you are using a WordPress as a submodule, PHP-FPM, and are hosting your site on WHM, you probably woke up today with and endless redirect loop when trying to login or access any .php core file directly.
ERR_TOO_MANY_REDIRECTS
This error which is affecting a massive amount of servers is coming from the “EasyApache4 October 31 update”. Within this update a new redirect was added to PHP-FPM which catches .php files and attempts to redirect them to .txt files. This was part of an attempted security change.
At the time of writing this, the team a cPanel is working on and testing a fix which I would imagine will be released soon. If you are like me and have client who need the fix like “5 hours ago”, here is how you can manually patch this for now.
First edit the 2 virtualhost files from the terminal
Each file will have a directive for php_fpm. You can find it by using the where
command quickly. Within this directive you’ll want to comment out the 3 RewriteCond
lines which should end up looking like this
Next you need to rebuild the Apache config and restart Apache
That’s it! Things will work fine while the fix is being completed by cPanel.