Support » Plugin: AMP » How to delete plugin including data left behind

  • Resolved mrretail


    Hi, I wish to remove this plugin and all data it has created since it was installed. I don’t want to just delete the plugin, rather I want to delete and remove any data that may be left behind. Please tell me how to remove all data created by this plugin?
    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I was wondering same for some testing. Hope there’s any way to do that.

    Plugin Author Weston Ruter


    What data are you referring to?

    Plugin Author Weston Ruter


    The amp_validated_url post type and amp_validation_error taxonomy?

    Yes, and anything else that might be hiding. Basically want it to be like it was never installed in the first place.

    Plugin Author Pascal Birchler


    While we don’t automatically remove data upon plugin uninstall yet (please follow for progress on this), you could remove all the data with WP-CLI:

    1. Remove AMP settings data: wp option delete amp-options
    2. Remove all amp_validated_url posts: wp post delete $(wp post list --post_type='amp_validated_url' --format=ids)
    3. Remove all amp_validation_error terms: wp term list amp_validation_error --field=term_id | xargs wp term delete amp_validation_error
    4. In case you’re using AMP Stories: Remove all amp_story posts: wp post delete $(wp post list --post_type='amp_story' --format=ids)

    Hope that helps!

    So… nothing simple then. 🙁
    I was hoping for something similar to what Rank Math gave me; just one command line added to functions.php which was add_filter( ‘rank_math_clear_data_on_uninstall’, ‘__return_true’ );

    Sorry, but setting up WP-CLI is too complex for me. I will keep an eye on the progress link you supplied for the plugin to remove data itself.

    Thank you for the reply though.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to delete plugin including data left behind’ is closed to new replies.