Closed mikemedoro closed 6 years ago
We've adopted a similar approach to how Laravel and Symfony handles environment files. We don't want to keep our different environment variables in our repositories. Instead we setup environment variables in development and production within the .env
file. The file is never committed due to security reasons.
It is often helpful to have different configuration values based on the environment where the application is running. For example, you may wish to use a different cache driver locally than you do on your production server. ... Your
.env
file should not be committed to your application's source control, since each developer / server using your application could require a different environment configuration. Furthermore, this would be a security risk in the event an intruder gains access to your source control repository, since any sensitive credentials would get exposed.
https://laravel.com/docs/5.7/configuration#environment-configuration
Makes sense. Thanks for the info.
Hi, I'm setting up WordPlate for the first time and it looks great so far.
I am curious if WordPlate can handle multiple environment config files? For example, if you set WP_ENV to either development, staging, or production in the dotenv file, it will look at that particular php file and grab different WordPress constants. So if you only want WP_DEBUG on for development purposes, you would set WP_ENV to 'development'. I've seen this done in Roots Bedrock.
Thanks again for the great starter stack.