# Environment Variables for WordPress Hosting

**URL:** https://community.kinsta.com/t/environment-variables-for-wordpress-hosting/6055
**Category:** Questions
**Created:** [March 19, 2026, 3:03pm UTC](https://community.kinsta.com/t/environment-variables-for-wordpress-hosting/6055 "2026-03-19T15:03:29Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Adrian\_L](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/adrian_l/32/2810_2.png) [@Adrian\_L](https://community.kinsta.com/u/Adrian_L)
#### Post date: [March 20, 2026, 6:17am UTC](https://community.kinsta.com/t/environment-variables-for-wordpress-hosting/6055/2 "2026-03-20T06:17:40Z")

</div>

HI @leo.idna 👋

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:

```auto
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!

---

_[View the full topic](https://community.kinsta.com/t/environment-variables-for-wordpress-hosting/6055)._
