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 Answer
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.