0

I have multiple Wordpress installations hosted at Hostinger.

Sometimes, when I save a post or, as happened right now, just tried to access wp-admin, it redirects me to HTTPS version of the website.

It happens randomly with all my websites, I just type in the address again and it works normally.

It's a strange bug, my settings are set to HTTP, I don't know much else to say. Anyone got any ideas to debug this?

Thanks a lot!

  • Do you have "HTTPS Everywhere" or similar in your browser? – Patrik Alienus Dec 15 '16 at 14:54
  • No, I tried it on my phone (3G), my sister's computer, my laptop and my PC - all gave the same error, even in fresh websites I tested in Hostinger - it's server side – Lucas Bustamante Dec 15 '16 at 19:06
  • Yes it does seem like a server-side error. – Patrik Alienus Dec 16 '16 at 7:24
  • I’m just going to say it: “Add https to your site!!! It’s easy. Visit letsencrypt.org.” If your host doesn’t offer https for free, do it yourself! – Nathan Powell May 31 '18 at 5:29
0

Finally, after MONTHS I was able to solve it.

Just add

$_SERVER['REQUEST_SCHEME'] = 'http';
$_SERVER['SERVER_PORT'] = 80;

To wp-config.php, preferably before calling wp-settings.php

Thanks to Daan Meijer for this.

PS: It was a server-side error, probably something to do with PHP process manager such as php-fpm or mod_php. The hosting company solved it without the need for the hack above.

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.