Skip to content

Upgrading & Uninstalling

Before uninstalling Contacts, export your contacts, organizations, and notes, and confirm no installed downstream module (such as Campaign, Payments, Commerce, Charter, or Tour) still requires Contacts.

  1. Export contacts and organizations to portable JSON or CSV files:

    Terminal window
    php vendor/bin/wire contacts:export --type=contacts --format=json --output-file=contacts-backup.json --json
    php vendor/bin/wire contacts:export --type=organizations --format=json --output-file=organizations-backup.json --json
    php vendor/bin/wire contacts:export --type=notes --format=json --output-file=notes-backup.json --json
  2. Remove custom hooks or field references pointing to Contacts::*, contact / organization relation pickers, or $contacts->resolveUserSubject().

  3. Uninstall ProcessContacts first, then Contacts:

    Terminal window
    php vendor/bin/wire module:uninstall ProcessContacts --json
    php vendor/bin/wire module:uninstall Contacts --json

What Contacts::___uninstall() Removes vs. Preserves

Section titled “What Contacts::___uninstall() Removes vs. Preserves”
Artifact Action on Uninstall Details
Directory Collections & Singleton (contacts-contacts, contacts-organizations, contacts-notes, contacts-roles, contacts-tags, contacts-settings, contacts-consent) Purged Removed via $entries->purgeTypes($ownedTypes, 'contacts'); child channels/addresses/memberships owned by purged directory roots cascade-delete automatically.
Public Composable Fieldsets & Shared Block Schemas (contacts-profile, contacts-organization, contacts-memberships, plus contacts-channel, contacts-address, contacts-membership records embedded on Pages/Users) Preserved Unregistered from the schema registry without deleting embedded Page/User profile records so uninstalling Contacts never wipes user template data.
Permissions (contacts-admin, contacts-manage, contacts-view) Removed Deleted from ProcessWire permissions.
Admin Page (Setup -> Contacts) Removed Removed when ProcessContacts uninstalls.
Deferred React Registrations & Pull-Discovery Caches Cleared Cleared cleanly via React::forgetDeferredRegistrations() and resetPullDiscoveryCache().

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-contacts
    php vendor/bin/wire module:refresh
    php vendor/bin/wire contacts:doctor --json

Next steps