0
votes

While editing or writing a new post, sometimes I get redirected to the following address: https://www.examplesite.com/wp-login.php?redirect_to=https://www.examplesite.com/wp-admin/edit.php&reauth=1

Even though i wasn't navigating using https. We don't have an SSL certificate for our domain, so we get the following warning message: "There is a problem with this website’s security certificate."

I have around 30 wordpress websites hosted on Hostinger, and all of them gives this issue.

Any idea what causes it? I've seen a temporary solution might be adding

$_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'];

To wp-config.php, but I'm looking for a permanent solution, and the root of the problem...

1

1 Answers

0
votes

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.