Customize Studio site URL - #755
Conversation
|
Nice approach @sejas ! What if we added some affordance to help the user to set up the host? It could be another field below that auto-generates based on the first field value:
I know it's a draft, but I gave it an early test. I changed my site's URL to |
|
Nice! I’m glad we're adding this. 🙌 I agree with @wojtek that we should add some help content under the field if we’re not able to update the hosts files for users at this stage. Perhaps we could tailor the instructions based on whether the user is running on Windows, Mac, or Linux so they don’t have to exist Studio and read a help doc. I’d love to add this field to the site creation form too. We should wait until we can automatically update the users hosts file before doing that though. Needing to do that manually will catch a lot of people out, even if we present instructions on how to do it. |
|
Thanks for chiming in!
Some users may already know how to do that or use a tool like SwitchHosts. Also, there are multiple ways to do those in both systems, and those can change over time, so I think it would be more manageable to provide a line they should add, a point to docs for detailed instructions which we could update always when needed. |
|
Let’s see where this investigation leads. My primary goal is to enable the use of tools like ngrok to activate plugins online such as Jetpack, rather than focusing specifically on custom domains. For custom domains it would be great to solve the problem of multiple sites running in the same port. Thanks for the feedback! I'll add that information in the settings tab 👌. |
|
@matt-west , @wojtekn , here is what we can currently achieve with this PR: RL4BnA.mov |
|
@wojtekn , @matt-west , Could I get some help with the design and feature?
|
|
@sejas, what if we go with the following changes:
It's still not ideal, but I think it shows the intentions clearer. |
…absolute-site-url
…absolute-site-url
…absolute-site-url
|
We've reviewed the state with @sejas and identified one more change we would make at this point:
We will also need:
|
|
@wojtekn , changed!
|
ivan-ottinger
left a comment
There was a problem hiding this comment.
Very nice! This a great feature/setting addition! The proposed changes look good and work as expected. 👌🏼🙂
I haven't tested with Ngrok yet, but would like to share a couple ideas that came to my mind while testing and reviewing the PR with localhost domain already:
Have we considered adding automatic search/replace for the site's content - to replace all old URLs in the content with the new one?
Alternatively, we could consider adding one more checkbox to let the user decide whether they would like to have their site content updated as well. If not, we could consider adding short sentence to the modal, e.g. "Please note that this changes the site URL only. URLs in the site database will be unaffected."
I think we could consider preventing the user from updating the site URL to an address that includes unexpected characters. At the moment, it is possible to update the URL to something like http://localhost23423FF9o£$@£$@£$ for instance and then the site doesn't load of course.
I left one minor comment below as well.
| <span className="text-a8c-gray-50 text-xs"> | ||
| { createInterpolateElement( | ||
| __( | ||
| "If you're using a TLD other than .localhost, you may need to update your hosts file. <button>Learn more.</button>" |
There was a problem hiding this comment.
When it comes to the user-facing documentation section that will be linked to from this Learn more link, is this something we are planning to add before the release?
There was a problem hiding this comment.
Yes, we will have a section there and will update the link to the correct one before we release Studio.
Let's leave those to users for now, and we will cover that in the documentation, too. |
|
Closing in favor of #936 |


Related issues
Proposed Changes
Testing Instructions
Localhost domain
whatever.localhostand leave the checkbox uncheckedTunneling with Ngrok
ngrok http 8885where 8885 is the port of the site that you want to expose to internetstudio-jetpack.mp4
Note
The warning about
dns_get_recordis returned by Playground WASM on purpose. See https://github.com/Automattic/dotcom-forge/issues/10427Pre-merge Checklist