WHA Docs

Hosting

Hosting requirements, current setup, environment variables, and platform-specific configuration.

Requirements

The build process produces a standard WordPress installation in dist/. This 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, Dokploy, 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 — the yax-offload-media plugin handles this automatically
  • Environment variables for configuration — see Environment Variables below

Supported When Available

The codebase supports these services, but they are not required:

  • Redis — enables the object cache via yax-performance. Without it, WordPress falls back to per-request caching.
  • Meilisearch — enables full-text search via yax-meilisearch. Without it, WordPress uses default MySQL LIKE queries.

Current Setup (Heroku)

PropertyProductionStaging
App namewomens-healthcare-associateswha-staging
Domainwhallc.comstaging.whallc.com, whallc.joeyyax.dev
DatabaseAmazon RDS (MySQL)Amazon RDS (MySQL)
Media storageAmazon S3Amazon S3
SSLHeroku ACM (auto-managed)Heroku ACM
Deploy methodDocker build via heroku.ymlDocker 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

FilePurpose
heroku.ymlTells Heroku to build from Dockerfile instead of using a buildpack
DockerfileMulti-stage build that produces the production container
tools/entrypoint-prod.shContainer 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 — 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:set or the dashboard
  • Docker hosts: set in the compose file or container runtime

Core Variables

VariableExampleNotes
WORDPRESS_DB_HOSTdb:3306Database host
WORDPRESS_DB_NAMEwordpressDatabase name
WORDPRESS_DB_USERwordpressDatabase user
WORDPRESS_DB_PASSWORD(secret)Database password
WORDPRESS_TABLE_PREFIXwp_Table prefix
WORDPRESS_DEBUGfalseNever enable on production

Services

VariableExampleNotes
REDIS_HOSTredisRedis hostname (when available)
REDIS_PORT6379Redis port
S3_UPLOADS_BUCKETwha-mediaS3/R2 bucket name
S3_UPLOADS_REGIONus-west-2AWS region (or auto for R2)
S3_UPLOADS_KEY(secret)Storage access key
S3_UPLOADS_SECRET(secret)Storage secret key
S3_UPLOADS_ENDPOINThttps://...Custom endpoint (required for R2, optional for S3)
MAPBOX_ACCESS_TOKENpk.ey...Mapbox GL JS for maps

PHP Tuning

VariableExampleNotes
PHP_MEMORY_LIMIT256MPHP memory limit
PHP_MAX_EXECUTION_TIME600Max execution time (seconds)
PHP_UPLOAD_MAX_FILESIZE64MMax upload file size
PHP_POST_MAX_SIZE64MMax POST body size

Operations

VariableExampleNotes
WORDPRESS_BLOCK_PLUGINSdebug-bar query-monitorPlugins to physically remove on container start
WORDPRESS_DEBUG_LOGfalseWrite 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, Dokploy, 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.

On this page