How to Delete a WordPress Plugin Completely
Deactivate and uninstall a WordPress plugin safely, decide whether its data should remain, and remove leftovers without guessing at database tables.
Quick answer: back up the site, export any data you may need, check the plugin for a “remove data on uninstall” option, then go to Plugins → Installed Plugins, click Deactivate, and click Delete. Do not manually delete database tables unless the plugin documentation identifies them and you have verified they are not shared.
“Completely” should mean intentionally removing files, settings and background work—not running a generic database-cleaner query against unfamiliar table names.
1. Decide whether the data should be removed
Plugins often preserve data so settings return after reinstallation. That is useful during troubleshooting but undesirable when permanently retiring a service.
Before uninstalling, identify:
- settings and API credentials;
- custom post types and taxonomies;
- form entries, orders or logs;
- uploaded or generated files;
- custom database tables;
- scheduled events and background queues;
- pages or shortcodes the plugin created.
Export business records before removal. A backup is not a convenient long-term archive if you later need one form submission or invoice.
2. Read the plugin’s uninstall documentation
Search its settings for options such as Delete data on uninstall, Remove all data, or Factory reset. These controls are often disabled by default to prevent accidental loss.
Use only the official documentation for table names and cleanup constants. Prefixes vary, multisite complicates ownership, and two plugins may share WordPress options or content tables.
3. Back up files and database
Take a fresh backup and note the plugin version. If removal affects a live store, form or membership system, plan a short maintenance window and stop new writes where appropriate.
4. Deactivate and observe
In Plugins → Installed Plugins, deactivate the plugin but do not delete it immediately. Clear relevant caches and test the site.
Look for:
- visible shortcodes;
- missing blocks or widgets;
- broken forms and navigation;
- PHP errors from a dependent theme or plugin;
- missing redirects, schema or tracking;
- failed cron jobs or queues.
If the site depends on it, reactivate and plan a migration instead of deleting it.
5. Delete through WordPress
Once deactivation is safe, click Delete. WordPress removes the plugin directory and gives the plugin an opportunity to run its registered uninstall routine.
With WP-CLI, deactivate and uninstall explicitly:
wp plugin deactivate plugin-slug
wp plugin uninstall plugin-slug
Only add --deactivate when you have confirmed the target slug. Avoid --skip-delete if the objective is to remove files.
Deleting the directory manually through SFTP bypasses the normal uninstall routine. Use that for emergency deactivation when the site is broken, then restore the expected folder and perform a documented uninstall later if cleanup matters.
6. Check for supported leftovers
After deletion, inspect only the locations documented by the plugin:
- its dedicated upload subdirectory;
- named custom database tables;
- scheduled actions or cron hooks;
- generated pages;
- server or CDN rules it asked you to add;
- external webhooks and API keys.
Revoke third-party credentials at the external service. Removing a local plugin does not automatically cancel a subscription, delete a cloud account or invalidate an API token.
Do not blindly delete autoloaded options
Database cleanup plugins often label unknown rows as “orphaned,” but names alone do not prove ownership. An option may be used by custom code, a replacement plugin or a multisite network.
If a leftover is large or autoloaded, reproduce the site on staging, take a database snapshot, confirm the owner in code or documentation, remove one target, and test. Performance work should be evidence-led.
Final uninstall checklist
- Test important frontend and admin workflows.
- Search content for the removed plugin’s shortcodes or blocks.
- Verify scheduled tasks and logs no longer reference it.
- Remove generated files only when their ownership is certain.
- Revoke external access and cancel unneeded billing separately.
- Document the removal and replacement.
If the plugin must be stopped because wp-admin is inaccessible, first use How to Disable WordPress Plugins Without Admin Access, then return to this cleanup after recovery.
Frequently asked
- Deactivation stops the plugin from loading but keeps its files. Deletion removes its plugin directory and may run the plugin’s uninstall routine.
- Not always. Many plugins intentionally preserve settings or content for reinstallation. Some provide a separate remove-data option that must be enabled before deletion.
- Inactive plugin PHP does not normally load on frontend requests, though leftover scheduled jobs or external integrations deserve checking. Inactive files still need security-conscious maintenance or removal.