Upgrading & Uninstalling
AI ships with self-healing schema checks (ai:doctor) for upgrades and a complete cleanup routine in Ai::___uninstall() when removing the module.
Upgrading Ai
Section titled “Upgrading Ai”Always take a database backup (php vendor/bin/wire db:backup) before upgrading in production.
-
Update the package and refresh modules so ProcessWire runs
___upgrade()automatically:Terminal window composer update trk/processwire-aiphp vendor/bin/wire module:refreshphp vendor/bin/wire ai:doctor --json
- Open Setup -> Upgrades (with
ProcessWireUpgrade) or navigate to Modules -> New and use Add Module from Directory (Ai), Add Module from URL, or Add Module from Upload (ZIP archive) to replace the module files (ensureneuron-core/neuron-aiinvendor/autoload.phpmeets the new version requirement). - Click Modules -> Refresh so ProcessWire detects the new version and executes
___upgrade()automatically.
- Replace
site/modules/Ai/with the new release directory (ensureneuron-core/neuron-aiinvendor/autoload.phpmeets the new version requirement). - Open Modules -> Refresh in the ProcessWire Admin (or run
php vendor/bin/wire module:refresh) so___upgrade()executes cleanly.
Uninstalling AI
Section titled “Uninstalling AI”-
Remove
$ai/Ai::requireInstance()/renderChatWidget()calls from your templates and customsite/ai/assistants/classes, and remove anyInputfieldAiChatfields from your templates. -
Uninstall companion modules and
Ai:Terminal window php vendor/bin/wire module:uninstall InputfieldAiChatphp vendor/bin/wire module:uninstall ProcessAiphp vendor/bin/wire module:uninstall Ai -
Remove the Composer package (optional):
Terminal window composer remove trk/processwire-ai
What Ai::___uninstall() Cleans Up Automatically
Section titled “What Ai::___uninstall() Cleans Up Automatically”When Ai::___uninstall() executes, it removes:
- All 3
AiTablesSQL tables (entries_tbl_ai_usage_logs,entries_tbl_ai_conversations,entries_tbl_ai_mcp_logs). - All 7
AiBlueprints(ai-connections,ai-settings,ai-assistants,ai-rules,ai-voices,ai-glossaries,ai-mcp-keys) and their stored entries. - The local vector store and cache directory
site/assets/cache/ai/(includingvectors.sqlite) and generated artifact directorysite/assets/cache/ai-artifacts/. - All 5 RBAC permissions (
ai-admin,ai-use,ai-translate,ai-image,ai-audit).