← ServerPilot Docs

How to Set Environment Variables

Some PHP applications look for configuration data in environment variables. You can set environment variables for your app using .htaccess files.

Either create or modify the file called .htaccess in your web root directory (public) and add the following lines:

SetEnv MYVAR myvalue
SetEnv OTHERVAR othervalue

You can use as many SetEnv directives as you need.

Launch your first site in 5 minutes