expose icon indicating copy to clipboard operation
expose copied to clipboard

Css/Js missing on Wordpress local site hosted with Valet Plus

Open iamlasse opened this issue 5 years ago • 5 comments

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?

iamlasse avatar Jun 18 '20 14:06 iamlasse

This is an issue with wordpress, since wordpress tries to request all assets from the configured url.

SamuelNitsche avatar Jun 19 '20 15:06 SamuelNitsche

@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 :)

jeff-h avatar Jun 22 '20 04:06 jeff-h

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.

iamlasse avatar Jun 22 '20 09:06 iamlasse

Port 440 is odd — you don't mean 443?

jeff-h avatar Jun 22 '20 09:06 jeff-h

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.

bjaspire avatar Jul 04 '20 14:07 bjaspire

Closing this issue because it's old 🙈

sschlein avatar Dec 21 '23 13:12 sschlein