Programming is like sex: One mistake and you have to support it for the rest of your life.
SQL that can be used to delete WordPress terms by count:
DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE count = 0 ) AND slug != 'uncategorized'; DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy);
Don't forget to backup before making changes.
Note: Only a member of this blog may post a comment.
ME: Write a blog post. The tone of this blog post must be lighthearted, humorous and not be subject to lawsuits. Topic: The fast pace of AI ...
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.