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.

  • Which browser, which version, and how exactly is the local URL you access the site with?
    – leymannx
    Dec 21, 2017 at 20:35
  • Also: Did you try different browsers?
    – leymannx
    Dec 21, 2017 at 20:36
  • You can go to the db and update the site in the options table to first remove https, then investigate options to simulate a cert locally, some simple steps to follow here, but only on your local machine: really-simple-ssl.com/knowledge-base/… Dec 20, 2018 at 20:45
  • I tried all the above; nothing workden. In my case some plugin was probably causing this. Only when i disabled the complete Plugin folder (by renaming it to 0_Plugins) the site came up. Now I have to manually figure out which of the plugins was causing this. Thanks for the other tips.
    – Herbalizer
    Dec 17, 2020 at 13:15

5 Answers 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!


Make sure you don't have installed and activated a plugin that forces a redirection to HTTPS, for example, the Really Simple SSL. If you have one, deactivate it on the localhost by renaming the plugin folder name, e.g. rename it from "really-simple-ssl" to "really-simple-ssl_deactivated". Now you should be able to access your wp-admin URL.


Well, if you can access /wp-admin/, the solution is pretty simple - clean your browser cache or try to open your website in incognito tab.

  • Sorry. I should've stated that I tried the things you mentioned, still not working out.
    – popeye
    Nov 12, 2017 at 15:39
  • Did you make all database replacements? Nov 12, 2017 at 15:42
  • for that I thought Duplicator takes care of though I checked the wp_options table if registered url is on https, but no it's on http. any other table i should be checking into?
    – popeye
    Nov 12, 2017 at 15:45
  • Of course, I recommend yo use this tool to generate all database queries for your phpMyAdmin rudrastyh.com/tools/sql-queries-generator Nov 12, 2017 at 15:46

You should comment out these lines in .htaccess file

#RewriteCond %{ENV:HTTPS} !=on
#RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  • Please edit your answer, and add an explanation: why could that solve the problem?
    – fuxia
    Oct 2, 2018 at 23:08

You can easily do it with wp cli.

  1. Install wp-cli using the instruction here
  2. run wp plugin deactivate really-simple-ssl from terminal.

You can also add autocomplete to your bash terminal so you can easily see suggestion of plugins you have installed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.