How to delete all WooCommerce products via SQL

 

DELETE relations.*, taxes.*, terms.*
FROM wp_term_relationships AS relations
INNER JOIN wp_term_taxonomy AS taxes
ON relations.term_taxonomy_id=taxes.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON taxes.term_id=terms.term_id
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product');

DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
DELETE FROM wp_posts WHERE post_type = 'product';

To delete all WooCommerce attributes login to phpMyAdmin and run this SQL.
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);

Axis is an open-source e-commerce platforma. With a friendly interface, the user has full control over the administration panel and can add and edit content at any time. Even though it seems complicated to manage an online store, Axis is easy to use and it does not require programming knowledge.

Among the advantages this platform offers, we must include:

- 6 payment methods available;
- easy check in and check out process with only one click needed;
- 9 shipping methods;
- details about every order;
- customized URLs, meta tags and meta descriptions;
- recently used products option;
- cross-selling option;
- different search filters;
- flexible design themes.

DirektHost offers fast professional support for Axis when our clients need it. We provide free support for small issues. For other issues like customization, module or other extensions installation our customers can request our professional paid support!