diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index f460155..493e8fa 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -495,6 +495,25 @@ function config_get_config_directory() {
 }
 
 /**
+ * Returns the path of the configuration import directory.
+ *
+ * @return string
+ *   The configuration import directory path.
+ */
+function config_get_config_import_directory() {
+  global $config_import_directory_name;
+
+  if ($test_prefix = drupal_valid_test_ua()) {
+    // @see Drupal\simpletest\WebTestBase::setUp()
+    $path = conf_path() . '/files/simpletest/' . substr($test_prefix, 10) . '/config_import';
+  }
+  else {
+    $path = conf_path() . '/files/' . $config_import_directory_name;
+  }
+  return $path;
+}
+
+/**
  * Sets appropriate server variables needed for command line scripts to work.
  *
  * This function can be called by command line scripts before bootstrapping
diff --git a/core/includes/config.inc b/core/includes/config.inc
index 347bf85..785f5dd 100644
--- a/core/includes/config.inc
+++ b/core/includes/config.inc
@@ -137,7 +137,7 @@ function config_sync_changes(array $config_changes, StorageInterface $source_sto
  */
 function config_import() {
   // Retrieve a list of differences between FileStorage and the active store.
-  $source_storage = new FileStorage();
+  $source_storage = new FileStorage(array('directory' => config_get_config_import_directory()));
   $target_storage = drupal_container()->get('config.storage');
 
   $config_changes = config_sync_get_changes($source_storage, $target_storage);
@@ -219,7 +219,7 @@ function config_import_invoke_owner(array $config_changes, StorageInterface $sou
 function config_export() {
   // Retrieve a list of differences between the active store and FileStorage.
   $source_storage = drupal_container()->get('config.storage');
-  $target_storage = new FileStorage();
+  $target_storage = new FileStorage(array('directory' => config_get_config_import_directory()));
 
   $config_changes = config_sync_get_changes($source_storage, $target_storage);
   if (empty($config_changes)) {
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index edaf8ec..de89701 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -313,7 +313,7 @@ function install_begin_request(&$install_state) {
 
   // Check existing settings.php.
   $install_state['database_verified'] = install_verify_database_settings();
-  $install_state['config_verified'] = install_ensure_config_directory();
+  $install_state['config_verified'] = install_ensure_config_directory() && install_ensure_config_import_directory();
   $install_state['settings_verified'] = $install_state['config_verified'] && $install_state['database_verified'];
 
   if ($install_state['database_verified']) {
@@ -1046,8 +1046,8 @@ function install_settings_form_submit($form, &$form_state) {
 
   drupal_rewrite_settings($settings);
 
-  // Add the config directory to settings.php.
-  drupal_install_config_directory();
+  // Add the config directories to settings.php.
+  drupal_install_config_directories();
 
   // Indicate that the settings file has been verified, and check the database
   // for the last completed task, now that we have a valid connection. This
diff --git a/core/includes/install.inc b/core/includes/install.inc
index f1184a7..08ee59e 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -254,8 +254,8 @@ function drupal_rewrite_settings($settings = array()) {
  * @see install_settings_form_submit()
  * @see update_prepare_d8_bootstrap()
  */
-function drupal_install_config_directory() {
-  global $config_directory_name;
+function drupal_install_config_directories() {
+  global $config_directory_name, $config_import_directory_name;
 
   // Add a randomized config directory name to settings.php, unless it was
   // manually defined in the existing already.
@@ -264,6 +264,15 @@ function drupal_install_config_directory() {
       'value' => 'config_' . drupal_hash_base64(drupal_random_bytes(55)),
       'required' => TRUE,
     );
+  }
+  if (!$config_import_directory_name) {
+    $settings['config_import_directory_name'] = array(
+      'value' => 'config_import_' . drupal_hash_base64(drupal_random_bytes(55)),
+      'required' => TRUE,
+    );
+  }
+
+  if (!empty($settings)) {
     // Rewrite settings.php, which also sets the value as global variable.
     drupal_rewrite_settings($settings);
   }
@@ -281,6 +290,12 @@ function drupal_install_config_directory() {
       '@handbook_url' => 'http://drupal.org/server-permissions',
     )));
   }
+  if (!install_ensure_config_import_directory()) {
+    throw new Exception(st('The directory %directory could not be created or could not be made writable. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see the <a href="@handbook_url">online handbook</a>.', array(
+      '%directory' => config_get_config_import_directory(),
+      '@handbook_url' => 'http://drupal.org/server-permissions',
+    )));
+  }
 }
 
 /**
@@ -301,6 +316,23 @@ function install_ensure_config_directory() {
 }
 
 /**
+ * Ensures the config import directory exists and is writable, or can be made so.
+ */
+function install_ensure_config_import_directory() {
+  // The config import directory must be defined in settings.php.
+  global $config_import_directory_name;
+  if (empty($config_import_directory_name)) {
+    return FALSE;
+  }
+  // The logic here is similar to that used by system_requirements() for other
+  // directories that the installer creates.
+  else {
+    $config_import_directory = config_get_config_import_directory();
+    return file_prepare_directory($config_import_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+  }
+}
+
+/**
  * Verify an install profile for installation.
  *
  * @param $install_state
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 30be3cd..841d59e 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -139,11 +139,12 @@ function update_prepare_d8_bootstrap() {
       // Update the environment for the language bootstrap if needed.
       update_prepare_d8_language();
 
-      // Ensure the configuration directory exists and is writable or create it.
-      // If no $config_directory_name has been specified in settings.php and
-      // created manually already, and the directory cannot be created by the
-      // web server, an exception will be thrown, halting the update.
-      drupal_install_config_directory();
+      // Ensure the configuration directories exist and are writable, or create
+      // them. If either $config_directory_name or $config_import_directory_name
+      // have not been specified in settings.php and created manually already,
+      // and either directory cannot be created by the web server, an exception
+      // will be thrown, halting the update.
+      drupal_install_config_directories();
 
       // Change language column to langcode in url_alias.
       if (db_table_exists('url_alias') && db_field_exists('url_alias', 'language')) {
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
index ec92fdf..c17e04a 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php
@@ -47,8 +47,8 @@ class ConfigImportTest extends WebTestBase {
     // Export.
     config_export();
 
-    // Delete the configuration objects.
-    $file_storage = new FileStorage();
+    // Delete the configuration objects from the import directory.
+    $file_storage = new FileStorage(array('directory' => config_get_config_import_directory()));
     $file_storage->delete($name);
     $file_storage->delete($dynamic_name);
 
@@ -73,15 +73,15 @@ class ConfigImportTest extends WebTestBase {
     $name = 'config_test.new';
     $dynamic_name = 'config_test.dynamic.new';
 
-    // Verify the configuration to create does not exist yet.
-    $file_storage = new FileStorage();
-    $this->assertIdentical($file_storage->exists($name), FALSE, $name . ' not found.');
-    $this->assertIdentical($file_storage->exists($dynamic_name), FALSE, $dynamic_name . ' not found.');
-
     // Export.
     config_export();
 
-    // Create new configuration objects.
+    // Verify the new configuration does not exist in the import direcotry.
+    $file_storage = new FileStorage(array('directory' => config_get_config_import_directory()));
+    $this->assertIdentical($file_storage->exists($name), FALSE, $name . ' not found.');
+    $this->assertIdentical($file_storage->exists($dynamic_name), FALSE, $dynamic_name . ' not found.');
+
+    // Create new configuration objects in the import directory.
     $file_storage->write($name, array(
       'add_me' => 'new value',
     ));
@@ -112,8 +112,9 @@ class ConfigImportTest extends WebTestBase {
     // Export.
     config_export();
 
-    // Replace the file content of the existing configuration objects.
-    $file_storage = new FileStorage();
+    // Replace the file content of the existing configuration objects in the
+    // import directory.
+    $file_storage = new FileStorage(array('directory' => config_get_config_import_directory()));
     $this->assertIdentical($file_storage->exists($name), TRUE, $name . ' found.');
     $this->assertIdentical($file_storage->exists($dynamic_name), TRUE, $dynamic_name . ' found.');
     $file_storage->write($name, array(
