$_SERVER[‘HTTP_HOST’] is undefined when access site via WP CLI
-
Hi
I posted the long version of this issue here https://github.com/wp-cli/wp-cli/issues/4063#issue-227712017
It looks like
$_SERVER['HTTP_HOST']is not set in the newwp_rest_api_force_ssl()function when accessing the site via the WP CLI.This is causing the redirect to fail and for WP CLI commands to fail.
Can you prevent the redirect when the page is being accessed via the command line? I think you can use
php_sapi_name()for that.Thanks
Eric
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘$_SERVER[‘HTTP_HOST’] is undefined when access site via WP CLI’ is closed to new replies.