Local Development Setup
This guide walks you through setting up a fully functional Scottsdale Mint development environment on your local machine.
Prerequisitesโ
Install the following tools before proceeding:
| Tool | Version | Purpose |
|---|---|---|
| Laravel Herd | Latest | PHP 8.4, local HTTPS, DNS |
| PHP | 8.4+ | Runtime |
| Composer | 2.x | PHP dependency management |
| Node.js | 18+ | Theme asset compilation |
| npm | 9+ | JavaScript package manager |
| Git | Any | Version control |
| MySQL | 8.0 / MariaDB 10.11+ | Local database |
Laravel Herd auto-provisions local HTTPS certificates and DNS (*.test domains) โ no manual Nginx/Apache configuration needed.
Step 1: Clone the Repositoryโ
git clone [email protected]:rhinogroup/scottsdalemint.git
cd scottsdalemint
Step 2: Install PHP Dependenciesโ
All WordPress core, plugins, and the theme are managed via Composer.
First, configure Git to prevent line-ending issues on Windows. Run this from the root of the project:
git config core.autocrlf false
Then install dependencies:
composer install
This will:
- Download WordPress core to
web/wp/ - Download all plugins to
web/app/plugins/ - Apply all patches from the
patches/directory (viacweagans/composer-patches) - Set up the Composer autoloader
Some packages (premium plugins, WP CLI packages) require authentication. The auth.json file contains credentials. Contact your team lead for this file โ never commit it to the repository.
Step 3: Configure the Environmentโ
cp .env.example .env
Then edit .env with your local values:
# WordPress Environment
WP_ENVIRONMENT_TYPE=local
WP_ENV=local
WP_HOME=https://scottsdalemint.test
WP_SITEURL=https://scottsdalemint.test/wp
# Database (Herd default MySQL)
DB_NAME=wp_scottsdale
DB_USER=root
DB_PASSWORD=
DB_READER_HOST=127.0.0.1
DB_WRITER_HOST=127.0.0.1
# Disable cron (handled externally in production)
DISABLE_WP_CRON=1
# Debug
WP_DEBUG=true
WP_DEBUG_LOG=true
WP_CACHE=false
# Algolia (use development keys)
ALGOLIA_APPLICATION_ID=EYDBVK6XRL
ALGOLIA_API_KEY=<your-dev-key>
ALGOLIA_SEARCH_API_KEY=<your-search-key>
# NFusion
NFUSION_API_KEY=<your-key>
NFUSION_PRODUCT_API_KEY=<your-key>
NFUSION_PRODUCT_CATALOG_BASE_URL=https://scottsdalemint2.nfusioncatalog.com
# Order prefix
ORDER_PREFIX_NUMBER=LOCAL-
See the full Environment Variables Reference for all available variables.
Step 4: Create the Databaseโ
Using MySQL CLI, TablePlus, or HeidiSQL:
CREATE DATABASE wp_scottsdale CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Step 5: Import the Databaseโ
Use the db-sync tool to pull a sanitized copy of the production/staging database:
cd tools/db-sync
cp db-sync.conf.example db-sync.conf
# Edit db-sync.conf with your SSH/DB credentials
./db-sync.sh
The db-sync script:
- SSHs into the source environment (staging or production)
- Creates a mysqldump
- Imports it locally
- Runs search-replace for the local domain (
scottsdalemint.test)
See database tools documentation for full usage.
Step 6: Configure Herd Siteโ
Laravel Herd automatically detects the scottsdalemint directory and creates a site entry. Open the Herd UI, locate the site, and ensure PHP 8.4 is selected for it.
The site should be accessible at: https://scottsdalemint.test
Step 7: Build Theme Assetsโ
The suma-elementor theme uses Webpack Mix (Laravel Mix) for compiling SCSS and JavaScript:
cd web/app/themes/suma-elementor
npm install
npm run dev # Development build with source maps (watch mode)
npm run production # One-time production build (minified)
Build output goes to dist/css/ and dist/js/.
Step 8: (Optional) Build NFusion Price Chart Widgetโ
cd nfusion/live-price-chart
npm install
npm run dev
Step 9: Verify the Installationโ
- Visit
https://scottsdalemint.testโ the site should load. - Visit
https://scottsdalemint.test/wp/wp-adminโ WordPress admin should load. - Check WooCommerce โ Status for any environment issues.
- Verify Algolia connectivity: WP Admin โ Algolia Search โ Status.
Local Email Testing (MailHog)โ
In local development, all WordPress emails are routed to MailHog (SMTP on port 2525) instead of Mailgun. The environment configuration automatically sets this up when WP_ENV=local.
If you need MailHog, download the Windows binary from the MailHog releases page and run MailHog.exe. The web UI will be available at http://localhost:8025.
Redis (Local)โ
Redis is not required for local development (WP_CACHE=false in .env). If you want to test with Redis locally, install Memurai (a Redis-compatible server for Windows) and then add to .env:
WP_CACHE=true
WP_REDIS_CLIENT=phpredis
WP_REDIS_HOST=127.0.0.1
WP_REDIS_PORT=6379
WP_REDIS_COMPRESSION=none
Commonly Used WP-CLI Commandsโ
# Flush object cache
wp cache flush
# Regenerate Algolia indexes
wp algolia re-index
# Update DB schema after WC update
wp wc update
# Create admin user
wp user create admin [email protected] --role=administrator --user_pass=password
WP-CLI is configured in wp-cli.yml at the repository root.
Troubleshootingโ
| Issue | Solution |
|---|---|
| White screen of death | Enable WP_DEBUG=true in .env; check web/app/debug.log |
| 404 on all pages | Run wp rewrite flush or re-save Permalinks in Settings |
| Redis connection error | Set WP_CACHE=false locally, or verify Redis is running |
| Algolia indexing error | Check ALGOLIA_APPLICATION_ID and ALGOLIA_API_KEY values |
| Composer auth error | Ensure auth.json is present in the repository root |
Patches fail on composer install | Ensure cweagans/composer-patches is installed; run composer update --lock |
| Payment gateway not showing | Ensure the gateway is enabled in WooCommerce โ Settings โ Payments |