Title: localhost using HTTPS
Last modified: January 18, 2020

---

# localhost using HTTPS

 *  [apg1912](https://wordpress.org/support/users/apg1912/)
 * (@apg1912)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/)
 * Since I first created a WordPress project on my local PC, it has run perfectly
   well as a testing site. Now, all of a sudden, resources are not being loaded 
   causing the site to fail and make testing it impossible.
 * On inspecting the site on the Console tab, I see the following:
    **Failed to 
   load resource: net::ERR_CONNECTION_REFUSED /devproject/wp-content/themes/oceanwp-
   child/assets/css/frontpage.css?ver1.3:1
 * When I hover over the file name, it is prefixed by **[https://localhost/](https://localhost/)**
   
   I’m assuming the https is the problem because localhost does not have a secure
   certificate.
 * I have entered the following URL into Chrome, and set ‘Allow invalid certificates’
   to ‘enabled’, but the problem is still unresolved.
 * c**hrome://flags/#allow-insecure-localhost**
    **Allow invalid certificates for
   resources loaded from localhost Enabled**
 * I have done extensive googling and not found a solution to this yet. Is it possible
   to force Chrome to treat localhost as an http site and so load the resources.
 * Any advice would be appreciated as I have wasted a good amount of time on this
   so far.

Viewing 7 replies - 16 through 22 (of 22 total)

[←](https://wordpress.org/support/topic/localhost-using-https/?output_format=md)
[1](https://wordpress.org/support/topic/localhost-using-https/?output_format=md)
2

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12357393)
 * [@apg1912](https://wordpress.org/support/users/apg1912/) Please do not post large
   code or responses like that here, it doesn’t work after ~10 lines or so.
 * If you need share that data please use [https://pastebin.com/](https://pastebin.com/)
   instead and post the link to that paste.
 *  Thread Starter [apg1912](https://wordpress.org/support/users/apg1912/)
 * (@apg1912)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12358895)
 * The responses generated in the log have been moderated out, but there was nothing
   there alluding to a redirect. I think this is going to have to remain a mystery
   as I’ve run out of ideas as to where to look.
 *  [astroids](https://wordpress.org/support/users/astroids/)
 * (@astroids)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12363268)
 * Long shot, but:
 * 1. Disable Woocommerce, see if that fixes it for you. If so, check the SSL setting
   in WC->Settings->Advanced
 * 2. Try using:
 * <IfModule mod_rewrite.c>
    RewriteEngine On RewriteCond %{HTTPS} on RewriteRule
   ^ [http://%](http://%){HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] RewriteBase / RewriteRule
   ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}!-
   d RewriteRule . /index.php [L] </IfModule>
 * in your .htaccess – I noticed ur one on page01 had the dir path in it.
 * 3. Install WP CLI
    [https://wpbeaches.com/install-wordpress-wp-cli-mac-osx/](https://wpbeaches.com/install-wordpress-wp-cli-mac-osx/)
   cd to your webroot, then run: wp search-replace ‘https’ ‘http’
 * Ran into a similar issue, ended up re-installing XAMPP-WM
 *  [astroids](https://wordpress.org/support/users/astroids/)
 * (@astroids)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12363274)
 * 4. activate the 2020 or 2019 WP theme, see if that fixes it. If not revert.
 * 5. Disable all plugins (with wp cli):
    cd to webroot: wp plugin deactivate –all(
   check and see if that fixed it)
 * Re-enable all plugins w/
    wp plugin activate –all
 *  Thread Starter [apg1912](https://wordpress.org/support/users/apg1912/)
 * (@apg1912)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12364201)
 * Thanks for the reply.
    1. I don’t use WooCommerce on this site. I am going to
   try disabling all plugins though, just in case…
 * 2. I’ll try that code to see if it helps.
 * 3. Didn’t know there was such a tool. I’ll definitely install it.
 * 4. I’ll try the theme idea just to rule that one out as the site requires the
   OceanWP theme.
 * 5. I was just going to edit the relevant WP table entries to do this, but I guess
   it would give me a good reason to become familiar with this tool.
 * I raised this issue on stackoverflow and as my Apache files have no apparent 
   entries to cause this, it is being suggested my app is doing it. If that is the
   case, then it must be a WP issue, possibly caused by a plugin.
 *  [astroids](https://wordpress.org/support/users/astroids/)
 * (@astroids)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12365190)
 * Yes, plugins like ithemes security and many others have a “force ssl” or similar
   option, so best to `wp plugin deactivate --all` – if that works, then `wp plugin
   activate --all` and deactivate one-by-one to isolate the offending plugin.
 *  Thread Starter [apg1912](https://wordpress.org/support/users/apg1912/)
 * (@apg1912)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12366635)
 * I re-created the project with NO plugins.
 * If I place and reference the ‘frontpage.css’ in the site’s root folder it is 
   successfully accessed. If I try and reference it from ‘wp-content/themes/oceanwp-
   child/assets/css’, I still get the refused connection message.
 * Why should a path make a difference? I have absolutely no idea!
    -  This reply was modified 6 years, 2 months ago by [apg1912](https://wordpress.org/support/users/apg1912/).
    -  This reply was modified 6 years, 2 months ago by [apg1912](https://wordpress.org/support/users/apg1912/).

Viewing 7 replies - 16 through 22 (of 22 total)

[←](https://wordpress.org/support/topic/localhost-using-https/?output_format=md)
[1](https://wordpress.org/support/topic/localhost-using-https/?output_format=md)
2

The topic ‘localhost using HTTPS’ is closed to new replies.

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 22 replies
 * 4 participants
 * Last reply from: [apg1912](https://wordpress.org/support/users/apg1912/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/localhost-using-https/page/2/#post-12366635)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
