Collect staging identifiers from Kinsta and WP-Engine, then use those to set the WP_ENVIRONMENT_TYPE to staging.
Kinsta appears to be set $_SERVER['WP_ENVIRONMENT_TYPE'] to staging for staging environments.
More info from the Version Info, but I'm not seeing any of these in Site Health -> Info or $_ENV vars via phpinfo().
Detection Sources
Version Info automatically detects the environment from multiple sources, checking them in order of priority:
WP_ENVIRONMENT_TYPE - WordPress core constant (since WP 5.5)
WP_ENV - Used by Bedrock and Trellis setups
- Kinsta -
KINSTA_ENV_TYPE constant
- WP Engine -
WPE_ENVIRONMENT and IS_WPE_SNAPSHOT constants
- Pantheon -
PANTHEON_ENVIRONMENT constant
- Flywheel -
FLYWHEEL_CONFIG_DIR constant detection
Collect staging identifiers from Kinsta and WP-Engine, then use those to set the WP_ENVIRONMENT_TYPE to staging.
Kinsta appears to be set
$_SERVER['WP_ENVIRONMENT_TYPE']tostagingfor staging environments.More info from the Version Info, but I'm not seeing any of these in Site Health -> Info or
$_ENVvars viaphpinfo().