{"action":"created","issue":{"url":"https://api.github.com/repos/roots/bedrock/issues/224","labels_url":"https://api.github.com/repos/roots/bedrock/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/roots/bedrock/issues/224/comments","events_url":"https://api.github.com/repos/roots/bedrock/issues/224/events","html_url":"https://github.com/roots/bedrock/issues/224","id":121891983,"number":224,"title":"Dynamically set WP_HOME and WP_SITEURL","user":{"login":"garand","id":82437,"avatar_url":"https://avatars.githubusercontent.com/u/82437?v=3","gravatar_id":"","url":"https://api.github.com/users/garand","html_url":"https://github.com/garand","followers_url":"https://api.github.com/users/garand/followers","following_url":"https://api.github.com/users/garand/following{/other_user}","gists_url":"https://api.github.com/users/garand/gists{/gist_id}","starred_url":"https://api.github.com/users/garand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garand/subscriptions","organizations_url":"https://api.github.com/users/garand/orgs","repos_url":"https://api.github.com/users/garand/repos","events_url":"https://api.github.com/users/garand/events{/privacy}","received_events_url":"https://api.github.com/users/garand/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-13T01:48:29Z","updated_at":"2015-12-13T03:53:50Z","closed_at":"2015-12-13T03:53:50Z","body":"Have you considered setting the `WP_HOME` and `WP_SITEURL`'s dynamically?\r\n\r\nFor instance, adding the following to the config file and removing the corresponding entries from the `.env` file.\r\n\r\n```\r\ndefine('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);\r\ndefine('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp');\r\n```\r\n\r\nThis would allow for an install that isn't dependent on a consistent hostname and making local development a bit easier. In my case, I run my local sites with the [built-in PHP web server](http://php.net/manual/en/features.commandline.webserver.php) with a random port number each time to prevent conflicts from multiple instances running."},"comment":{"url":"https://api.github.com/repos/roots/bedrock/issues/comments/164218631","html_url":"https://github.com/roots/bedrock/issues/224#issuecomment-164218631","issue_url":"https://api.github.com/repos/roots/bedrock/issues/224","id":164218631,"user":{"login":"QWp6t","id":2104321,"avatar_url":"https://avatars.githubusercontent.com/u/2104321?v=3","gravatar_id":"","url":"https://api.github.com/users/QWp6t","html_url":"https://github.com/QWp6t","followers_url":"https://api.github.com/users/QWp6t/followers","following_url":"https://api.github.com/users/QWp6t/following{/other_user}","gists_url":"https://api.github.com/users/QWp6t/gists{/gist_id}","starred_url":"https://api.github.com/users/QWp6t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QWp6t/subscriptions","organizations_url":"https://api.github.com/users/QWp6t/orgs","repos_url":"https://api.github.com/users/QWp6t/repos","events_url":"https://api.github.com/users/QWp6t/events{/privacy}","received_events_url":"https://api.github.com/users/QWp6t/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T03:53:50Z","updated_at":"2015-12-13T03:53:50Z","body":"Nah, we won't be adding this to bedrock, but you can do this in your `.env` file no prob.\r\n\r\nAdd this to your `.env` file...\r\n```\r\nWP_HOME=\"http://${HTTP_HOST}\"\r\nWP_SITEURL=\"${WP_HOME}/wp\"\r\n```"}}