Operations
Health monitoring, ephemeral storage, logging, and practical guidance for running the site day to day.
Health Monitoring
The /healthz endpoint is a health check provided by the healthz.php mu-plugin. In its default mode, it returns a 200 response after verifying database connectivity (SELECT 1). With ?detail it also checks Redis, OPcache, disk space, and cron health. Use this endpoint for uptime monitoring — a 200 response confirms the application and database are both responding.
Uptime Monitoring Setup
Point your monitoring service (Uptime Robot, Uptime Kuma, etc.) at:
https://whallc.com/healthzThe endpoint bypasses both Cloudflare WAF rules and cache rules, so a 200 response means the origin server is actually handling requests — not just Cloudflare serving a cached page.
Do's and Don'ts
| Do | Don't |
|---|---|
Monitor /healthz — it hits the origin directly | Monitor the homepage — Cloudflare may serve a cached 200 even if the origin is down |
| Set check intervals to 1–5 minutes | Check more frequently than every minute — it's unnecessary and adds load |
| Alert on consecutive failures (2–3) | Alert on a single failure — transient network blips cause false alarms |
| Monitor both production and staging | Assume staging is fine because production is up — they're separate deployments |
Ephemeral Storage
Heroku dynos have an ephemeral filesystem. Any files written to disk during runtime are lost when the dyno restarts, which happens:
- On every deploy
- At least once every 24 hours (Heroku's daily dyno cycling)
- When scaling or restarting manually
What This Means
- Media uploads must go to S3. The
yax-offload-mediaplugin handles this automatically — uploads are written to S3 and URLs are rewritten. Files are not stored on the dyno filesystem. - Don't rely on local file writes. Anything that writes to
/tmpor the filesystem (log files, generated reports, cached files) will disappear on restart. - WordPress core and plugins are part of the deploy artifact. They're baked into the
dist/build, not installed at runtime. This is why the build step exists — everything the application needs is in the artifact. composer installruns on container startup. The entrypoint script ensures dependencies are present, but this is a safety net — the deploy artifact should already be complete.
Common Pitfalls
- Poorly coded plugins — Any plugin that uses the WordPress upload API will work fine —
yax-offload-mediahandles the S3 offloading automatically. Problems only arise with plugins that bypass the upload API and write directly to the filesystem. - WordPress debug log —
wp-content/debug.logis written to the ephemeral filesystem. It's useful for debugging during a session but don't rely on it persisting. Useheroku logsinstead. - Scheduled tasks — WP-Cron runs on page visits. If the site has low traffic, cron jobs may not fire reliably. Heroku Scheduler or an external cron service is more reliable for critical tasks.
Logging
Heroku Logs
Application logs are available via the Heroku CLI:
# Tail all logs
heroku logs --tail --app womens-healthcare-associates
# Filter to web process
heroku logs --tail --app womens-healthcare-associates --ps web
# Recent logs (last 1500 lines)
heroku logs -n 1500 --app womens-healthcare-associatesLocal Development
# All container logs
npm run logs
# Specific service
npm run logs:wordpress
npm run logs:nginx
npm run logs:db
# Log viewer UI
# Dozzle at localhost:8888What Gets Logged
- Nginx — Access logs and error logs. Shows request URLs, response codes, and upstream PHP-FPM errors.
- PHP-FPM — PHP errors, warnings, and notices. Controlled by
WORDPRESS_DEBUGandWORDPRESS_DEBUG_LOGenv vars. - WordPress — When
WP_DEBUG_LOGis enabled, WordPress writes towp-content/debug.log(ephemeral on Heroku). - yax-audit-log — Tracks admin actions (post edits, plugin changes, option updates) in the database, not the filesystem.
Deploys
Pre-Deploy Checklist
- Theme assets built? Run
npm run productionin the theme directory if CSS/JS changed. Commitassets/dist/. - Tests pass? Run
npm testif Playwright tests exist for the feature. - Staging verified? Merge to
stagingfirst, verify on staging.whallc.com. - Database changes? If the deploy requires database changes (new options, updated ACF field groups), plan for those separately — the deploy only ships code.
Post-Deploy Verification
- Check
/healthzreturns 200 - Spot-check key pages (homepage, provider listing, a provider detail page)
- Check the browser console for JS errors
- If Cloudflare cache is stale, purge it
Rollback
Heroku keeps previous releases. To roll back:
# See recent releases
heroku releases --app womens-healthcare-associates
# Roll back to previous release
heroku rollback --app womens-healthcare-associatesScheduled Tasks
WordPress cron (wp-cron.php) is triggered by page visits. On a site with moderate traffic this is usually fine, but be aware:
- Low-traffic periods (nights, weekends) may delay scheduled tasks
- Long-running tasks can time out on Heroku's 30-second request limit
- The
wp-crontrolplugin is installed for viewing and managing scheduled events in wp-admin
Database
Backups
Amazon RDS handles database backups. For manual exports:
# Export via WP-CLI (local dev)
npm run wp -- db export backup.sql
# Import
npm run wp -- db import backup.sqlSearch and Replace
When migrating data between environments, URLs need to be rewritten. The better-search-replace and search-and-replace plugins handle this in wp-admin. For CLI:
npm run wp -- search-replace 'https://whallc.com' 'https://whallc.joeyyax.dev' --dry-runAlways run with --dry-run first.
Version Control
All code changes go through Git. The branch workflow and what's tracked are documented in Deployment. Key points:
- Never edit files directly on the server — ephemeral storage means changes are lost on the next deploy
- Always commit compiled theme assets (
assets/dist/) after runningnpm run production - Always commit
composer.lock— it pins exact dependency versions
Managed Services
| Service | Status |
|---|---|
| Media optimization | Active — images optimized for web delivery |
| Uptime monitoring | Active — /healthz endpoint monitored, alerts on downtime |
| Error monitoring | Active — application errors captured via GlitchTip |
| Daily offsite backups | Active — database backups stored offsite |
| Social feed | Active — aggregated social media feed |
See Contacts for support and escalation information.