Skip to content

Testing, Backups & Maintenance

Command Arguments & Options Purpose
make:test <name>, --unit, --e2e, --module, --json Scaffolds a new Pest PHP unit/feature test or Playwright E2E spec file.
test [path], --json Executes Pest PHP unit and feature tests against a booted ProcessWire instance.
test:e2e --init, --module, --json Initializes Playwright (--init) or executes end-to-end browser and WCAG accessibility specs (--module=<Name>).
Terminal window
php vendor/bin/wire make:test CharterPricingTest --unit --json
php vendor/bin/wire test --json
php vendor/bin/wire test:e2e --module=Charter --json
Command Arguments & Options Purpose
db:backup --json Creates a timestamped .sql snapshot in site/assets/backups/database/.
db:restore --file, --dry-run, --force, --json Restores a .sql snapshot from site/assets/backups/database/ into the active database.
backup:list --limit, --json Lists available .sql database backup files with timestamps and byte sizes.
backup:purge --keep, --days, --dry-run, --force, --json Prunes old .sql backups by retention age (--days=30) or snapshot count (--keep=10).
Command Arguments & Options Purpose
down --redirect, --retry, --secret, --status, --json Places the site into maintenance mode by writing site/assets/maintenance.json with an optional bypass --secret and Retry-After header.
up --json Removes the maintenance file and restores normal public HTTP traffic.
Terminal window
php vendor/bin/wire down --secret=deploy-preview-2026 --retry=3600 --status=503 --json
php vendor/bin/wire up --json
Command Arguments & Options Purpose
cache:clear --json Clears ProcessWire template, module, FileCompiler, and page caches.
cache:wire:clear --key, --pattern, --json Clears targeted WireCache keys or wildcard patterns (--pattern="charter:*").
log:list --json Lists all ProcessWire log channels in site/assets/logs/.
log:read <name>, [limit], --limit, --from, --to, --find, --sort, --json Reads and filters entries from any ProcessWire log channel.
log:tail <name>, --lines, --follow, --json Tails the latest lines of a log channel (with optional --follow streaming).
log:clear <name>, --dry-run, --force, --json Truncates a single ProcessWire log file.
log:clear-all --dry-run, --force, --json Truncates all ProcessWire log files.
tinker [code], --json Opens an interactive ProcessWire PHP REPL or evaluates a one-line --json expression against the booted $wire instance.
version --json Prints active PHP, ProcessWire, and ProcessWire Console versions.

Next steps