Hosting
Hosting requirements, current setup, environment variables and platform-specific configuration.
Requirements
The build process produces a standard WordPress installation in dist/. It can run on:
- Any standard PHP/WordPress host (shared hosting, WP Engine, etc.) — just upload
dist/and point the domain at it - Docker-based platforms (Heroku, Railway, Render, etc.) using the included
Dockerfile
Minimum requirements:
- PHP with a MySQL-compatible database
- External media storage (S3, R2 or equivalent) if the host has ephemeral storage. Media offloading (the
yax-offload-mediaplugin) handles this automatically. - Environment variables for configuration. See Environment variables below.
Supported when available
The codebase supports these services but doesn't require them:
- Redis — backs the object cache / performance layer (the
yax-performanceplugin). Without it, WordPress falls back to per-request caching. - Meilisearch — powers full-text search (the
yax-meilisearchplugin). Without it, WordPress uses default MySQLLIKEqueries.
Current setup (Heroku)
| Property | Production | Staging |
|---|---|---|
| App name | womens-healthcare-associates | wha-staging |
| Domain | whallc.com | staging.whallc.com, whallc.joeyyax.dev |
| Database | Amazon RDS (MySQL) | Amazon RDS (MySQL) |
| Media storage | Amazon S3 | Amazon S3 |
| SSL | Heroku ACM (auto-managed) | Heroku ACM |
| Deploy method | Docker build via heroku.yml | Docker build via heroku.yml |
Heroku builds the Docker image from the Dockerfile on each git push. It's not using a buildpack. The heroku.yml file tells Heroku to build and run the container directly.
Heroku-specific files
| File | Purpose |
|---|---|
heroku.yml | Tells Heroku to build from Dockerfile instead of using a buildpack |
Dockerfile | Multi-stage build that produces the production container |
tools/entrypoint-prod.sh | Container entrypoint — starts PHP-FPM + Nginx, reads PORT |
Heroku limitations
- Single process per dyno — PHP-FPM and Nginx must run in the same container. The entrypoint script handles this.
- Ephemeral filesystem — files written at runtime are lost on restart. Media must go to S3. See Operations > Ephemeral storage.
- No Redis/Meilisearch without paid add-ons or external services.
- 30-second request timeout — long-running operations (imports, bulk updates) may time out.
Environment variables
All WordPress configuration comes from environment variables. Nothing is hardcoded, so the same container image runs in any environment by changing the env vars.
How they work
wp-config.custom.php reads every setting via getenv_docker(), which checks environment variables with fallback defaults. This means:
- Local dev: set in
.env(loaded by Docker Compose) - Heroku: set via
heroku config:setor the dashboard - Docker hosts: set in the compose file or container runtime
Core variables
| Variable | Example | Notes |
|---|---|---|
WORDPRESS_DB_HOST | db:3306 | Database host |
WORDPRESS_DB_NAME | wordpress | Database name |
WORDPRESS_DB_USER | wordpress | Database user |
WORDPRESS_DB_PASSWORD | (secret) | Database password |
WORDPRESS_TABLE_PREFIX | wp_ | Table prefix |
WORDPRESS_DEBUG | false | Never enable on production |
Services
| Variable | Example | Notes |
|---|---|---|
REDIS_HOST | redis | Redis hostname (when available) |
REDIS_PORT | 6379 | Redis port |
S3_UPLOADS_BUCKET | wha-media | S3/R2 bucket name |
S3_UPLOADS_REGION | us-west-2 | AWS region (or auto for R2) |
S3_UPLOADS_KEY | (secret) | Storage access key |
S3_UPLOADS_SECRET | (secret) | Storage secret key |
S3_UPLOADS_ENDPOINT | https://... | Custom endpoint (required for R2, optional for S3) |
MAPBOX_ACCESS_TOKEN | pk.ey... | Mapbox GL JS for maps |
PHP tuning
| Variable | Example | Notes |
|---|---|---|
PHP_MEMORY_LIMIT | 256M | PHP memory limit |
PHP_MAX_EXECUTION_TIME | 600 | Max execution time (seconds) |
PHP_UPLOAD_MAX_FILESIZE | 64M | Max upload file size |
PHP_POST_MAX_SIZE | 64M | Max POST body size |
Operations
| Variable | Example | Notes |
|---|---|---|
WORDPRESS_BLOCK_PLUGINS | debug-bar query-monitor | Plugins to physically remove on container start |
WORDPRESS_DEBUG_LOG | false | Write debug output to file (ephemeral on Heroku) |
Deploying to other platforms
The dist/ output is a standard WordPress installation. It can be deployed to:
Standard PHP hosts
Upload dist/ to any PHP host (shared hosting, WP Engine, managed WordPress, etc.). Set up the database, configure wp-config.php environment variables and point the domain. No Docker required.
Docker-based hosts
The included Dockerfile builds a production container. Point any Docker host (Railway, Render, Coolify, etc.) at the Git repo, set the environment variables and map a domain. The container handles everything: Nginx listens on PORT, PHP-FPM starts automatically.
What changes between platforms
The codebase doesn't change, only environment variables and infrastructure. Database, media storage and optional services (Redis, Meilisearch) are configured entirely through env vars.