There was a similar post to this, however the solution did not work for me.
I am having some difficulty logging into my WordPress site. When I attempt to visit example/wp-admin, I see the login page as per usual, however, once I enter my login details, the page essentially reloads and the url changes to:
.php?redirect_to=http%3A%2F%2Fmysite%2Fwp-admin%2F&reauth=1
This is a loop which I cant pass beyond. The front end of the website seems to be working as per usual. Visiting example/wp-login.php and entering my login details has the same behaviour as listed above.
I have confirmed this is not a problem with anything on my local machine as the behaviour persists across multiple browsers, devices and networks.
As suggested by others, I went into PhpMyAdmin > wp_usermeta > and deleted the meta_value for session_token. This did not fix the issue.
I turned on DEBUG and was provided with the following items when loading example/wp-login.php:
Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/wp-includes/wp-db.php:1308) in /home//public_html/wp-login.php on line 425
Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/wp-includes/wp-db.php:1308) in /home//public_html/wp-login.php on line 438
I have found numerous forum posts about the issue but none offer a satisfactory solution.
Please help as I urgently need to update content on the site.
There was a similar post to this, however the solution did not work for me.
I am having some difficulty logging into my WordPress site. When I attempt to visit example.com/wp-admin, I see the login page as per usual, however, once I enter my login details, the page essentially reloads and the url changes to:
http://example.com/wp-login.php?redirect_to=http%3A%2F%2Fmysite.com%2Fwp-admin%2F&reauth=1
This is a loop which I cant pass beyond. The front end of the website seems to be working as per usual. Visiting example.com/wp-login.php and entering my login details has the same behaviour as listed above.
I have confirmed this is not a problem with anything on my local machine as the behaviour persists across multiple browsers, devices and networks.
As suggested by others, I went into PhpMyAdmin > wp_usermeta > and deleted the meta_value for session_token. This did not fix the issue.
I turned on DEBUG and was provided with the following items when loading example.com/wp-login.php:
Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/wp-includes/wp-db.php:1308) in /home//public_html/wp-login.php on line 425
Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/wp-includes/wp-db.php:1308) in /home//public_html/wp-login.php on line 438
I have found numerous forum posts about the issue but none offer a satisfactory solution.
Please help as I urgently need to update content on the site.
For me, the solution to this WordPress Login loop problem was in the database.So step one is to login to the database. I just used PhpMyAdmin for this.Once logged, find your WordPress table, and navigate to the wp_options table.
There are two fields in this table that could be the culprit to your WordPress Login page looping problem.
Ensure that the URL given in both of these two fields is set to what you expect it to be.(same URL) Change the value and you should be all set to go.
My solution was add more disk space to my server. It causes wordpress to redirect at the login.
For me, the redirect loop started when I switched to HTTPS from HTTP. The solution was to add this line to the wp-config.php
file:
$_SERVER["HTTPS"] = "on";
WordPress depends on a variable, $_SERVER[“HTTPS”]
to check if it is on SSL. As a consequence, when this variable is not set and SSL is forced, WordPress tries to redirect back to http. This causes the redirect loop.
"Headers already sent" errors are frequently caused by plugin conflicts. Since you have access to phpMyAdmin, you could try emptying the active_plugins
data from the options
table. (But first I would copy and save the option_value
elsewhere for resetting it if it doesn't help.)
I had similar problem with getting into admin area of a wordpress site. My problem was solved by downgrading PHP version on my webserver from 7 to 5. Some plugins could not work properly under PHP 7. So after downgrading I deactivated all of them and upgraded PHP to 7 and it was working.
I had the same problem. In my case the mysql database wasn't renewed and it wouldn't be possible to write in it.
I discovered it watching at the log error of the server, where I found lots of errors like: WordPress database error INSERT,UPDATE command denied to user '<MYUSER>'@'<MYDBHOST>' for table '<MYPREFIX>_options'
My solution was similaro to @Marco Panichi's - I didn't realise my database went over the size limit. Fixed this is the hosting panel and the problem was gone. Ironically, the size limit e-mail from my hosting company went to spam :)
Check file permissions on wp-login.php
and/or /wp-admin
I went through all the suggestions made in various articles and threads, but made no progress.
Inspecting the server log, I saw hints about file permissions during my attempts to login to WordPress. So in FTP, I inspected permissions on various key files.
The folder /wp-admin
had permissions set to 775
, and simply changing it to the more secure 755
fixed my login issue.
How did the original permissions come to be, I can only guess I did something custom months ago during local development, and forgot to revert the change. In any case, this is a reminder to scrub through and do a permissions/security assessment on the whole WordPress installation.
This can sometimes be caused by wp-super-cache plugin....in combination with really-simple-SSL plugin.
Solution: in wp-config.php change:
define('WP_CACHE', true);* to *define('WP_CACHE', false);
It's funny because seems anyone resolved with a different solution.
Mine is this: practically seems the login HAPPENS BUT WP keeps to redirect you to the login page. Crazy...
So I tried this: https://wordpress.org/support/topic/login-loop-on-aruba-softaculous/#post-11211949
In my case:
1) I browsed to https://my-url/wp-admin 2) WordPress redirected me to the login page with a long redirected URL. I inserted my login details 3) WP redirected me AGAIN in the login page 4) I DELETED the part of URL after wp-login in address bar and loaded the so shortened URL 5) Magically WP brought me in the admin dashboard...
See if helps
If your wordpress is behind a proxy, causing infinite redirects to https
, you may need to tell wordpress that https is actually on:
// wp-config.php
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
$_SERVER['HTTPS'] = 'on';
}
In my case what happens is that my database is so large (big site...) that when I use a staging site and basically, duplicate my database I run out of database storage. It therefore can't write to it anymore. In my case I not only had to remove the stating site, but also had to fix the database (in cPanel there is an option).
1.340 / 5.000 I had the same page redirection problem, when I went to a page address of my own with images and photographs, I was immediately redirected to a tourist village page. I immediately called the host where I keep my site but he didn't have this problem, I asked him to check for viruses, and to throw away the site and put a backup, but I always had the problem, I called several friends and no one had this problem, everyone could see my site online perfectly, only I couldn't see it, so I thought about the home internet line, I called the manager who checked the entire line but there were no problems they were, I changed the router, but I still had the problem, I couldn't see my page. So I called a Mac technician who after about an hour told me that the problem could be in the Mac OS system and that I had to reinstall it. This afternoon I remembered that in Mac there is a Utilities folder and inside there is a utility that checks the entire system and if there is something wrong it fixes it, so I tried....and you won't believe it now everything works perfectly, I don't know what the problem was but before calling or thinking that the problem is this or that, pass SOS UTILITY DISK clearly if you have a Macintosh
Check if there's a line break (an enter) in your siteurl or home entries in the wp_options table. Wasted me a couple hours.