Environment type support

Edit (2020-09-01): WordPress 5.5.1 removed the ability to define arbitrary labels for environments, and instead requires your to choose from one of four types. The information below is retained for posterity but is no longer valid.

You can learn about the new behavior on VIP on our update post.


In WordPress 5.5, environment types were introduced to allow plugins to target specific environments for specific functionality. All the details about this new functionality can be found here.

We have now added support for environment types in VIP Go, so this feature can be used to determine the environment where the code is running.

Calling the method wp_get_environment_type() will return the name of the VIP environment, exactly as you can see it in the dashboard. This is an example when run on a typical VIP development env:

<?php
$environment = wp_get_environment_type();
print( $environment );

Result:

development

This allows you to use a standard WordPress method to run different code depending on whether you are running in production, development, or any other environment type you have configured for your application.

If you have any questions about environment types, please open a support ticket, and we’ll be happy to assist.