title: Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
body: <ul>
  <li><p>When I try logging in to wp-admin (or even wp-admin/index.php) I simply get redirected to my site's homepage.
  (after authenticating successfully - i.e. It DOES accept my login credentials (so its not an account, password or blacklisting issue), but simply wont go to the admin dashboard page after login)
  (I suspect it may be an infinite loop that is occurring?? - how do I find out?)</p></li>
  <li><p>But I CAN login if I go directly to the wp-login.php page, which is weird.
  (but this is not acceptable as I need users to be able to login through a custom login page again)</p></li>
  <li><p>This came about seemingly randomly
  (I hadnt changed anything in a week - just woke up one day and couldnt log in)</p></li>
  <li><p>Preceding factors:</p>
  
  <ul>
  <li>I havent moved the site at all</li>
  <li>I havent changed the domain, urls or anything</li>
  <li>no cache-ing plugins present</li>
  </ul></li>
  </ul>
  
  <p>The week before I had:
  Updated WP to 4.8
  Updated PHP from 5.4 to 5.6
  (to allow installation of an SEO plugin add-on - 'SEO framework extension manager')</p>
  
  <p>But it had been working fine for days.</p>
  
  <ul>
  <li>So to given some reporting this after PHP upgrade, I tried setting my PHP back to 5.4, but no luck.</li>
  <li>then up to 5.5, and then back up to 5.6 again - still no fix.</li>
  </ul>
  
  <p>I do also have a membership plugin that renames the login page to /login
  (But that has worked fine for years too)</p>
  
  <p>I have tried all the usual fixes for wp-admin login issues:
  - I have tried multiple browsers, and cleared their cache and cookies - no fix.
  - I have disabled every plugin one by one (via ftp folder rename) - no fix.
  - even re-updated WordPress to 4.8 again (in case any of the core files needed replacing)</p>
  
  <ul>
  <li><p>checked file and folder permission are all correct (644) via FTP - all fine - no fix.</p></li>
  <li><p>I have tried adding lines to the wp-config.php file  - with no luck
  Such as</p></li>
  </ul>
  
  <p>define('WP_HOME','<a href="https://warrenmaginn.com" rel="nofollow noreferrer">https://warrenmaginn.com</a>');</p>
  
  <p>define('WP_SITEURL',... etc.</p>
  
  <p>define('FORCE_SSL_ADMIN', true);</p>
  
  <p>define('FORCE_SSL_LOGIN', true);</p>
  
  <p>even this solution offered at kinocreative:
  @define('ADMIN_COOKIE_PATH', '/');</p>
  
  <ul>
  <li><p>when I remove the htaccess file altogether, still no fix
  (but I do actually get a 404 error page whenever I try access any other page than the root domain, when I dont have the htaccess in place)
  (which may mean something in the htaccess i needed to correctly link in my site - but my htaccess hasnt changed, and if I edit it down just to the canonical rewrites (I use SSL sitewide, and do not ever use www in any references to my domain (have checked across database etc.)</p></li>
  <li><p>I have tried inserting the text "die(<strong>FILE</strong>':'.<strong>LINE</strong>);" on every line of the wp-admin/index.php file
  (to trouble shoot it - and it stopped (without redirecting) even after placing the line all the way at the bottom of the file - so I imagine this means the issue is not in this file)</p></li>
  <li><p>Any other files I should try this in? </p></li>
  <li>Or debug modes I can use track this down?</li>
  </ul>
  
  <p>Any suggestions would be VERY appreciated
  (this is doing my head in)</p>
  
  <p>Thanks in advance for offering your wisdom...</p>