Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix cases where $_SERVER['HTTP_HOST'] is used inside wp-config.php #730
Defining certain constants to be domain-agnostic is a sufficiently common practice to warrant consideration.
For example, the config file in markjaquith/WordPress-Skeleton has the following line:
If you run
Several workarounds were discussed in #676 (comment).
We already try to guess the URL by doing some ugly wp-config.php parsing via regular expressions.
A more reliable way would be to do a database query: