Skip to content

Optimize : Plugin uninstallation with data #6826

@milindmore22

Description

@milindmore22

Bug Description

We have been receiving support topics mentioning failing to delete data while uninstalling the plugin

  1. https://wordpress.org/support/topic/delete-amp-plugin/
  2. https://wordpress.org/support/topic/error-on-uninstall-amp/
  3. https://wordpress.org/support/topic/can-not-uninstall-amp/
  4. https://wordpress.org/support/topic/cant-delete-amp-plugin/
  5. https://wordpress.org/support/topic/amp-uninstall/
  6. https://wordpress.org/support/topic/does-not-allow-to-uninstall-amp/
  7. https://wordpress.org/support/topic/how-to-delete-the-amp-plugin/
  8. https://wordpress.org/support/topic/cant-uninstall-the-amp-plugin/

I am not able to reproduce the issue, but I doubt that cause maybe the timeout error failing to delete 1000 posts and taxonomies one by one, as in some cases there are plugins that have heavy processing or 50+ plugins on a site creating large number of invalidation record.

Please check the possibility of optimizing the uninstallation process (500 posts?), we can consider executing SQL queries, instead of using wp_delete_post and wp_delete_term

Expected Behaviour

Hassle-free Uninstallation process 💯

Screenshots

No response

PHP Version

7.4

Plugin Version

2.2.0

AMP plugin template mode

Transitional, Reader

WordPress Version

5.8.2

Site Health

ampwp-45d67ac7-6236-5036-b88d-8d797b7833cc

Gutenberg Version

12.2.0

OS(s) Affected

all

Browser(s) Affected

all

Device(s) Affected

all

Acceptance Criteria

No response

Implementation Brief

No response

QA Testing Instructions

No response

Demo

No response

Changelog Entry

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingChangeloggedWhether the issue/PR has been added to release notes.P0High priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions