Skip to content

Upgrading & Uninstalling

Before uninstalling Campaign from a production site, export any required subscriber lists and decide whether you want to anonymize or archive historical delivery logs.

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-campaign
    php vendor/bin/wire module:refresh
    php vendor/bin/wire campaign:doctor --json
  1. Export active subscribers for each mailing list so you retain consent records:
Terminal window
php vendor/bin/wire campaign:export --list=aegean-voyages --status=all --output-file=aegean-subscribers.csv --json
  1. Disable inbound ESP webhooks at your email provider dashboard (Amazon SES, Postmark, Mailgun, SendGrid, Resend, Brevo, or MailerSend) so providers do not continue posting to /_campaign/webhook/{provider} after the module is removed.
  2. Remove scheduled cron hooks or custom PHP hooks referencing Campaign::* in site/ready.php or custom modules.
  3. Optional GDPR anonymization: If you are decommissioning the marketing database permanently, anonymize historical tracking and recipient rows first:
Terminal window
php vendor/bin/wire campaign:anonymize --older-than=0 --force --json

Because ProcessCampaign depends on Campaign, uninstall ProcessCampaign first, then Campaign:

  1. Open Modules > Site in the ProcessWire Admin.
  2. Click ProcessCampaign, check Uninstall, and submit.
  3. Click Campaign, check Uninstall, and submit.

Or via the ProcessWire Console CLI:

Terminal window
php vendor/bin/wire module:uninstall ProcessCampaign --json
php vendor/bin/wire module:uninstall Campaign --json
Artifact Behavior on Uninstall Notes
Managed SQL Tables (campaign_subscriptions, campaign_sendout_recipients, campaign_events, campaign_suppressions, campaign_links) Dropped Removed cleanly by Campaign::___uninstall() via CampaignTables::dropTables().
RBAC Permissions (campaign-admin, campaign-manage, campaign-view) Removed Deleted from ProcessWire permissions when Campaign uninstalls.
Admin Page (Setup > Campaigns) Removed Deleted when ProcessCampaign uninstalls.
Module Cache & Metadata Cleared Any WireCache entries scoped to Campaign are purged.
Contacts Records (Contacts module) Preserved Underlying contact profiles in Contacts remain intact for Forms, Account, Commerce, or other modules.
Custom Email Templates (site/templates/campaigns/*.php) Preserved Your project template files on disk are never deleted.

If you also want to remove the Entries blueprints or seeded entries created during testing, run the repository cleanup or delete the campaign-* entries from Setup > Entries while Entries remains installed.

Next steps