Skip to content

Upgrading & Uninstalling

Blocks creates no custom SQL tables. Its Blocks::___uninstall() routine delegates full cleanup to UninstallCleaner::uninstall().

Always take a database backup (php vendor/bin/wire db:backup) before upgrading in production.

  1. Update the package and refresh modules so ProcessWire runs ___upgrade() automatically:

    Terminal window
    composer update trk/processwire-blocks
    php vendor/bin/wire module:refresh
    php vendor/bin/wire blocks:doctor --json
  1. Detach FieldtypeBlocks fields from templates (optional)

    Open Setup > Templates, remove any FieldtypeBlocks fields from your templates, and save.

  2. Uninstall Blocks

    Run via ProcessWire Console:

    Terminal window
    php vendor/bin/wire module:uninstall --name=Blocks

    Or 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 via Entries::purgeTypes(), clears entries_history snapshots and orphaned media directories, flushes WireCache (Blocks.*), removes blocks logs, removes blocks and blocks-admin permissions, and removes unattached blocks fields.
  3. Remove the Composer package (optional)

    Terminal window
    composer remove trk/processwire-blocks

Next steps