Environments & Hosting
The Dealers Site is hosted on WP Engine, a managed WordPress hosting platform. Two environments are maintained.
Environments
| Environment | URL | Purpose |
|---|---|---|
| Production | https://dealers.scottsdalemint.com | Live dealer portal |
| Staging | WP Engine staging URL | Pre-release testing and QA |
WP Engine Features Used
- Automated daily backups — point-in-time restores available via WP Engine portal
- CDN — WP Engine's built-in CDN for static assets
- PHP version management — configurable per environment
- Staging environment — one-click copy of production to staging; push staging to production via WP Engine dashboard
- GitPush deployment — code can be pushed directly to WP Engine via Git remote
- SSH Gateway — secure SSH access for WP-CLI commands
- Object cache (Redis) — optional Redis object cache for WooCommerce session and query caching
- Search & Replace — domain swap tool when cloning environments
Deploying Code
Via Git
WP Engine supports deploying via a Git remote:
# Add WP Engine's Git remote (from WP Engine portal → Git Push section)
git remote add wpengine [email protected]:production/dealersscottsdale.git
# Deploy to production
git push wpengine main
# Deploy to staging
git remote add wpe-staging [email protected]:staging/dealersscottsdale.git
git push wpe-staging main
Via WP Engine Portal (Staging)
- Log in to my.wpengine.com.
- Navigate to the
dealersscottsdalesite. - Click Staging → Copy Production to Staging to refresh staging with latest production data.
- After testing on staging, click Push to Production to deploy.
Environment Variables & Config
WordPress does not use a .env file natively. Site-specific constants are defined in wp-config.php:
define( 'DB_NAME', 'dealers_db' );
define( 'DB_USER', 'db_user' );
define( 'DB_PASSWORD', 'db_password' );
define( 'DB_HOST', 'localhost' );
// Algolia
define( 'ALGOLIA_APP_ID', 'XXXXXXXXXX' );
define( 'ALGOLIA_API_KEY', 'xxxxxxxx' );
// Pricing API token (for /suma/v1/prices endpoint)
define( 'PRICES_API_TOKEN', 'your_secret_token' );
WP Engine allows setting PHP constants and environment variables via their portal under PHP Settings.
Bitbucket Pipelines
The site uses Bitbucket Pipelines (bitbucket-pipelines.yml) for CI/CD:
- Runs PHP syntax checks and asset compilation
- Can trigger an automated deploy push to WP Engine on
mainbranch merge
Review bitbucket-pipelines.yml in the repository root for the current pipeline configuration.