Css/Js missing on Wordpress local site hosted with Valet Plus
I've tried sharing a locally installed Wordpress site with Valet Plus, the site loads but no assets are getting imported. All Css/Js come up Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure script '<URL>'. This request has been blocked; the content must be served over HTTPS. If I use expose share https:// the valet server can't find the site on :443?
This is an issue with wordpress, since wordpress tries to request all assets from the configured url.
@iamlasse Is your site available locally via https? eg https://mylocalurl.test? If not, expose is likely serving your site at https://something.sharedwithexpose.com but the resource links inside the HTML will be to http, and your browser will throw the "Mixed Content" warning. Wordpress is going to need to build the HTML with all links being generated with https://something.sharedwithexpose.com/* instead of http://mylocalurl.test/*.
Of course I could be completely off base :)
Yes I’m using valet plus and have done valet secure “mysite” on the site in question. But when trying to use https expose appends Port 440 on the url Which valet doesnt seem to recognize. And when i run regular expose then i get the mixed content http https issue.
Port 440 is odd — you don't mean 443?
It is not a good fit for WordPress because WordPress uses Absolute Paths. If you want to use then make 2 different database one is for local development environment and another is for this expose. While making database for expose then replace all local paths to expose path on database.
Closing this issue because it's old 🙈