-
GitHub stars
-
Projects created
-
roots/wordpress installs
Configuration
The file to modify for configuration options is config/application.php
. This is the file that contains what wp-config.php
usually would.
The root web/wp-config.php
is required by WordPress and is only used to load the other main configs. Nothing else should be added to it.
Bedrock's base configuration options are production-standard safe settings and used in all environments except where specifically overridden. To override configuration settings based on environments:
-
Use an existing environment config in
config/environments
or create a new one. Bedrock willrequire
any file in theconfig/environments
directory with a filename matching theWP_ENV
environment variable. This environment variable can be set in a few ways:- in the
.env
file as described in our installation docs - via Trellis config if you're using Trellis
- or as a last resort, hardcoding it in
config/application.php
- in the
-
Bedrock comes with
development.php
andstaging.php
configs included. If you create an additional environment, configure it with a matching PHP file inconfig/environments
. -
The
development.php
file setsWP_DEBUG_DISPLAY
totrue
, so WordPress will display PHP errors in the browser when yourWP_ENV
isdevelopment
.
Bedrock 1.9.0 (2018-09-17) introduced roots/wp-config
(discussion).
Config::define
is a static method that overrides the application options (WP) with environment specific options where they are defined, defaulting to the application options set in config/application.php
.
Contributors
Last updated
Support Roots
Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.
Sponsor Roots on GitHub