Skip to content

Production Deployment Checklist

Before launching a ProcessWire 3 site running trk/ modules to production, walk through this operational checklist so background tasks, webhooks, media pipelines, and security boundaries run reliably.

Several modules rely on trk/processwire-console for scheduled maintenance (AccountPruneTask, ExpireCharterHoldsTask, ContactsRetentionTask, PruneAiUsageLogsTask, Currency FX sync) and background queues (BulkTranslateQueue, DeliverHeadlessWebhookQueue, ExportProfileQueue, VectorIndexQueue, Campaign sendouts):

  1. Schedule ProcessWire’s cron runner every minute:

    Terminal window
    * * * * * cd /var/www/aegeanvoyages.example && /usr/bin/php vendor/bin/wire schedule:run >> /var/log/pw-schedule.log 2>&1
  2. Run a supervised background queue worker (systemd or supervisord):

    Terminal window
    php vendor/bin/wire queue:work --tries=3 --sleep=3 --max-time=3600
  3. Verify queue and schedule health from Setup -> Console (or via CLI):

    Terminal window
    php vendor/bin/wire schedule:list --json
Requirement Production Recommendation
PHP Version 8.4+ with OPcache enabled (opcache.validate_timestamps=0 on immutable deploys).
Required Extensions ext-pdo_mysql (or pdo_sqlite), ext-curl, ext-openssl, ext-mbstring, ext-bcmath (Currency), ext-intl (Currency/Payments), ext-zip (ProcessReactExportProfile/Packages).
Fast Image Processing Install libvips + ext-ffi (ffi.enable=true or preload) for InterventionImage so WebP/AVIF encoding uses minimal RAM.
Strong userAuthSalt Keep $config->userAuthSalt >= 32 random characters in site/config.php (used by Htmx HKDF state signing, Charter HMAC proposals, and Account).
  • Remove dev hot files: Never deploy site/templates/hot (or any Vite hotFile) to production; add it to .gitignore so Vite always serves hashed manifest bundles.

  • Keep $config->debug = false: Disables TracyDebugger bars, stack traces, and verbose debug headers in production.

  • Clear compiled caches on deploy:

    Terminal window
    php vendor/bin/wire cache:clear
    php vendor/bin/wire htmx:cache:clear --force --json
Area Action
CORS & CSP Replace wildcard * in Setup -> Headless -> Settings -> CORS Origins with exact production origins; pass per-request CSP nonces via vite()->copy()->useNonce($nonce).
Secrets Store API keys via $env:VAR_NAME references or encrypted SecretBox / write-only fields. Verify zero leaks with php vendor/bin/wire profile:audit --json.
RBAC Separation Assign least-privilege role permissions (ai-use instead of ai-admin, charter-manage instead of charter-admin, per-section wire-console-*).
Automated Backups Schedule regular SQL snapshots (php vendor/bin/wire db:backup) and prune aged dumps (php vendor/bin/wire backup:purge --days=30).

5. Installing 6-Locale Translation Packs (languages/*.csv)

Section titled “5. Installing 6-Locale Translation Packs (languages/*.csv)”

Most trk/ modules ship bundled 6-locale CSV translation packs (en, tr, de, fr, es, ru) inside site/modules/<Module>/languages/:

  1. Install ProcessWire core LanguageSupport (Modules -> Core -> Language Support).
  2. Create or open your target language under Setup -> Languages -> [Language].
  3. Under Site Translation Files, upload or select the matching <locale>.csv file from site/modules/<Module>/languages/ (for example tr.csv or de.csv) and click Save.
  4. Both server-rendered ProcessWire screens and React workspace interfaces immediately pick up the active user’s language.

Never serve cached HTML across users for routes containing per-session CSRF tokens, signed state payloads, or authenticated member data. Exclude these URL prefixes from ProCache, Varnish, or CDN HTML caching:

Module Routes / Pages to Exclude From Full-Page HTML Cache
Account /auth/*, /account/*
Forms /_forms/* (or enable AJAX token fetch so FormsFrontend.js requests /_forms/token/{slug} dynamically)
Htmx /hx/req (and any dynamic Component endpoints)
Payments /pay/*, /_payments/*
Packages /portal/*, /composer/*, /packages/api/*
Ai /_ai/*
Headless /api/*
Campaign /_campaign/*

Protect private storage directories from direct HTTP downloads and forward Authorization headers to PHP-FPM/FastCGI:

nginx.conf
# Block direct downloads of Packages release ZIPs and Media private vaults
location ^~ /site/assets/packages/ {
return 403;
}
location ^~ /site/assets/files/media-vault/ {
return 403;
}
.htaccess (Apache / FastCGI)
# Preserve Authorization: Bearer headers for Headless API and Packages Composer auth
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

8. Dev -> Staging -> Production Deployment Workflow

Section titled “8. Dev -> Staging -> Production Deployment Workflow”
  • Commit to Git: File-backed Entries blueprints (site/entries/*.yaml), Forms blueprints (site/forms/*.yaml), Blocks definitions (site/blocks/), Navigation exported JSON menus, schema migrations (site/migrations/), and compiled Vite bundles (site/templates/build/).
  • Keep out of Git (use $env:VAR): API keys, webhook secrets, SMTP passwords, OAuth client secrets, and database credentials. Reference them in module settings as $env:STRIPE_SECRET_KEY, $env:OPENROUTER_API_KEY, etc.
  • On every deploy: Run php vendor/bin/wire migrate --force, php vendor/bin/wire cache:clear, and your module doctor checks (entries:doctor, payments:doctor, seo:audit, ai:doctor) with --json.

Next steps