-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp server
correct WP_HOME
value should be retrieved from $_SERVER HTTP_HOST
, not SERVER_NAME
#101
Comments
Even this is true in some cases, the value of Moreover, This is why it is usually preferred to avoid them, and rely on values like This is also why is highly suggested to manually set That said, looking at |
I agree, patching |
This issue stems a bit from #100 We could configure our local staging port values dynamically via something like |
Please check if 4c76d9d solved it. Thanks. |
I tested with latest dev build today, and something is still going wrong. Without explicitly setting
I'm serving with |
@lkraav, I think you have to pass the URL to WP CL with the WP Starter is designed to guess the URL in a web server environment. When you're on CLI, The best thing you can do is tell WP CLI which URL you want to "emulate". |
Can I close this? |
Describe the bug
If we run our web server on an alternate port, like 8080, let's say using
wp server
, then$_SERVER SERVER_NAME
will not provide the correctWP_HOME
calculation value, but$_SERVER HTTP_HOST
does.Alternatively,
$_SERVER SERVER_PORT
value maybe also has to be used inWP_HOME
auto-calculation.To Reproduce
get_theme_file_uri()
to calculate an enqueue asset URLExpected behavior
Port value recognized.
The text was updated successfully, but these errors were encountered: