Can anyone please explain the difference between main.php and main-local.php in the config folder?
Why one has the -local, and the other doesn't?
You can read Configuration and environments section of Advanced Application Template README to understand this:
Typically environment contains application bootstrap files such as index.php and config files suffixed with -local.php. These are added to .gitignore and never added to source code repository.
In order to avoid duplication configurations are overriding each other. For example, the frontend reads configuration in the following order:
common/config/main.php common/config/main-local.php frontend/config/main.php frontend/config/main-local.php
Parameters are read in the following order:
common/config/params.php common/config/params-local.php frontend/config/params.php frontend/config/params-local.php
The later config file overrides the former.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With