PHP API, Hooks & Troubleshooting
Resolve the runtime in PHP via $console = $this->wire()->modules->get('ProcessWireConsole'); $runtime = $console->runtime(); or directly via Totoglu\WireConsole\ConsoleRuntime::make($this->wire()).
ProcessWireConsole Hookable Methods
Section titled “ProcessWireConsole Hookable Methods”| Hook | Arguments & Return | Timing | What It Does |
|---|---|---|---|
ProcessWireConsole::translations |
(): array |
After | Returns the nested UI translation catalog rendered by the Setup -> Console React workspace. |
Standard ProcessWire admin route endpoints (___execute, ___executeMigrations, ___executeQueues, ___executeSeeding, ___executeScheduling, ___executeBackup, ___executeTesting, ___executeBoost, ___executeLogs, ___executeAction, ___executeNavJSON, ___executeDownloadBackup) are also hookable for custom audit logging or access gates.
Customize Console Workspace Labels
Section titled “Customize Console Workspace Labels”<?php
declare(strict_types=1);
namespace ProcessWire;
$wire->addHookAfter('ProcessWireConsole::translations', function (HookEvent $event): void { $strings = (array) $event->return; $strings['overview.title'] = 'Aegean Operations Console'; $event->return = $strings;});ConsoleRuntime Core & Subsystem Methods
Section titled “ConsoleRuntime Core & Subsystem Methods”| Subsystem | Key Public Methods |
|---|---|
| Core & RBAC | make(), getTabDefinitions(), getAccessibleTabs(), searchCommandPalette(), userCanView(), userCanInspectCategory(), isSuperuser(), isDemoMode(), getPackagesStatus(), getOverviewTelemetry(), buildWorkspacePayload(), executeWorkspaceAction(), checkRateLimit(), audit() |
| Migrations | migrationsTableExists(), installMigrationsTable(), getMigrationsStatus(), runMigrations(), rollbackMigrations(), resetMigrations() |
| Queues | queueTablesExist(), installQueueTables(), getQueuesSummary(), getQueuesStatus(), purgePendingJobs(), retryFailedJobs(), clearFailedJobs(), deleteFailedJob(), workQueueBatch(), dispatchQueueJob() |
| Seeding & Scheduling | hasFaker(), getDiscoveredSeeders(), runSeeders(), getScheduledTasks(), runScheduledTasks() |
| Backups | getBackupDirectory(), listBackups(), resolveBackupFilePath(), createBackup(), purgeBackups(), restoreBackup() |
| Testing | getDiscoveredTestFiles(), getTestingEnvironment(), sanitizeTestArgs(), sanitizeE2eArgs(), resolvePhpCliBinary(), runTests(), runE2eTests(), initPlaywrightE2e() |
| Boost & MCP | getReadOnlyMcpToolNames(), executeReadOnlyMcpTool(), getMcpServerDiagnostics(), getBoostStatus(), syncBoost(), configureBoost(), installRemoteBoostSkills() |
| Scaffolding & Inspector | isValidIdentifier(), scaffoldComponentFile(), inspectProjectFile() |
| System & Logs | getVersionMatrix(), getMaintenanceFilePath(), getMaintenanceStatus(), enableMaintenanceMode(), disableMaintenanceMode(), clearSystemCaches(), getLogChannels(), readLogEntries(), clearLogChannel(), clearAllLogChannels() |
Troubleshooting
Section titled “Troubleshooting”A Console Tab Redirects Back to Overview
Section titled “A Console Tab Redirects Back to Overview”Symptom: Clicking a section URL like ./backup/ or ./migrations/ renders the Overview tab instead.
Fix: ConsoleRuntime::buildWorkspacePayload() enforces per-section RBAC. Assign the matching wire-console-* permission (for example wire-console-migrations or wire-console-backup) to the user’s role.
SQL Backup Download Returns 403
Section titled “SQL Backup Download Returns 403”Symptom: A user with wire-console-backup receives a permission error when clicking Download on a .sql snapshot.
Fix: Raw SQL downloads and restores require an authenticated superuser account and $config->demo === false.
Action Blocked by Cooldown Rate Limit
Section titled “Action Blocked by Cooldown Rate Limit”Symptom: Repeating a cache flush, migration, or backup action within seconds returns a cooldown warning.
Fix: Wait for the per-session cooldown window enforced by checkRateLimit() to expire before re-running the action.