By mlmarinas
How do I use environmental variables for my wp-config.php? Where do I set these variables?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello @mlmarinas,
Can you please share what your end goal is? I’m not entierly sure what you mean by the above question but I’ll give it a try to answer as best to my knowledge as possible.
When you mention environmental variables with Nginx, all I can think is about environments that are added in PHP-FPM. You can set the environment variable in /etc/php/php-fpm.d/www.conf like this:
env[APP_ENV] = development
Then you’ll be able to get it with getenv(‘APP_ENV’) anywhere on your PHP application, as long as you are using that php-fpm instnace.
Is that what you were after?
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.