Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DELETE p FROM wp_posts p WHERE p.post_type = 'product';
- DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
- DELETE tr FROM wp_term_relationships tr INNER JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.taxonomy != 'link_category' AND tr.object_id NOT IN ( SELECT ID FROM wp_posts );
- DELETE o FROM `wp_posts` o
- LEFT OUTER JOIN `wp_posts` r
- ON o.post_parent = r.ID
- WHERE r.id IS null AND o.post_type = 'product_variation';
- DELETE p FROM wp_posts p WHERE p.post_type = 'product';
- DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
- DELETE tr FROM wp_term_relationships tr INNER JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.taxonomy != 'link_category' AND tr.object_id NOT IN ( SELECT ID FROM wp_posts );
- DELETE o FROM `wp_posts` o
- LEFT OUTER JOIN `wp_posts` r
- ON o.post_parent = r.ID
- WHERE r.id IS null AND o.post_type = 'product_variation';
- DELETE a,c FROM wp_terms AS a
- LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
- LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
- WHERE c.taxonomy = 'product_tag';
- DELETE a,c FROM wp_terms AS a
- LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
- LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
- WHERE c.taxonomy = 'product_cat';
- DELETE a,c FROM wp_terms AS a
- LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
- LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
- WHERE c.taxonomy = 'pa_vysota';
- DELETE a,c FROM wp_terms AS a
- LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
- LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
- WHERE c.taxonomy = 'pa_razmer';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement