diff --git a/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php b/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php
index 8dbedda..edcf917 100644
--- a/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php
+++ b/core/lib/Drupal/Core/Cache/ApcuBackendFactory.php
@@ -20,6 +20,13 @@ class ApcuBackendFactory implements CacheFactoryInterface {
   protected $sitePrefix;
 
   /**
+   * The Drupal kernel.
+   *
+   * @var \Drupal\Core\DrupalKernelInterface
+   */
+  protected $kernel;
+
+  /**
    * The cache tags checksum provider.
    *
    * @var \Drupal\Core\Cache\CacheTagsChecksumInterface
@@ -36,7 +43,7 @@ class ApcuBackendFactory implements CacheFactoryInterface {
    * @param \Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider
    *   The cache tags checksum provider.
    */
-  public function __construct($root, CacheTagsChecksumInterface $checksum_provider) {
+  public function __construct($root, $kernel, CacheTagsChecksumInterface $checksum_provider) {
     $this->sitePrefix = Crypt::hashBase64($root . '/' . $kernel->getSitePath());
     $this->checksumProvider = $checksum_provider;
   }
diff --git a/core/lib/Drupal/Core/Site/Settings.php b/core/lib/Drupal/Core/Site/Settings.php
index 85810d6..28d696f 100644
--- a/core/lib/Drupal/Core/Site/Settings.php
+++ b/core/lib/Drupal/Core/Site/Settings.php
@@ -116,7 +116,6 @@ public static function initialize($app_root, $site_path, &$class_loader) {
     $config = array();
     $databases = array();
 
-    // Make conf_path() available as local variable in settings.php.
     if (is_readable($app_root . '/' . $site_path . '/settings.php')) {
       require $app_root . '/' . $site_path . '/settings.php';
     }
diff --git a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php
index e2b78ec..9a6011e 100644
--- a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php
@@ -61,7 +61,7 @@ public function getExternalUrl() {
    *   The base path for public:// typically sites/default/files.
    */
   public static function basePath() {
-    $base_path = Settings::get('file_public_path', conf_path() . '/files');
+    $base_path = Settings::get('file_public_path', \Drupal::service('kernel')->getSitePath() . '/files');
     return $base_path;
   }
 
diff --git a/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php b/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php
index 99cf3e8..5b1eff9 100644
--- a/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php
+++ b/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php
@@ -31,7 +31,7 @@ public function getDescription() {
   }
 
   function getDirectoryPath() {
-    return conf_path() . '/files';
+    return \Drupal::service('kernel')->getSitePath() . '/files';
   }
 
   /**
diff --git a/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php b/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php
index 2ed31d0..453d3f6 100644
--- a/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php
+++ b/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php
@@ -31,7 +31,7 @@ public function getDescription() {
   }
 
   function getDirectoryPath() {
-    return conf_path() . '/files';
+    return \Drupal::service('kernel')->getSitePath() . '/files';
   }
 
   /**
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 36247c3..8dd26a7 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -379,6 +379,8 @@ function system_requirements($phase) {
     else {
       // If we are installing Drupal, the settings.php file might not exist yet
       // in the intended site directory, so don't require it.
+      $request = Request::createFromGlobals();
+      $conf_path = DrupalKernel::findSitePath($request);
       $directories[] = $conf_path . '/files';
     }
     if ($file_private_path = Settings::get('file_private_path')) {
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index a435754..b42761d 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -48,7 +48,7 @@
  * sites/8080.www.drupal.org.mysite.test/.
  *
  * @see example.sites.php
- * @see conf_path()
+ * @see \Drupal\Core\DrupalKernel::getSitePath()
  *
  * In addition to customizing application settings through variables in
  * settings.php, you can create a services.yml file in the same directory to
