Upgrading & Uninstalling
Headless uses zero custom SQL tables; all settings, keys, tokens, and webhooks live inside its four hidden Entries blueprints (headless, headless-keys, headless-tokens, headless-webhooks).
Upgrading Headless
Section titled “Upgrading Headless”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-headlessphp vendor/bin/wire module:refresh
- Open Setup -> Upgrades (with
ProcessWireUpgrade) or navigate to Modules -> New and use Add Module from Directory (Headless), 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/Headless/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 Headless
Section titled “Uninstalling Headless”-
Remove
$headless->doHeadless()andHeadless::registerProvidershooks fromsite/ready.phpand any custom providers. -
Uninstall
ProcessHeadlessandHeadless:Terminal window php vendor/bin/wire module:uninstall ProcessHeadlessphp vendor/bin/wire module:uninstall Headless -
Remove the Composer package (optional):
Terminal window composer remove trk/processwire-headless
What Headless::___uninstall() Cleans Up Automatically
Section titled “What Headless::___uninstall() Cleans Up Automatically”- Detaches all lifecycle hooks (
removeLifecycleHooks()). - Purges all 4
HeadlessBlueprintstypes via$entries->purgeTypes(HeadlessBlueprints::allTypes(), ['headless']). - Clears
Headless,HlSecurity(HmacGuard::CACHE_NAMESPACE), andHlRateLimit(RateLimiter::CACHE_NAMESPACE) cache namespaces. - Deletes the
headlessRBAC permission.