diff --git a/config/application.php b/config/application.php index d558a856a2..b108e5ea34 100644 --- a/config/application.php +++ b/config/application.php @@ -27,8 +27,9 @@ /** * Use Dotenv to set required environment variables and load .env file in root + * .env.local will override .env if it exists */ -$dotenv = Dotenv\Dotenv::createUnsafeImmutable($root_dir); +$dotenv = Dotenv\Dotenv::createUnsafeImmutable($root_dir, ['.env', '.env.local'], false); if (file_exists($root_dir . '/.env')) { $dotenv->load(); $dotenv->required(['WP_HOME', 'WP_SITEURL']);