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

4 Answers 4


I 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

  • "restored the proper data" ...? Oct 21, 2018 at 10:38

Check if constants, enforcing SSL are defined:


See Administration over SSL in Codex for details.

  • It's not. The only place in the code where I see that is in default-constants.php. The only other thing I have noticed recently is that our database server ran out of disk space. Could that cause an issue like this? Dec 1, 2010 at 14:28

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.com 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!


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.