wp-cli/wp-cli — pull request #1362 by mboynes (2014-08-28 19:02:46+00:00)
Title: Remove url guesswork

When working with a multisite installation with variable wp-config files, e.g.

```php
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
require_once dirname( __FILE__ ) . '/wp-config-local.php';
} else {
...
}
```

or even variable `DOMAIN_CURRENT_SITE` declarations, WP-CLI doesn't correctly parse the url (and, in fact, fails silently). To resolve this, WP_CLI requires using the `--url` flag, or using a yaml config to explicitly set the url.

This PR aims to resolve that by removing the guess, and setting the URL after the config is loaded. Perhaps there's rationale as to why the url must be set before the config is loaded; if so, can anyone explain why that is?

If there's interest in moving forward with this, I'll write tests for it.

Refs #263.