Why is WordPress redirecting from http to https on a local environment?

Well, at my situation… I downloaded the company website from production to localhost because I was needed to prepare a development environment for some developers. The production is using https:// and at localhost http://, and when I ran it the first time on localhost, it always redirected me to the https://.

And, I have managed to made this working on my localhost simply by adding the following lines in the wp-config.php (my wp version was 4.9.8):

define('FORCE_SSL', false);
define('FORCE_SSL_ADMIN', false);

Good luck!

Leave a Comment