Environment Configuration
This page documents environment-specific configuration for the Dealers Site.
wp-config.php Constants
All environment-specific values are defined as constants in wp-config.php. WP Engine allows overriding these per environment via their PHP constants panel.
Required Constants
// Database
define( 'DB_NAME', 'dealers_db' );
define( 'DB_USER', 'db_user' );
define( 'DB_PASSWORD', 'db_password' );
define( 'DB_HOST', 'localhost' );
// Site URLs
define( 'WP_HOME', 'https://dealers.scottsdalemint.com' );
define( 'WP_SITEURL', 'https://dealers.scottsdalemint.com' );
// Security
define( 'AUTH_KEY', 'unique-value' );
define( 'SECURE_AUTH_KEY', 'unique-value' );
define( 'LOGGED_IN_KEY', 'unique-value' );
define( 'NONCE_KEY', 'unique-value' );
// ... (all 8 salts)
Algolia
define( 'ALGOLIA_APP_ID', 'XXXXXXXXXX' );
define( 'ALGOLIA_API_KEY', 'search-only-key' ); // Public search key
Pricing API
define( 'PRICES_API_TOKEN', 'your-secret-token' );
This token is used by the Middleware Platform's HTTP Sync Target to authenticate price import requests to POST /suma/v1/prices.
Production-Only Constants
define( 'WP_DEBUG', false );
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', false );
define( 'DISALLOW_FILE_EDIT', true ); // Disable theme/plugin editor
Environment Detection
Some theme code detects the environment by inspecting the server URL:
// In WooCommerce\ShipStation
if ( strpos( $url, 'wpengine' ) || strpos( $url, 'scottsdale.cc' ) ) {
// Production store
} else {
// Staging store
}
For more robust environment detection, consider adding a WP_ENVIRONMENT_TYPE constant:
define( 'WP_ENVIRONMENT_TYPE', 'production' ); // or 'staging', 'local'
Then check with wp_get_environment_type().
Performance Constants
define( 'WP_CACHE', true ); // Enable object caching
define( 'COMPRESS_SCRIPTS', true );
define( 'COMPRESS_CSS', true );
define( 'CONCATENATE_SCRIPTS', false ); // Keep false — Elementor manages JS loading