diff --git a/core/INSTALL.txt b/core/INSTALL.txt
index 99aeb33..ef827ea 100644
--- a/core/INSTALL.txt
+++ b/core/INSTALL.txt
@@ -167,12 +167,12 @@ INSTALLATION
       which is normally in the directory sites/default (to avoid problems when
       upgrading, Drupal is not packaged with this file). If auto-creation fails,
       you will need to create this file yourself, using the file
-      sites/default/default.settings.php as a template.
+      core/default.settings.php as a template.
 
       For example, on a Unix/Linux command line, you can make a copy of the
       default.settings.php file with the command:
 
-        cp sites/default/default.settings.php sites/default/settings.php
+        cp core/default.settings.php sites/default/settings.php
 
       Next, grant write privileges to the file to everyone (including the web
       server) with the command:
diff --git a/core/UPGRADE.txt b/core/UPGRADE.txt
index 1f11185..88bd1a5 100644
--- a/core/UPGRADE.txt
+++ b/core/UPGRADE.txt
@@ -162,10 +162,6 @@ following the instructions in the INTRODUCTION section at the top of this file:
    no longer need their data, then you can uninstall them under the Uninstall
    tab after disabling them.
 
-8. On the command line or in your FTP client, remove the file
-
-     sites/default/default.settings.php
-
 9. Remove all old core files and directories, except for the 'sites' directory
    and any custom files you added elsewhere.
 
diff --git a/sites/default/default.settings.php b/core/default.settings.php
similarity index 91%
rename from sites/default/default.settings.php
rename to core/default.settings.php
index 8dbb5a7..08f09f3 100644
--- a/sites/default/default.settings.php
+++ b/core/default.settings.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Drupal site-specific configuration file.
+ * Drupal global configuration file.
  *
  * IMPORTANT NOTE:
  * This file may have been set to read-only by the Drupal installation program.
@@ -11,10 +11,8 @@
  * security risk.
  *
  * The configuration file to be loaded is based upon the rules below. However
- * if the multisite aliasing file named sites/sites.php is present, it will be
- * loaded, and the aliases in the array $sites will override the default
- * directory rules below. See sites/example.sites.php for more information about
- * aliases.
+ * if the multisite aliasing is enabled, the aliases in the $sites array will
+ * override the default directory rules below.
  *
  * The configuration directory will be discovered by stripping the website's
  * hostname from left to right and pathname from right to left. The first
@@ -48,11 +46,59 @@
  * http://www.drupal.org:8080/mysite/test/ could be loaded from
  * sites/8080.www.drupal.org.mysite.test/.
  *
- * @see example.sites.php
  * @see conf_path()
  */
 
 /**
+ * Multi-site functionality and aliases.
+ *
+ * Uncomment the $sites variable below to enable Drupal's multi-site
+ * functionality, which allows to serve multiple different sites from the same
+ * code-base.
+ *
+ * An empty $sites variable just enables the sites directory discovery process.
+ * You can additionally define aliases that map hostnames, ports, and path names
+ * to specific site directories. These aliases are applied prior to scanning for
+ * directories and exempt from the discovery rules.
+ *
+ * Aliases are useful on development servers, where the domain name may not be
+ * the same as the domain of the live server. Since Drupal stores file paths in
+ * the database (files, system table, etc.) this will ensure the paths are
+ * correct when the site is deployed to a live server.
+ *
+ * Aliases are defined in an associative array in the format:
+ * @code
+ *   '<port>.<domain>.<path>' => 'directory',
+ * @endcode
+ * For example, to map http://www.drupal.org:8080/mysite/test to the directory
+ * sites/example.com, the array should be defined as:
+ * @code
+ * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
+ * @endcode
+ * The URL http://www.drupal.org:8080/mysite/test/ could be a symbolic link or
+ * an Apache Alias directive that points to the Drupal root containing
+ * index.php. An alias could also be created for a subdomain. See the
+ * @link http://drupal.org/documentation/install online Drupal installation guide @endlink
+ * for more information on setting up domains, subdomains, and subdirectories.
+ *
+ * The following examples look for a site configuration in sites/example.com:
+ * @code
+ * # URL: http://dev.drupal.org
+ * $sites['dev.drupal.org'] = 'example.com';
+ * # URL: http://localhost/example
+ * $sites['localhost.example'] = 'example.com';
+ * # URL: http://localhost:8080/example
+ * $sites['8080.localhost.example'] = 'example.com';
+ * # URL: http://www.drupal.org:8080/mysite/test/
+ * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
+ * @endcode
+ *
+ * @see http://drupal.org/documentation/install/multi-site
+ */
+# $sites = array();
+# $sites['localhost.example'] = 'example.com';
+
+/**
  * Database settings:
  *
  * The $databases array specifies the database connection or
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 34006cc..bf79eb4 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -405,11 +405,8 @@ function timer_stop($name) {
  * See default.settings.php for examples on how the URL is converted to a
  * directory.
  *
- * @param bool $require_settings
- *   Only configuration directories with an existing settings.php file
- *   will be recognized. Defaults to TRUE. During initial installation,
- *   this is set to FALSE so that Drupal can detect a matching directory,
- *   then create a new settings.php file in it.
+ * @param string $custom_path
+ *   (optional) A custom $conf_path to set and statically cache.
  * @param bool $reset
  *   Force a full search for matching directories even if one had been
  *   found previously. Defaults to FALSE.
@@ -419,20 +416,45 @@ function timer_stop($name) {
  *
  * @see default.settings.php
  */
-function conf_path($require_settings = TRUE, $reset = FALSE) {
-  $conf = &drupal_static(__FUNCTION__, '');
+function conf_path($custom_path = NULL, $reset = FALSE) {
+  static $conf_path;
+  global $sites;
+
+  if (isset($conf_path) && !$reset) {
+    return $conf_path;
+  }
 
-  if ($conf && !$reset) {
-    return $conf;
+  if (!empty($custom_path) && is_string($custom_path)) {
+    $conf_path = $custom_path;
+    return $conf_path;
   }
 
-  $script_name = $_SERVER['SCRIPT_NAME'];
-  if (!$script_name) {
-    $script_name = $_SERVER['SCRIPT_FILENAME'];
+  // Check whether the multi-site functionality is enabled, and if so, discover
+  // the path for the current site.
+  // The global settings.php is included by drupal_settings_initialize() and
+  // $sites (if any) was exported into a global variable.
+  // $sites just needs to be defined; an explicit mapping is not required.
+  if (isset($sites)) {
+    $http_host = $_SERVER['HTTP_HOST'];
+    $script_name = $_SERVER['SCRIPT_NAME'];
+    if (!$script_name) {
+      $script_name = $_SERVER['SCRIPT_FILENAME'];
+    }
+    $require_settings = (bool) $custom_path;
+    $conf_path = find_conf_path($http_host, $script_name, $require_settings, $sites);
+  }
+  // If the multi-site functionality is not enabled, $conf_path is empty, which
+  // means that the root/top-level directory is the site directory.
+  else {
+    // Many callers of this function append a slash to the returned path and do
+    // not prefix it with DRUPAL_ROOT, so Drupal writes new files and
+    // directories to the filesystem's root directory (which is possible on
+    // unsecured local Windows development environments). We therefore need to
+    // return a dot instead of an empty string to ensure that the path is
+    // interpreted as a relative path.
+    $conf_path = '.';
   }
-  $http_host = $_SERVER['HTTP_HOST'];
-  $conf = find_conf_path($http_host, $script_name, $require_settings);
-  return $conf;
+  return $conf_path;
 }
 
 /**
@@ -467,28 +489,22 @@ function conf_path($require_settings = TRUE, $reset = FALSE) {
  * @param $require_settings
  *   Defaults to TRUE. If TRUE, then only match directories with a
  *   'settings.php' file. Otherwise match any directory.
+ * @param array $sites
+ *   (optional) A multi-site mapping, as defined in settings.php.
  *
  * @return
  *   The path of the matching configuration directory.
  *
  * @see default.settings.php
- * @see example.sites.php
  * @see conf_path()
  */
-function find_conf_path($http_host, $script_name, $require_settings = TRUE) {
-  // Determine whether multi-site functionality is enabled.
-  if (!file_exists(DRUPAL_ROOT . '/sites/sites.php')) {
-    return 'sites/default';
-  }
-
-  $sites = array();
-  include DRUPAL_ROOT . '/sites/sites.php';
-
+function find_conf_path($http_host, $script_name, $require_settings = TRUE, array $sites = array()) {
   $uri = explode('/', $script_name);
   $server = explode('.', implode('.', array_reverse(explode(':', rtrim($http_host, '.')))));
   for ($i = count($uri) - 1; $i > 0; $i--) {
     for ($j = count($server); $j > 0; $j--) {
       $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
+      // Check for an alias in $sites.
       if (isset($sites[$dir]) && file_exists(DRUPAL_ROOT . '/sites/' . $sites[$dir])) {
         $dir = $sites[$dir];
       }
@@ -629,7 +645,7 @@ function drupal_environment_initialize() {
   error_reporting(E_STRICT | E_ALL | error_reporting());
 
   // Override PHP settings required for Drupal to work properly.
-  // sites/default/default.settings.php contains more runtime settings.
+  // default.settings.php contains more runtime settings.
   // The .htaccess file contains settings that cannot be changed at runtime.
 
   // Deny execution with enabled "magic quotes" (both GPC and runtime).
@@ -715,21 +731,37 @@ function unicode_check() {
 
 /**
  * Sets the base URL, cookie domain, and session name from configuration.
+ *
+ * @param bool $require_settings
+ *   (optional) Whether to require settings.php to exist. Internally used by the
+ *   Drupal installer, which needs to set up global variables before any
+ *   configuration exists.
  */
-function drupal_settings_initialize() {
+function drupal_settings_initialize($require_settings = TRUE) {
   global $base_url, $base_path, $base_root, $script_path;
 
   // Export these settings.php variables to the global namespace.
-  global $databases, $cookie_domain, $conf, $installed_profile, $db_url, $db_prefix, $drupal_hash_salt, $is_https, $base_secure_url, $base_insecure_url, $config_directories;
+  global $sites, $databases, $cookie_domain, $conf, $installed_profile, $db_url, $db_prefix, $drupal_hash_salt, $is_https, $base_secure_url, $base_insecure_url, $config_directories;
   $conf = array();
 
+  // Include the global settings.php to determine whether the multi-site
+  // functionality is enabled. If settings.php is not required, then the caller
+  // is likely the installer, in which case the global settings.php may be used
+  // to enable the multi-site functionality to install Drupal into a
+  // site-specific directory.
+  if ($require_settings || is_readable(DRUPAL_ROOT . '/settings.php')) {
+    require_once DRUPAL_ROOT . '/settings.php';
+  }
+
+  // Discover the site directory, priming the static cache in conf_path().
   // Make conf_path() available as local variable in settings.php.
-  $conf_path = conf_path();
-  if (is_readable(DRUPAL_ROOT . '/' . $conf_path . '/settings.php')) {
+  $conf_path = conf_path(isset($conf_path) ? $conf_path : $require_settings);
+  if (isset($sites) && $conf_path !== '.' && is_readable(DRUPAL_ROOT . '/' . $conf_path . '/settings.php')) {
     include_once DRUPAL_ROOT . '/' . $conf_path . '/settings.php';
   }
   require_once DRUPAL_ROOT . '/core/lib/Drupal/Component/Utility/Settings.php';
   new Settings(isset($settings) ? $settings : array());
+
   $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
 
   if (isset($base_url)) {
@@ -2275,15 +2307,12 @@ function _drupal_exception_handler($exception) {
  * Sets up the script environment and loads settings.php.
  */
 function _drupal_bootstrap_configuration() {
-  // Set the Drupal custom error handler.
-  set_error_handler('_drupal_error_handler');
-  set_exception_handler('_drupal_exception_handler');
-
   drupal_environment_initialize();
   // Start a page timer:
   timer_start('page');
+
   // Initialize the configuration, including variables from settings.php.
-  drupal_settings_initialize();
+  drupal_settings_initialize(!drupal_installation_attempted());
 
   // Activate the class loader.
   drupal_classloader();
@@ -2293,9 +2322,19 @@ function _drupal_bootstrap_configuration() {
 
   // Load the procedural configuration system helper functions.
   require_once DRUPAL_ROOT . '/core/includes/config.inc';
+
+  // Set the Drupal custom error handler.
+  // Circular dependency: The error/exception handler requires config, which
+  // requires the service container, which requires the class loader, which
+  // requires $conf/settings.php (to be swappable). Therefore, errors in early
+  // bootstrap and settings.php cannot be handled by Drupal.
+  set_error_handler('_drupal_error_handler');
+  set_exception_handler('_drupal_exception_handler');
+
   // Redirect the user to the installation script if Drupal has not been
   // installed yet (i.e., if no $databases array has been defined in the
   // settings.php file) and we are not already installing.
+  // @todo This is impossible and incompatible with a required /settings.php.
   if (empty($GLOBALS['databases']) && !drupal_installation_attempted()) {
     include_once DRUPAL_ROOT . '/core/includes/install.inc';
     install_goto('core/install.php');
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 4ec640d..7c8fddb 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -268,12 +268,14 @@ function install_begin_request(&$install_state) {
     exit;
   }
 
-  // Initialize conf_path().
-  // This primes the site path to be used during installation. By not requiring
-  // settings.php, a bare site folder can be prepared in the /sites directory,
-  // which will be used for installing Drupal.
-  conf_path(FALSE);
-
+  // Perform a minimal bootstrap.
+  // This essentially calls _drupal_bootstrap_configuration(), which in turn
+  // calls drupal_settings_initialize() using the return value of
+  // drupal_installation_attempted() as argument. During installation, this
+  // causes drupal_settings_initialize() to not attempt to load any settings.php
+  // files, which allows to prime the site path to be used during installation.
+  // By not requiring settings.php, a bare site folder can be prepared in the
+  // /sites directory, which will be used for installing Drupal.
   drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
 
   // A request object from the HTTPFoundation to tell us about the request.
@@ -919,7 +921,6 @@ function install_verify_database_settings() {
   global $databases;
   if (!empty($databases)) {
     $database = $databases['default']['default'];
-    drupal_static_reset('conf_path');
     $settings_file = './' . conf_path(FALSE) . '/settings.php';
     $errors = install_database_errors($database, $settings_file);
     if (empty($errors)) {
@@ -943,7 +944,6 @@ function install_settings_form($form, &$form_state, &$install_state) {
   global $databases;
   $profile = $install_state['parameters']['profile'];
 
-  drupal_static_reset('conf_path');
   $conf_path = './' . conf_path(FALSE);
   $settings_file = $conf_path . '/settings.php';
   $database = isset($databases['default']['default']) ? $databases['default']['default'] : array();
@@ -1284,7 +1284,7 @@ function install_find_translations() {
  * @see file_scan_directory()
  */
 function install_find_translation_files($langcode = NULL) {
-  $directory = variable_get('locale_translate_file_directory', conf_path() . '/files/translations');
+  $directory = variable_get('locale_translate_file_directory', conf_path(FALSE) . '/files/translations');
   $files = file_scan_directory($directory, '!drupal-\d+\.\d+\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
   return $files;
 }
@@ -1842,8 +1842,8 @@ function install_check_translations($install_state) {
   $readable = FALSE;
   $writable = FALSE;
   $executable = FALSE;
-  $files_directory = variable_get('file_public_path', conf_path() . '/files');
-  $translations_directory = variable_get('locale_translate_file_directory', conf_path() . '/files/translations');
+  $files_directory = variable_get('file_public_path', conf_path(FALSE) . '/files');
+  $translations_directory = variable_get('locale_translate_file_directory', conf_path(FALSE) . '/files/translations');
   $translations_directory_exists = FALSE;
   $online = FALSE;
   $server_available = FALSE;
@@ -2001,9 +2001,9 @@ function install_check_requirements($install_state) {
   if (!$install_state['settings_verified']) {
     $readable = FALSE;
     $writable = FALSE;
-    $conf_path = './' . conf_path(FALSE, TRUE);
+    $conf_path = './' . conf_path(FALSE);
     $settings_file = $conf_path . '/settings.php';
-    $default_settings_file = './sites/default/default.settings.php';
+    $default_settings_file = './core/default.settings.php';
     $file = $conf_path;
     $exists = FALSE;
     // Verify that the directory exists.
@@ -2018,19 +2018,9 @@ function install_check_requirements($install_state) {
       }
     }
 
-    // If default.settings.php does not exist, or is not readable, throw an
-    // error.
-    if (!drupal_verify_install_file($default_settings_file, FILE_EXIST|FILE_READABLE)) {
-      $requirements['default settings file exists'] = array(
-        'title'       => st('Default settings file'),
-        'value'       => st('The default settings file does not exist.'),
-        'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The @drupal installer requires that the %default-file file not be modified in any way from the original download.', array('@drupal' => drupal_install_profile_distribution_name(), '%default-file' => $default_settings_file)),
-      );
-    }
     // Otherwise, if settings.php does not exist yet, we can try to copy
     // default.settings.php to create it.
-    elseif (!$exists) {
+    if (!$exists) {
       $copied = drupal_verify_install_file($conf_path, FILE_EXIST|FILE_WRITABLE, 'dir') && @copy($default_settings_file, $settings_file);
       if ($copied) {
         // If the new settings file has the same owner as default.settings.php,
diff --git a/sites/example.sites.php b/sites/example.sites.php
deleted file mode 100644
index 2b00151..0000000
--- a/sites/example.sites.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @file
- * Configuration file for Drupal's multi-site directory aliasing feature.
- *
- * This file allows you to define a set of aliases that map hostnames, ports, and
- * pathnames to configuration directories in the sites directory. These aliases
- * are loaded prior to scanning for directories, and they are exempt from the
- * normal discovery rules. See default.settings.php to view how Drupal discovers
- * the configuration directory when no alias is found.
- *
- * Aliases are useful on development servers, where the domain name may not be
- * the same as the domain of the live server. Since Drupal stores file paths in
- * the database (files, system table, etc.) this will ensure the paths are
- * correct when the site is deployed to a live server.
- *
- * To use this file, copy and rename it such that its path plus filename is
- * 'sites/sites.php'. If you don't need to use multi-site directory aliasing,
- * then you can safely ignore this file, and Drupal will ignore it too.
- *
- * Aliases are defined in an associative array named $sites. The array is
- * written in the format: '<port>.<domain>.<path>' => 'directory'. As an
- * example, to map http://www.drupal.org:8080/mysite/test to the configuration
- * directory sites/example.com, the array should be defined as:
- * @code
- * $sites = array(
- *   '8080.www.drupal.org.mysite.test' => 'example.com',
- * );
- * @endcode
- * The URL, http://www.drupal.org:8080/mysite/test/, could be a symbolic link or
- * an Apache Alias directive that points to the Drupal root containing
- * index.php. An alias could also be created for a subdomain. See the
- * @link http://drupal.org/documentation/install online Drupal installation guide @endlink
- * for more information on setting up domains, subdomains, and subdirectories.
- *
- * The following examples look for a site configuration in sites/example.com:
- * @code
- * URL: http://dev.drupal.org
- * $sites['dev.drupal.org'] = 'example.com';
- *
- * URL: http://localhost/example
- * $sites['localhost.example'] = 'example.com';
- *
- * URL: http://localhost:8080/example
- * $sites['8080.localhost.example'] = 'example.com';
- *
- * URL: http://www.drupal.org:8080/mysite/test/
- * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
- * @endcode
- *
- * @see default.settings.php
- * @see conf_path()
- * @see http://drupal.org/documentation/install/multi-site
- */
