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.
Upgrading Campaign
Section titled “Upgrading Campaign”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-campaignphp vendor/bin/wire module:refreshphp vendor/bin/wire campaign:doctor --json
- Open Setup -> Upgrades (with
ProcessWireUpgrade) or navigate to Modules -> New and use Add Module from Directory (Campaign), 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/Campaign/with the new release directory. - Open Modules -> Refresh in the ProcessWire Admin (or run
php vendor/bin/wire module:refresh) so___upgrade()executes cleanly.
Pre-Uninstall Checklist
Section titled “Pre-Uninstall Checklist”- Export active subscribers for each mailing list so you retain consent records:
php vendor/bin/wire campaign:export --list=aegean-voyages --status=all --output-file=aegean-subscribers.csv --json- 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. - Remove scheduled cron hooks or custom PHP hooks referencing
Campaign::*insite/ready.phpor custom modules. - Optional GDPR anonymization: If you are decommissioning the marketing database permanently, anonymize historical tracking and recipient rows first:
php vendor/bin/wire campaign:anonymize --older-than=0 --force --jsonUninstalling via ProcessWire Admin or CLI
Section titled “Uninstalling via ProcessWire Admin or CLI”Because ProcessCampaign depends on Campaign, uninstall ProcessCampaign first, then Campaign:
- Open Modules > Site in the ProcessWire Admin.
- Click ProcessCampaign, check Uninstall, and submit.
- Click Campaign, check Uninstall, and submit.
Or via the ProcessWire Console CLI:
php vendor/bin/wire module:uninstall ProcessCampaign --jsonphp vendor/bin/wire module:uninstall Campaign --jsonWhat ___uninstall() Removes vs. Preserves
Section titled “What ___uninstall() Removes vs. Preserves”| 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. |
Post-Uninstall Cleanup
Section titled “Post-Uninstall Cleanup”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.