diff --git a/core/includes/file.inc b/core/includes/file.inc
index bcd3033..888467e 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -1817,7 +1817,7 @@ function drupal_tempnam($directory, $prefix) {
  * Gets the path of system-appropriate temporary directory.
  */
 function file_directory_temp() {
-  $temporary_directory = variable_get('file_temporary_path', NULL);
+  $temporary_directory = config('system.file')->get('path.temporary');
 
   if (empty($temporary_directory)) {
     $directories = array();
@@ -1856,7 +1856,7 @@ function file_directory_temp() {
       $temporary_directory = str_replace('\\', '/', $temporary_directory);
     }
     // Save the path of the discovered directory.
-    variable_set('file_temporary_path', $temporary_directory);
+    config('system.file')->set('path.temporary', $temporary_directory)->save();
   }
 
   return $temporary_directory;
diff --git a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php
index 52a6321..53e1546 100644
--- a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php
@@ -19,7 +19,7 @@ class TemporaryStream extends LocalStream {
    * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath()
    */
   public function getDirectoryPath() {
-    return variable_get('file_temporary_path', file_directory_temp());
+    return config('system.file')->get('path.temporary') ?: file_directory_temp();
   }
 
   /**
diff --git a/core/modules/system/config/system.file.yml b/core/modules/system/config/system.file.yml
new file mode 100644
index 0000000..0430524
--- /dev/null
+++ b/core/modules/system/config/system.file.yml
@@ -0,0 +1,2 @@
+path:
+  temporary: ''
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php b/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
index e6f3396..2e125aa 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
@@ -122,10 +122,10 @@ function testFileDestination() {
    */
   function testFileDirectoryTemp() {
     // Start with an empty variable to ensure we have a clean slate.
-    variable_set('file_temporary_path', '');
+    config('system.file')->set('path.temporary', '')->save();
     $tmp_directory = file_directory_temp();
     $this->assertEqual(empty($tmp_directory), FALSE, 'file_directory_temp() returned a non-empty value.');
-    $setting = variable_get('file_temporary_path', '');
+    $setting = config('system.file')->get('path.temporary');
     $this->assertEqual($setting, $tmp_directory, "The 'file_temporary_path' variable has the same value that file_directory_temp() returned.");
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php b/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php
index f94d7b1..12fa60d 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/StreamWrapperTest.php
@@ -81,7 +81,7 @@ function testUriFunctions() {
     // Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath().
     $this->assertEqual(file_build_uri('foo/bar.txt'), 'public://foo/bar.txt', 'Expected scheme was added.');
     $this->assertEqual(file_stream_wrapper_get_instance_by_scheme('public')->getDirectoryPath(), variable_get('file_public_path'), 'Expected default directory path was returned.');
-    $this->assertEqual(file_stream_wrapper_get_instance_by_scheme('temporary')->getDirectoryPath(), variable_get('file_temporary_path'), 'Expected temporary directory path was returned.');
+    $this->assertEqual(file_stream_wrapper_get_instance_by_scheme('temporary')->getDirectoryPath(), config('system.file')->get('path.temporary'), 'Expected temporary directory path was returned.');
 
     variable_set('file_default_scheme', 'private');
     $this->assertEqual(file_build_uri('foo/bar.txt'), 'private://foo/bar.txt', 'Got a valid URI from foo/bar.txt.');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
index a62eb90..fab2402 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/UpgradePathTestBase.php
@@ -117,7 +117,7 @@ protected function setUp() {
     // Set path variables.
     $this->variable_set('file_public_path', $this->public_files_directory);
     $this->variable_set('file_private_path', $this->private_files_directory);
-    $this->variable_set('file_temporary_path', $this->temp_files_directory);
+    config('system.file')->set('path.temporary', $this->temp_files_directory)->save();
 
     $this->pass('Finished loading the dump.');
 
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index b8cae7a..05a20af 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -1746,12 +1746,12 @@ function system_file_system_settings() {
   $form['file_temporary_path'] = array(
     '#type' => 'textfield',
     '#title' => t('Temporary directory'),
-    '#default_value' => variable_get('file_temporary_path', file_directory_temp()),
+    '#default_value' => config('system.file')->get('path.temporary') ?: file_directory_temp(),
     '#maxlength' => 255,
     '#description' => t('A local file system path where temporary files will be stored. This directory should not be accessible over the web.'),
     '#after_build' => array('system_check_directory'),
   );
-  // Any visible, writeable wrapper can potentially be used for the files
+  // Any visible, writable wrapper can potentially be used for the files
   // directory, including a remote file system that integrates with a CDN.
   foreach (file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE) as $scheme => $info) {
     $options[$scheme] = check_plain($info['description']);
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index be3a6d8..f3f0fe2 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -321,10 +321,10 @@ function system_requirements($phase) {
   // unless it has been set in settings.php. In this case the user has
   // no alternative but to fix the directory if it is not writable.
   if ($phase == 'install') {
-    $directories[] = variable_get('file_temporary_path', FALSE);
+    $directories[] = config('system.file')->get('path.temporary');
   }
   else {
-    $directories[] = variable_get('file_temporary_path', file_directory_temp());
+    $directories[] = config('system.file')->get('path.temporary') ?: file_directory_temp();
   }
 
   // Check the config directory if it is defined in settings.php. If it isn't
@@ -2318,6 +2318,19 @@ function system_update_8040() {
 }
 
 /**
+ * Converts css and js gzip compression variables to config.
+ *
+ * @ingroup config_upgrade
+ */
+function system_update_8041() {
+  $variable_map = array(
+    'css_gzip_compression' => 'css.gzip',
+    'js_gzip_compression' => 'js.gzip'
+  );
+  update_variables_to_config('system.file', array('file_temporary_path' => 'path.temporary'));
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
