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!
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!
Share Improve this question asked Jun 23, 2016 at 14:36 Lucas BustamanteLucas Bustamante 2,3481 gold badge28 silver badges43 bronze badges 4- Do you have "HTTPS Everywhere" or similar in your browser? – InanisAtheos Commented Dec 15, 2016 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 Commented Dec 15, 2016 at 19:06
- Yes it does seem like a server-side error. – InanisAtheos Commented Dec 16, 2016 at 7:24
- I’m just going to say it: “Add https to your site!!! It’s easy. Visit letsencrypt.” If your host doesn’t offer https for free, do it yourself! – Nathan Powell Commented May 31, 2018 at 5:29
1 Answer
Reset to default 1Finally, 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.