How to Use Deactivation Cleanup in FlowMattic
FlowMattic’s Deactivation Cleanup feature lets you selectively delete plugin data before deactivating the plugin. This ensures a clean removal when you no longer need FlowMattic, while giving you full control over exactly what gets deleted.
Overview
When you deactivate FlowMattic from the WordPress Plugins page, a cleanup dialog appears allowing you to choose which data to remove. You can:
- Delete specific data — Select exactly which items to remove.
- Delete all data — Remove everything with the “Select All” option.
- Skip cleanup — Deactivate without deleting anything (data is preserved for reactivation).
- Cancel — Stay on the page without deactivating.
Important: Data deletion is irreversible. Once deleted, data cannot be recovered. Consider exporting your workflows before deleting if you might need them on another site.
When Does the Cleanup Dialog Appear?
The cleanup dialog appears only when you click the Deactivate link for FlowMattic on the WordPress Plugins page (Plugins > Installed Plugins).
It does not appear:
- When updating the plugin
- When deactivating other plugins
- Automatically on any schedule
Data Items You Can Delete
The cleanup dialog presents 8 categories of data you can select for deletion:
1. Workflows
All your automation workflows and their configurations.
- Shows the total number of workflows (e.g., “5 workflows”).
- Deleting this removes all workflow definitions, trigger configurations, and action steps.
2. Task History
Execution logs and task history records from all workflow runs.
- Shows the total number of task records.
- Deleting this removes all execution history, logs, and debug data.
3. Connections
API connections and authentication data (Gmail, Slack, OpenAI, etc.).
- Shows the total number of connections.
- Deleting this removes all stored API keys, OAuth tokens, and connection configurations.
4. Custom Tables
User-created database tables and their data.
- Shows the count of tables you’ve created using FlowMattic’s database feature.
- Deleting this removes both the table schemas and the actual data stored in those tables.
5. Plugin Database Tables
FlowMattic’s internal database tables (14 tables).
- These are the core tables FlowMattic uses to operate.
- Includes tables for workflows, tasks, connections, chatbot, variables, RSS feeds, IMAP accounts, data connections, email templates, MCP server, and more.
6. Plugin Settings & Options
All FlowMattic settings, license data, and configuration options.
- Shows the count of options stored in the WordPress database.
- Deleting this removes all plugin settings, license information, and stored preferences.
7. User Roles
FlowMattic-specific user roles and capabilities.
- Removes the
flowmattic_workflow_managercustom role. - Also removes FlowMattic-specific capabilities from the Administrator role (
manage_flowmattic,edit_flowmattic_workflows,delete_flowmattic_workflows,view_flowmattic_task_history).
8. Cached Data
Temporary cached data and transients.
- Removes all FlowMattic transients from the WordPress database.
- This is safe to delete and has no permanent impact.
How to Use Deactivation Cleanup
Step 1: Open the Cleanup Dialog
- Go to Plugins > Installed Plugins in your WordPress dashboard.
- Find FlowMattic in the plugin list.
- Click the Deactivate link.
- The cleanup dialog appears.
Step 2: Select Data to Delete
- Check individual items — Click the checkbox next to each data category you want to delete.
- Select All — Use the “Select All” checkbox at the top to select all 8 categories at once.
Each item shows a count badge indicating how much data will be affected (e.g., “5 workflows”, “14 tables”).
Step 3: Choose an Action
| Button | What Happens |
|---|---|
| Cancel | Dismisses the dialog. Nothing is deactivated or deleted. |
| Skip & Deactivate | Deactivates FlowMattic without deleting any data. All data is preserved. |
| Delete Selected & Deactivate | Deletes the selected items, then deactivates FlowMattic. |
Note: The “Delete Selected & Deactivate” button is disabled until you select at least one item.
Step 4: Confirm Deletion
After clicking “Delete Selected & Deactivate”, a confirmation prompt appears:
“Are you sure you want to delete the selected data? This cannot be undone.”
Click OK to proceed or Cancel to go back.
Step 5: Cleanup Completes
A progress indicator shows while data is being deleted. Once complete:
- A success message appears: “Data deleted successfully!”
- FlowMattic is automatically deactivated.
- You are returned to the Plugins page.
What Happens If You Skip Cleanup?
If you click Skip & Deactivate:
- FlowMattic is deactivated normally.
- All data is preserved in the database (workflows, connections, history, settings, etc.).
- If you reactivate FlowMattic later, all your data will still be there.
- This is the safe option if you’re temporarily deactivating or troubleshooting.
What Is NOT Deleted
Regardless of your cleanup selections, the following are never affected:
- WordPress core database and settings
- Other plugin data
- WordPress user accounts (except the FlowMattic custom role)
- Posts, pages, and custom post types
- Theme settings and configurations
- FlowMattic plugin files (these are removed only if you delete the plugin from WordPress)
Recommended Cleanup Scenarios
Temporary Deactivation (Troubleshooting)
If you’re deactivating FlowMattic temporarily to troubleshoot an issue:
- Click Skip & Deactivate.
- All data is preserved.
- Reactivate when ready — everything will be intact.
Permanent Removal
If you’re permanently removing FlowMattic and want a clean database:
- Check Select All to select all data categories.
- Click Delete Selected & Deactivate.
- Confirm the deletion.
- After deactivation, delete the plugin from the Plugins page.
Partial Cleanup
If you want to keep some data but remove others (e.g., keep workflows but delete task history):
- Select only the items you want to delete.
- Click Delete Selected & Deactivate.
- Selected items are deleted; unselected items are preserved.
Troubleshooting
Cleanup dialog doesn’t appear
- Ensure you have Administrator access (the cleanup feature requires
manage_optionscapability). - Check that JavaScript is enabled in your browser.
- Disable browser extensions that may block JavaScript dialogs.
Deletion fails with an error
- An error message will appear with details.
- The dialog returns to the selection state so you can retry.
- Check your server’s PHP error logs for more details.
- Ensure your database user has DROP and DELETE permissions.
Data remains after cleanup
- If you notice FlowMattic data still in your database after cleanup, it may be because:
- You didn’t select all categories for deletion.
- A database permission issue prevented some deletions.
- Cached data may still exist temporarily (WordPress transients expire on their own).
Summary
| Feature | Details |
|---|---|
| Access | Plugins > Installed Plugins > FlowMattic > Deactivate |
| When It Appears | Only when deactivating FlowMattic |
| Data Categories | 8 (Workflows, Task History, Connections, Custom Tables, Plugin Tables, Settings, User Roles, Cached Data) |
| Selection | Individual items or Select All |
| Skip Option | Yes — deactivate without deleting anything |
| Reversible | No — deleted data cannot be recovered |
| Permission Required | WordPress Administrator |
| Confirmation | Yes — double confirmation before deletion |