Additional Kinsta Constants

Hi, after importing a staging site from Kinsta to DevKinsta, I notice the following at the top of the wp-config.php file:

<?php /* BEGIN KINSTA DEVELOPMENT ENVIRONMENT */ ?>

<?php if ( !defined('KINSTA_DEV_ENV') ) { define('KINSTA_DEV_ENV', true); /* Kinsta development - don't remove this line */ } ?>

<?php if ( !defined('JETPACK_STAGING_MODE') ) { define('JETPACK_STAGING_MODE', true); /* Kinsta development - don't remove this line */ } ?>

<?php /* END KINSTA DEVELOPMENT ENVIRONMENT */ ?>

Can you explain what this is?
Should it only apply to the wp-config.php file in our site’s staging envrionment?
Can/should it be removed from wp-config.php file in local dev?

Hi @dgilfillan, thanks for reaching out! These are added by default to all our Staging environments when they are created. When you Push the site back to a Live environment on Kinsta, those lines are removed.

Those constants are needed for functions or plugins that should be disabled on development environments.

DevKinsta doesn’t really require those lines but it doesn’t hurt to leave them either. Many plugins can already tell that a *.local domain is a development environment.