WHA Docs
Infrastructure

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-media plugin) 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-performance plugin). Without it, WordPress falls back to per-request caching.
  • Meilisearch — powers full-text search (the yax-meilisearch plugin). 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, 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: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, 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