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.
config/application.php is the main config file that contains what
wp-config.php usually would. Base options should be set in there.
For environment specific configuration, use the files under
config/environments. By default there are
production but these can be whatever you require.
The environment configs are required before the main
application config so anything in an environment config takes precedence over
Note: You can't re-define constants in PHP. So if you have a base setting in
application.php and want to override it in
production.php for example, you have a few options:
- Remove the base option and be sure to define it in every environment it's needed
- Only define the constant in
application.phpif it isn't already defined.