Last active
September 4, 2024 17:51
-
-
Save apsolut/8893afaee3ae65d3eed9b41f550b59bd to your computer and use it in GitHub Desktop.
WPEngine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sites: | |
$production_name='INSTALL_PRD'; | |
$staging_name='INSTALL_STG'; | |
$development_name='INSTALL_DEV'; | |
// Check if PWP_NAME is set | |
if (defined('PWP_NAME')) { | |
// Create a variable from the PWP_NAME define | |
$wpeenv = PWP_NAME; | |
// Set the environment type for production | |
if ($wpeenv == $production_name) { | |
define( 'WP_ENVIRONMENT_TYPE', 'production' ); } | |
// Set the environment type for staging | |
if ($wpeenv == $staging_name) { | |
define( 'WP_ENVIRONMENT_TYPE', 'staging' ); } | |
// Set the environment type for development | |
if ($wpeenv == $development_name) { | |
define( 'WP_ENVIRONMENT_TYPE', 'development' ); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment