Closed flexseth closed 4 months ago
Possibly the reason:
wp-now does not support custom domains or SSL (yet!);
Via
Sounds like a wp-now
issue – I'd report that in the https://github.com/WordPress/playground-tools/ repo.
Is there a chance you can transfer it over there? I'm going to play around a bit more with the local enviro and blueprints, just getting started...
Ah! I see why I reported it here - common errors users may run into.
added it to the Issues
page in the sheet
Should this be left as a duplicate?
Defining Custom URLs
Here is an example of a Blueprint that defines custom URL constant. wp-now will automatically detect the blueprint and execute it after starting the server. In consequence, the site will be available at http://myurl.wpnow. Make sure myurl.wpnow is added to your hosts file.
I started using the wp-now
package without reading the docs. ...
Guess it's not a bad way to start if you're looking to create errors, though :)
Issue most likely resolved with updated my local hosts file
wp-now does not support custom domains? - Laravel Valet
Updating hosts for local development is a bit of a "gotcha" - especially for new users (and apparently seasoned ones as well). Create a docs page showing how to update hosts
to support custom domains
Create a docs page showing how to update hosts to support custom domains
This should definitely be mentioned, however, I'd recommend against including these instructions in the Playground docs (for maintenance and scope reasons). It'll be easier to link to reliable sources instead.
I'd recommend against including these instructions in the Playground docs
Here's my updates to the docs so far...
Updating the hosts
file is a common "Gotcha" when working with local hosts. Software like Local
does this automatically, but wp-now
doesn't, at least out of the box.
The topic does have a large scope, but is directly relevant to how wp-now
works behind the scenes with Playground. On a bigger level it has a lot to do with how local development works, but we don't have to get into all of that...
I think it's important that users know how to fix the issue as they will probably run into it as a "Gotcha" ... they don't really need to know how domain routing works in depth.
For new users we're trying to lower the barrier to entry as much as possible. If the Playground boots up and they are seeing errors or behavior that is unexpected, I'd like to round out those cases as much as possible. Until support is there for automatically updating the hosts
file I'd like to keep this as a consideration from a docs standpoint :)
hosts
file@ironnysh - If you'd like to pick up on this piece of the docs, that would be awesome!
Hey @flexseth, the second option (add "a blueprint example that works out of the box") is the way to go.
Updating the
hosts
file is a common "Gotcha" when working with local hosts
It might be, but then again, it's mixing two audiences: How many new users would actually run into this issue?
they will probably run into it as a "Gotcha"
Only if they decide to try the advanced scenarios demonstrated in this section. But what are the odds that this group of people would even "bother" with that? I mean, if you include a whole standalone section on how to update the hosts
file to support custom domains, you'd to explain IP addresses, DNS, ports, SSL, user privileges, how to access/unhide ~/.wp-now
(and ngrok
, for that matter).
For those who are both new to local development AND are curious enough to experiment, my suggestion was (and still is 😀) the same: Definitely mention it, but link to reliable sources that explain how to do it on different OSs; it's a huge topic and there's no reason to recreate it on Playground's docs.
It might be, but then again, it's mixing two audiences: How many new users would actually run into this issue
When we were thinking about the documentation, the thought was to lean towards developer use cases. The thought being, if devs get involved, it will provide value to end-users.
I mean, if you include a whole standalone section on how to update the hosts file
We can probably just provide a simple doc on how to update for local dev. The primary use case is for having a user to be able to create a blueprint that has localdomain.com
preview-able in their web browser. It's all from localhost, in order to do this the hosts
file needs to be spoofed into thinking this is the correct URL for the website.
It's possible that some of the site settings aren't working correctly when installing via a blueprint.
Certainly a consideration and also the focus of the issue..
The goal of raising the issue was to streamline local DNS access via the Playground Tools... other local dev platforms such as Local and Kinsta - even major hosts like Pantheon have a tool that rolls a local development environment that is pre-configured with DNS routing.
What's the easiest way to streamline this experience for users of the Playground?
Hey @flexseth, l feel like this discussion is going in a loop :-)) We’re basically agreeing that there are two things to do:
wp-now
docs that uses localhost
.The question is how to go about the latter: link to external information or write internal documentation. I vote for linking.
the thought was to lean towards developer use cases
That’s cool, no argument there. But you mentioned a use case that focuses on entry-level/new users, which probably wouldn’t run into this situation. It’s not like you must use wp-now
with a custom domain.
provide a simple doc on how to update for local dev.
This type of doc can’t be “simple” without being useless. That’s why I advised against it, suggesting to provide links to reliable external resources.
The primary use case is for having a user to be able to create a blueprint that has
localdomain.com
preview-able in their web browser.
Using a custom domain configured to work locally with localhost
is another, more advanced use case, which requires a bit more thought about the best way to approach it in the documentation.
We shouldn’t mix these two audiences together.
It's possible that some of the site settings aren't working correctly when installing via a blueprint. Certainly a consideration and also the focus of the issue..
Sorry, not sure how that’s related :-)
other local dev platforms such as Local and Kinsta - even major hosts like Pantheon have a tool that rolls a local development environment that is pre-configured with DNS routing.
I wouldn’t compare wp-now
to these GUI apps. wp-env
is a better example, which also doesn’t involve local virtual hosts, SSL certificates, and resolving DNS.
The goal of raising the issue was to streamline local DNS access via the Playground Tools...
Again, it depends on the use case/persona you’re targeting, and can be handled in a few ways (based on the scenario). In any case, recreating this huge knowledge base in Playground’s documentation site seems like a bad idea.
see below...
closing in favor of offering a challenge to @ironnysh
Launched from folder for
new-playground1
Blueprint
Command
wp-now start --blueprint=blueprint.json --port=8885
Output