Upgrading & Uninstalling
Blocks creates no custom SQL tables. Its Blocks::___uninstall() routine delegates full cleanup to UninstallCleaner::uninstall().
Upgrading Blocks
Section titled “Upgrading Blocks”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-blocksphp vendor/bin/wire module:refreshphp vendor/bin/wire blocks:doctor --json
- Open Setup -> Upgrades (with
ProcessWireUpgrade) or navigate to Modules -> New and use Add Module from Directory (Blocks), Add Module from URL, or Add Module from Upload (ZIP archive) to replace the module files. - Click Modules -> Refresh so ProcessWire detects the new version and executes
___upgrade()automatically.
- Replace
site/modules/Blocks/with the new release directory. - Open Modules -> Refresh in the ProcessWire Admin (or run
php vendor/bin/wire module:refresh) so___upgrade()executes cleanly.
Uninstall Steps
Section titled “Uninstall Steps”-
Detach
FieldtypeBlocksfields from templates (optional)Open Setup > Templates, remove any
FieldtypeBlocksfields from your templates, and save. -
Uninstall
BlocksRun via ProcessWire Console:
Terminal window php vendor/bin/wire module:uninstall --name=BlocksOr open Modules > Configure > Blocks, expand Uninstall, check Uninstall, and click Submit.
UninstallCleaner::uninstall()automatically:- Detaches
/_blocks/*URL hooks, lifecycle hooks, and optional sibling integration bridges. - Calls
React::forgetDeferredRegistrations($this)so Workspace preferences reconcile cleanly. - Purges
blocks-*governance entries viaEntries::purgeTypes(), clearsentries_historysnapshots and orphaned media directories, flushesWireCache(Blocks.*), removesblockslogs, removesblocksandblocks-adminpermissions, and removes unattachedblocksfields.
- Detaches
-
Remove the Composer package (optional)
Terminal window composer remove trk/processwire-blocks