Environment Variables for WordPress Hosting

HI @leo.idna :waving_hand:

Welcome to the Kinsta Community.

You can use the following PHP constants for custom setups like Bedrock or Trellis, which store fixed values that remain the same throughout the site. When it is used, such as SERVER_SECRET_DB_USER, MyKinsta uses it to identify the site’s database password.

The following constants can be used:

SERVER_SECRET_DB_USER
SERVER_SECRET_DB_PASSWORD
SERVER_SECRET_DB_HOST
SERVER_SECRET_DB_NAME

Below are examples of using these in a config.php file:

define('DB_NAME', defined('SERVER_SECRET_DB_NAME') ? SERVER_SECRET_DB_NAME : 'newsitetest');
define('DB_USER', defined('SERVER_SECRET_DB_USER') ? SERVER_SECRET_DB_USER : 'newsitetest');
define('DB_PASSWORD', defined('SERVER_SECRET_DB_PASSWORD') ? SERVER_SECRET_DB : 'asdijfhkjasdbfkjhbajiksd' );
define('DB_HOST', defined('SERVER_SECRET_DB_HOST') ? SERVER_SECRET_DB_HOST : 'localhost');

I hope it helps. Cheers!