Support » Plugin: WooCommerce » Remove unused product’s meta data from database?

Viewing 10 replies - 1 through 10 (of 10 total)
  • lorro

    (@lorro)

    Yes, but I would use use the tool provided rather than direct db access.
    Dashboard > WooCommerce > Status > Tools tab : Remove orphaned variations.

    A variation is a type of post, and in common with all posts, my understanding is that when a post is deleted, WP will also automatically delete its meta data.

    Thread Starter Maciek Em

    (@slowsilva)

    Thanks for answer, but provided tool removes only orphaned varation. What I want to do is to remove unrelevant records for existed products. As far as I know, there isn’t any tool for that.

    lorro

    (@lorro)

    I wouldn’t remove meta data for active products. If you must, take a good backup first.

    Thread Starter Maciek Em

    (@slowsilva)

    I will 🙂 I have to try to clean up database a little bit. So far I’ve added 3 products and database grow from 30MB to 200MB and there are still many more to add..

    lorro

    (@lorro)

    Its unlikely 170MB is from 3 products. Something else is going on.

    There’s a delete-transient tool next to the orphaned variation tool.

    Sometimes the database grow because automated processes are fired before the previous process has completed.

    Crontrol:
    https://wordpress.org/plugins/wp-crontrol/
    will let you manage automated processes.

    You can disable WP Cron altogether with this line in wp-config.php at the bottom of the database settings:
    define('DISABLE_WP_CRON', 'true');
    Don’t leave it like that, but its a trouble-shooting step. If your database doesn’t grow with Cron disabled you’ll know where to look.

    https://wordpress.org/plugins/wp-optimize/
    and others can delete unwanted stuff from your database.

    Thread Starter Maciek Em

    (@slowsilva)

    Thank you lorro, but in my case, whats going on is how WooCommerce handle variations. One product has 12500 of them, each has bunch of useless meta data, like I mention before and thats how it database grows so fast..

    lorro

    (@lorro)

    That doesn’t sound very manageable. Would it help if I listed the methods for reducing the number of variations?

    Thread Starter Maciek Em

    (@slowsilva)

    Yeah, it takes forever to add all the variations and site slow. Of course, I’ll be very grateful – please list them 🙂

    I have SIZE wit up to 10 choices, where one of them – non-standard has +30% price. Plus there are five places where you can choose various types of logos on different materials in different prices.

    I was looking for decent plugin, but they always has cons, like no percentage surcharge.

    lorro

    (@lorro)

    If I sell T shirts in 3 colours and 3 sizes, that would be 3 x 3 = 9 variations. But if the size makes no difference, I can select “Any” as the size attribute when making the variations, so I end up with only 3 x 1 = 3 variations.

    I can use an add-on plugin like:
    https://wordpress.org/plugins/wc-fields-factory/
    For more or different features, there are several others, including premium ones at modest cost.

    This will enable me to have a simple product for my T shirts, plus 2 sets of 3 radio buttons for the user to select colour and size.

    If I offer gift wrap for $5 extra, I would be starting with 3 x 3 x 2 = 18 variations, but with an add-on plugin I would use a priced checkbox, so still a simple product.

    User choices and the extra costs flow through cart, checkout, order and emails.

    The above methods are scalable. Dropboxes can be used as well as radios or checkboxes.

    With the “Any” attribute or add-ons, I can’t have variation images, stock control or SKUs.

    Otherwise, as standard you can add 50 variations at a time, but there’s a code snippet somewhere to change the 50 value.

    It should be possible to create the variations on a spreadsheet and import them. Not done it myself but could be worth Googling.

    For 12500 variations, you could hire a dev to write some code to so it.

    Nevertheless, even minor changes would be a nightmare.

    I read that Woo has recognised the problem with zillions of variations and plan to make it easier in a future release. There may be a blog about it somewhere.

    Thread Starter Maciek Em

    (@slowsilva)

    Thank you very much lorro – I’ll check out this plugin and all other informations.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove unused product’s meta data from database?’ is closed to new replies.