Today, I tried to load one of my local WP sites to prepare for developing a new topic, and found that none of the assets were loaded. I've checked the paths and found that they appear in the page source as expected:
However, when I clicked on the link, the protocol changed to https:
I do not have a local SSL certificate, so all elements fail: stylesheets, images, scripts, etc. The WordPress PHP templates load without problems, but everything else fails.
I have about a dozen local WP sites and this happens with three of them in the frontend and in the backend. The only connection between them is that they were the first three sites I reviewed today, but I cleared my cache and the problem persists.
What can cause a redirect only for assets to https? All my local sites have always used only http, and the broken sites worked fine today!
(One more detail: In Chrome, I can choose the option to load insecure content per domain, and this fixes the issues immediately – in Firefox, my primary browser, clicking this option will not work and I will not get past the warning screen.)
(ETA another detail: when I check the details of the certificate error, a certificate is actually loaded, but the browser does not trust that for probably obvious reasons.) I would like to fix the redirect, but would be content to get the local certificate working, if everything else fails.)
(ETA one more thing I've just discovered: One of the broken sites, in addition to redirecting to https, removes "asseturl / wp-content /" from the asset links and redirects to something like "https: // localhost / themes "continue /themename/style.css", which causes a "not found" error after setting a domain security exception, the other two do not show this behavior, which could mean that this site has a slightly different problem? )