I am having issues with my wordpress website. I can't login in at all. When I try to goto wp-admin I get a 404 page not found error and it redirects to wp-login.php (wp-login.php?redirect_to=https%3A%2F%2Fmycrazywebsite.com%2Fwp-admin%2F&reauth=1)
When I goto just wp-login.php I get an error saying redirected you too many times.
I have tried the following:
Clearing my cookies - Did not work
I checked my siteurl and home in wp-options in my database - Both are correct.
Added the following code to wp-config.php:
define('WP_HOME' , 'https://foo.com'); define('WP_SITEURL' , 'https://foo.com');
Removed my .htaccess file
Added the following code to wp-config.php
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
None of them worked...Please help I have been struggling with this for days? Would it effect my site if I replace my wp-admin with a fresh one?