How to bulk delete multiple Woocommerce attributes in phpMyAdmin
How to bulk delete multiple Woocommerce attributes in phpMyAdmin
Our plugin, allow woocommerce shop admin to add hundreds of woocommerce attributes easily to their store….Thaat’s something very cool and appreciated by our suers….
But sometimes, when using this plugin, it can happen that you add hundred of attributes terms into the wrong place (attributes). What to do then?? Here is how to get out of this….
Deleting Woocommerce attributes from phpMyAdmin
- Acces phpMyAdmin from cPanel
Depending on your hosting provider, this could open in another tab, so check your pop up blocker settings in your browser. - Locate the table concern by that worpdress install and click on it….then click on SQL in the top bar
- now copy and paste that sql query into the text area available in there:
DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_attributename';
Please make sure you repalce “attributename” with your own attribute name.
- To find out the real name of the attributes which terms you would like to delete, go back to Products > Attributes. From there click on the attribute name, which contains terms you would like to remove.
- In the url that will be open, something like https://www.mywebsite.com/wp-admin/edit-tags.php?taxonomy=pa_brands-models&post_type=product. In red is the real attribute name that you need to use in the SQL query.
The query in my case isDELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_brands-models';
- Run this query from phpMyAdmin to have all attribtues terms deleted ….Repeat as much as need
I hope that this little tutorial was helpfull for you….