The config/app.php file is the primary configuration stub for the Acorn application. It defines core application settings such as the name, environment, debug mode, URL, and localization. Most values are driven by environment variables (via the env() helper) to allow for different configurations across development, staging, and production environments.
Key configuration areas include:
- Identity:
name and url. - Environment:
env (defaults to WP_ENV or production) and debug (driven by WordPress WP_DEBUG constants). - Localization:
locale, fallback_locale, and faker_locale. - Security:
cipher and key (for encryption services). - Maintenance: Driver and storage settings for maintenance mode.
return [
'name' => env('APP_NAME', 'Acorn'),
'env' => defined('WP_ENV') ? WP_ENV : env('WP_ENV', 'production'),
'debug' => WP_DEBUG && WP_DEBUG_DISPLAY,
'url' => env('APP_URL', home_url()),
'timezone' => 'UTC',
'locale' => env('APP_LOCALE', get_locale()),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [...],
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];