Skip to content

Set WP_ENVIRONMENT_TYPE for known staging sites #58

Description

@joemaller

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:

  1. WP_ENVIRONMENT_TYPE - WordPress core constant (since WP 5.5)
  2. WP_ENV - Used by Bedrock and Trellis setups
  3. Kinsta - KINSTA_ENV_TYPE constant
  4. WP Engine - WPE_ENVIRONMENT and IS_WPE_SNAPSHOT constants
  5. Pantheon - PANTHEON_ENVIRONMENT constant
  6. Flywheel - FLYWHEEL_CONFIG_DIR constant detection

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions