Title: Auto-create variations for variable products
Last modified: November 28, 2019

---

# Auto-create variations for variable products

 *  Resolved [Alexanne](https://wordpress.org/support/users/alexannee/)
 * (@alexannee)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/)
 * Hello,
 * Is there a way to bulk generate variations for variable products with attributes?
 * Let me explain. We imported our products via CSV (from another e-commerce website).
   Everything went fine, except for the variable products. We can’t import the products
   with «Used for variation» checkbox already checked. So all our variable products
   don’t have variations. We have thousands of products, so creating them manually
   by clicking on each products, then click the «Used for variations checkbox», 
   then «Create variations from attributes» is impossible, it would take years.
 * Can I auto-generate the variations for each variable product?
 * Thanks

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [Fernando a11n](https://wordpress.org/support/users/fhaps/)
 * (@fhaps)
 * Automattic Happiness Engineer
 * [6 years, 5 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-12190392)
 * What tool did you use to export the CSV file and then import it on the new site?
 * Using [the built-in importer/exporter tool](https://docs.woocommerce.com/document/product-csv-importer-exporter/)
   would create the variations correctly.
 * Here’s an example of what a file with the correct data to import products (including
   variations) looks like: [https://github.com/woocommerce/woocommerce/blob/master/sample-data/sample_products.csv](https://github.com/woocommerce/woocommerce/blob/master/sample-data/sample_products.csv)
 * You can use that as a base to format your CSV file correctly and re-import the
   products.
 *  Thread Starter [Alexanne](https://wordpress.org/support/users/alexannee/)
 * (@alexannee)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-12192195)
 * Hello,
 * Thank you very much for the quick answer! I used indeed the built-in importer.
   The variations in my CSV are not created like the demo, but I would like to have
   them automatically created instead of creating thousand new lines by hand ..
 * Thanks!
    -  This reply was modified 6 years, 5 months ago by [Alexanne](https://wordpress.org/support/users/alexannee/).
      Reason: Wrong answer, sorry!
 *  Plugin Support [Fernando a11n](https://wordpress.org/support/users/fhaps/)
 * (@fhaps)
 * Automattic Happiness Engineer
 * [6 years, 5 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-12198581)
 * Sounds like a plan! Please let us know here if that resolved the issues – as 
   it might help other users who experience similar errors in the future.
 *  [Luminus Alabi](https://wordpress.org/support/users/luminus/)
 * (@luminus)
 * Automattic Happiness Engineer
 * [6 years, 4 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-12232735)
 * Hi [@alexannee](https://wordpress.org/support/users/alexannee/),
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.
 *  [version interactive](https://wordpress.org/support/users/version/)
 * (@version)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-12943039)
 * I’m still working on auto generating the variations without going into each product–
   but you need to go in to upload images anyway – right?
 * I solved the unchecked “used for variations” issue by running the following update
   in mysql/phpmyadmin
 *     ```
       UPDATE wp_postmeta 
       SET meta_value = REPLACE( 
         meta_value, 
       'is_variation";s:1:"0',
       'is_variation";s:1:"1'
       );
       ```
   
 * I made a plugin so my client can do this easily each season.
 * I also added a feature to globally apply parent prices to all child variations
   with one click. This was not straight forward because when variations are generated
   the original price is deleted. So I added a new meta value for parent price when
   globally checking the “used for variations” boxes.
 * [plugin screenshot](https://version.nz/product-tools.jpg)
    -  This reply was modified 5 years, 11 months ago by [version interactive](https://wordpress.org/support/users/version/).
    -  This reply was modified 5 years, 11 months ago by [version interactive](https://wordpress.org/support/users/version/).
    -  This reply was modified 5 years, 11 months ago by [version interactive](https://wordpress.org/support/users/version/).
    -  This reply was modified 5 years, 11 months ago by [version interactive](https://wordpress.org/support/users/version/).
    -  This reply was modified 5 years, 11 months ago by [version interactive](https://wordpress.org/support/users/version/).
    -  This reply was modified 5 years, 11 months ago by [version interactive](https://wordpress.org/support/users/version/).
 *  [darant1979](https://wordpress.org/support/users/darant1979/)
 * (@darant1979)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-13152560)
 * Hi, please can you share that plugin? Or help me on the script 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Auto-create variations for variable products’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [variation](https://wordpress.org/support/topic-tag/variation/)

 * 6 replies
 * 5 participants
 * Last reply from: [darant1979](https://wordpress.org/support/users/darant1979/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/auto-create-variations-for-variable-products/#post-13152560)
 * Status: resolved