Too many redirect errors ONLY on Wordpress admin panel after updating PHP

I am working on updating a site. Everything was going peachy until I updated the PHP from 5.6 to 7.0+. Once I did that, I got the "Too many redirects" error ONLY on my Wordpress admin panel. The site itself loads fine and I can get the admin panel to show back up by setting the php back to 5.6. So far I have tried:
1: Clearing browser data (Has it ever been that easy?)
2: Disabling all plugins
3: Adding:

define(‘WP_HOME’,’http://dontredirect.com’);

define(‘WP_SITEURL’,’http://dontredirect.com’);

and other variations of this code in the wp-config file. I'm wondering if anyone out there has experienced a similar issue and how they resolved it.
Thanks!

1 answer

  • answered 2021-06-18 20:51 warnakey

    Redirects are usually handled in your .htaccess file.

    It is possible that your htaccess file has some rule in it that is causing issues for you.

    Go into your FTP server, navigate to your main WordPress folder and find the htaccess file (you might have to enable the option to view hidden files. In Filezilla you do this by clicking on Server in the top menu, then clicking on Force showing hidden files.). Back up your htaccess file by downloading it, then making a copy of your file.

    Open the htaccess file you downloaded and delete everything except for this:

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    

    Let me know if that works.