Title: You cannot delete a plugins
Last modified: February 10, 2022

---

# You cannot delete a plugins

 *  Resolved [dev](https://wordpress.org/support/users/devksec/)
 * (@devksec)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/you-cannot-delete-a-plugins/)
 * Hello,
 * When we deactivate and then try to uninstall a plugin (After migrating from subsite
   to standalone), we get the following error:
 * You cannot delete a plugin while it is active on the main site.
 * The only way to remove is via the WP CLI.
 * Any ideas?
 * P.S this is the same site as the woocoomerce customer ID issue

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Codexonics](https://wordpress.org/support/users/codexonics/)
 * (@codexonics)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/you-cannot-delete-a-plugins/#post-15353160)
 * Hi dev, that’s weird. But if this cannot be deleted – it means WordPress still
   see this as active plugin on dB even though it appears already deactivated. WordPress
   stores active plugins information in WP options db table as `active_plugins` 
   option.
 * Searching for this error on the Internet – seems not be migration related but
   caching related. WordPress might be getting cached value on `active_plugins` 
   where that plugin is still active (despite already deactivated). This prevent
   the plugin to be deleted since it’s still active.
 * Check if your site uses caching. Purge cache whether its using a caching plugin
   or if caching is provided built-in by host – purge or clear it also.
 * Or you can temporarily deactivate all caching solutions first (including the 
   ones provided by hosts if possible) before deleting plugin. This will ensure 
   that the `active_plugins` info used by WordPress is updated and not cached.
 * The following links could help you resolve this issue:
 * [Fix Error: You cannot delete a plugin while it is active on the main site](https://medium.com/@latesttori/fix-error-you-cannot-delete-a-plugin-while-it-is-active-on-the-main-site-49293144e3f6)
 * [How to fix “You cannot delete a plugin while it is active on the main site” error?](https://okeyravi.com/fix-you-cannot-delete-a-plugin-while-it-is-active-on-the-main-site-error/)
 * This should resolve this deleting plugin issue. Thanks!
 *  Plugin Author [Codexonics](https://wordpress.org/support/users/codexonics/)
 * (@codexonics)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/you-cannot-delete-a-plugins/#post-15371381)
 * I’m closing this one and there is a new release today (Prime Mover 1.4.8). Please
   upgrade to this version to get the most up-to-date fixes. If you still need technical
   assistance – please open a new ticket with details. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘You cannot delete a plugins’ is closed to new replies.

 * ![](https://ps.w.org/prime-mover/assets/icon-256x256.png?rev=2114612)
 * [Prime Mover - Migrate WordPress Website & Backups](https://wordpress.org/plugins/prime-mover/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/prime-mover/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/prime-mover/)
 * [Active Topics](https://wordpress.org/support/plugin/prime-mover/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/prime-mover/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/prime-mover/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Codexonics](https://wordpress.org/support/users/codexonics/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/you-cannot-delete-a-plugins/#post-15371381)
 * Status: resolved