3

Please Is there any way to run an SQL code to delete all post tags in wordpress except categories via database.

I want to run an sql code that will delete all my tags in wp, but not deleting my post category and posts assigned to those category.

1

1 Answer 1

0
delete from `wp_terms` where `term_id` in ( SELECT `term_id`
    FROM `wp_term_taxonomy`
    WHERE `taxonomy` = 'post_tag' ) and `term_id` not like 1

The above Code was exactly what I was looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.