I recently restored a WP multi-site 3.0.1 database from production to a staging environment, and when I try to login, I am being redirected to an HTTPS URL. The browser complains that the certificate is bad, and then when I click "proceed", it says page not found. I have cleared my browser cookies and all that good stuff, but it still won't let me login.
Also, I am experiencing intermittent "No site defined on this host" errors when I try to login.
I've never seen this issue before, and I have definitely done this backup db restore process before.
Thanks for your help, Dave
I recently restored a WP multi-site 3.0.1 database from production to a staging environment, and when I try to login, I am being redirected to an HTTPS URL. The browser complains that the certificate is bad, and then when I click "proceed", it says page not found. I have cleared my browser cookies and all that good stuff, but it still won't let me login.
Also, I am experiencing intermittent "No site defined on this host" errors when I try to login.
I've never seen this issue before, and I have definitely done this backup db restore process before.
Thanks for your help, Dave
Share Improve this question asked Dec 1, 2010 at 5:43 Dave MorrisDave Morris 8014 gold badges10 silver badges16 bronze badges4 Answers
Reset to default 2I figured this one out finally. It turns out that the data in the wp_usermeta table for user_id=1 (admin) was corrupted. This was apparently causing the SSL redirect issue when trying to login to any domains.
Once I restored the proper data for user_id=1 into wp_usermeta, everything worked fine. I would much rather have WordPress give an error like "hey, your usermeta data is messed up", rather than have some strange random behavior like that.
Thanks for the help, Dave
So I was having a similar problem, in that I was constantly forced to https, and just thought that I'd post here for anybody who may come across this in need of solutions, because Dave's answer (Thanks for the help, Dave) got me on the right track but not quite.
So I found out that my siteurl
and home
entries in wp_options
in the database were set as https://sitename
changing them to http did the trick.
Is this actually potentially a hassle-free and easily reversible way to set a wordpress site to force SSL usage? maybe!
Check if constants, enforcing SSL are defined:
FORCE_SSL_LOGIN
FORCE_SSL_ADMIN
See Administration over SSL in Codex for details.
I can't comment on the answer of @Rarst so I will answer here.
You have to make sure that you do not have this line
define('FORCE_SSL_ADMIN', true);
in your wp-config.php file as this will also cause this behaviour in addition to the changes that has to be made in the wp-options table if your site url is set to https.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744834399a4596176.html
评论列表(0条)