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

I recently set up a live WordPress site on my local environment through Duplicator. I can access the wp-admin but I cannot access the main site as wp redirects the site from http to https automatically. I checked the .htaccess, but no luck. I checked the wp_options table and it has an entry of the site with http not https. Can you tell what seems to be the problem and what files should I be looking at? Thanks.

Edit:
I cleaned the browser cache (even ran it on incognito), still no luck.

5 s
5

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