Category Archives: mysql

SQL to get WooCommerce product categories (terms)

For an import script I needed to get WooCommerce product categories so I ended up looking the generated query in /var/log/mysql/query.log for get_the_terms($postID, ‘taxonomy_name’) I ended up using the following SQL query to get product categories: SELECT t.*, tt.* FROM … Continue reading

Posted in mysql, sql, Uncategorized, woocommerce, wordpress | Tagged , , , , | Leave a comment

Purging mysql-bin files, a.k.a. saving GBs of SSD space

My SSD was filling up and while searching for the cause I ended at MySQL binary log files. They used almost 40GB :-O while I don’t use the logs so often and especially not so backdated $ sudo ls -lSh … Continue reading

Posted in mysql | Tagged , , , | Leave a comment