Viewing 1 replies (of 1 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @sfuma

    We are working on issue to remove all data when plugin is uninstalled you can follow this issue to know the progress.

    https://github.com/ampproject/amp-wp/issues/3210

    Disclaimer : Run the below commands and SQL query at your own risk.

    Note : Run them first in dev/pre production environment to reduce the risk of losing the data.

    We will recommend deleting the data with WP CLI, Run the following CLI commands.

    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

    SQL Queries :
    Execute them in the sequence they are provided ( check your table prefix and use that instead of wp_)

    1. Remove AMP settings data:
    DELETE FROM wp_options WHERE option_name LIKE 'amp-options'

    2. Remove post meta ( if we use WP CLI it will be remove associated post meta )
    DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.post_type='amp_validated_url'

    3. Remove all amp_validated_url posts
    DELETE FROM wp_posts WHERE post_type = 'amp_validated_url'

    4. Remove term meta
    DELETE FROM wp_termmeta WHERE term_id IN ( SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'amp_validation_error' )

    5. Remove term relations
    DELETE FROM wp_term_relationships WHERE term_taxonomy_id IN ( SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'amp_validation_error' )

    6. Remove terms
    DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'amp_validation_error' )

    7. Remove taxonomies
    DELETE FROM wp_term_taxonomy WHERE taxonomy = 'amp_validation_error'

Viewing 1 replies (of 1 total)
  • The topic ‘How do I uninstall the plugin and databases?’ is closed to new replies.