How to remove all post tags in WordPress

62 Likes Comment

The next few SQL queries remove all tags from posts and from the Tags menu in WordPress.

DELETE FROM wp_term_relationships WHERE term_taxonomy_id IN (
    SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'post_tag'
);

DELETE FROM wp_termmeta WHERE term_id IN (
    SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'post_tag'
);

DELETE FROM bt_terms WHERE term_id IN (
    SELECT term_id FROM wp_term_taxonomy WHERE taxonomy = 'post_tag'
);

DELETE FROM wp_term_taxonomy WHERE taxonomy = 'post_tag';

 

You might like

About the Author: Oleksandr Sovenko

Back-End Web Developer. Currently I spend my days working as a remote web developer of EstPress

Leave a Reply

Your email address will not be published. Required fields are marked *