Skip to content

Instantly share code, notes, and snippets.

@n1k1c4
Created December 8, 2017 10:31
Show Gist options
  • Select an option

  • Save n1k1c4/5e7c946829f7a2c3d78a4a4368d821d6 to your computer and use it in GitHub Desktop.

Select an option

Save n1k1c4/5e7c946829f7a2c3d78a4a4368d821d6 to your computer and use it in GitHub Desktop.

Revisions

  1. n1k1c4 created this gist Dec 8, 2017.
    3 changes: 3 additions & 0 deletions wc_delete_all_attributes.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%');
    DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%';
    DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy);