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/.
Upgrading Htmx
Section titled “Upgrading Htmx”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-htmxphp vendor/bin/wire module:refresh
- Open Setup -> Upgrades (with
ProcessWireUpgrade) or navigate to Modules -> New and use Add Module from Directory (Htmx), 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/Htmx/with the new release directory. - Open Modules -> Refresh in the ProcessWire Admin (or run
php vendor/bin/wire module:refresh) so___upgrade()executes cleanly.
Uninstalling Htmx
Section titled “Uninstalling Htmx”-
Remove
$htmx/$htmxCachereferences fromsite/ready.php,site/templates/, and any customUiorComponentclasses you no longer need. -
Uninstall the module from Modules -> Site -> Htmx -> Uninstall or via CLI:
Terminal window php vendor/bin/wire module:uninstall Htmx -
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 legacysite/assets/cache/HtmxCache/directory from disk. - Leaves your custom
site/templates/components/andsite/templates/ui/source files untouched so no project code is lost.