Skip to content

Upgrading & Uninstalling

Htmx creates zero database tables, zero custom templates or fields, and zero custom ProcessWire permissions. Its only persistent artifacts are compiled shape and render cache files inside site/assets/cache/Htmx/.

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-htmx
    php vendor/bin/wire module:refresh
  1. Remove $htmx / $htmxCache references from site/ready.php, site/templates/, and any custom Ui or Component classes you no longer need.

  2. Uninstall the module from Modules -> Site -> Htmx -> Uninstall or via CLI:

    Terminal window
    php vendor/bin/wire module:uninstall Htmx
  3. Remove the Composer package (optional):

    Terminal window
    composer remove trk/processwire-htmx

What ___uninstall() Cleans Up Automatically

Section titled “What ___uninstall() Cleans Up Automatically”

When Htmx::___uninstall() runs, it automatically:

  • Calls $this->wire()->htmxCache->clear() to purge all compiled UI shapes, component schemas, and render caches.
  • Removes site/assets/cache/Htmx/ and any legacy site/assets/cache/HtmxCache/ directory from disk.
  • Leaves your custom site/templates/components/ and site/templates/ui/ source files untouched so no project code is lost.

Next steps