Home > database >  Can't access wp-admin page, getting ERR_TOO_MANY_REDIRECTIONS (Tried everything!)
Can't access wp-admin page, getting ERR_TOO_MANY_REDIRECTIONS (Tried everything!)

Time:02-13

So the site was working fine just last week. Today I tried to access the wp-admin page to log in and after slow loading, for a bit, I get an error saying it was redirecting too many times and failed. After lots of research, I tried every method the other articles suggested but nothing worked.

Here is what I tried:

  1. Cleared out my cookies, and cache

  2. Tried other laptops & phones

  3. Used a VPN to see if it was my ISP somehow

  4. Disabled all plugins by renaming the plugins folder

  5. Disabled the theme by renaming the themes folder

  6. Deleted .htaccess file but all that did was cause the wp-admin page to display a 403 Forbidden page. After loading the normal site (aka: mysite.com) the .htaccess got regenerated and I was back at square one.

  7. Added this code to wp-config.php as per this link https://wordpress.stackexchange.com/questions/302965/too-many-redirects-only-when-trying-to-access-wp-admin-page (Tried at the top of the file and the end).

    if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
      $_SERVER['HTTPS']='on';
    
  8. Tried to define WP_HOME and WP_SITEURL in wp-config.php

None of the above worked and none fixed it. Please note only the wp-admin page has this issue. The site itself loads but I can't access the admin page which is a disaster and I don't know what to do. I hope one of you can help me. Thanks!

CodePudding user response:

For anyone who might be facing this issue, the culprit was the .htaccess file under the wp-admin folder. It had a Deny from all written in it which blocked access to everything. Not sure what added it since I definitely did not. When I changed it to Allow from all it worked fine.

  • Related