WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

@wordpress/env: Add Support for Environment Variables in wp-config.php #32515

Open dorzgi opened 3 years ago

dorzgi commented 3 years ago

Hello, We know we can add custom constants to wp-config.php using .wp-env.json, however we would like to be able to change the value using environment variables.

For example, If we define the constant BASE_API_URI we would like the ability to have the value of the constant be populated with an environment variable we will pass.

Thanks!

reageek commented 3 years ago

Look into roots bedrock. It has a means to do this.

lflorent commented 2 years ago

I'm agree with @reageek.

A mecanism like dotenv would be great to populate some config constants.