I was wondering same for some testing. Hope there’s any way to do that.
What data are you referring to?
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.
While we don’t automatically remove data upon plugin uninstall yet (please follow https://github.com/ampproject/amp-wp/issues/3210 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.