Title: Sequential product IDs?
Last modified: August 8, 2024

---

# Sequential product IDs?

 *  Resolved [mstudioeu](https://wordpress.org/support/users/mstudioeu/)
 * (@mstudioeu)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/sequential-product-ids/)
 * Hey team, I hope you’re well.
 * I wanted to check something – is there a way to ensure sequential IDs for products
   or at least be able to choose a number range for IDs?
 * My case is the following: I worked on a small e-shop where I uploaded the products
   manually one by one. Each product got assigned a random ID automatically by WooCommerce,
   ranging from 100 to 400 and even 1000.
 * Now I want to upload a large amount of products using a .csv sheet and I am not
   sure how to avoid the issue of having the newly uploaded products take the IDs
   of an already existing product and therefore overwrite the existing product.
 * This already happened and while I am going to fix it now, I was just wondering
   if there’s a way to avoid this in the future. Thank you in advance!

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

 *  [Stef](https://wordpress.org/support/users/serafinnyc/)
 * (@serafinnyc)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/sequential-product-ids/#post-17941309)
 * Hello [@mstudioeu](https://wordpress.org/support/users/mstudioeu/) Unfortunately,
   WooCommerce product IDs are based on the post IDs used by WordPress. In WordPress,
   WooCommerce products are stored as a custom post type (‘product’), so they share
   the same ID system as posts and pages. This means that each product ID is a post
   ID in the WordPress database, and they are generated in the same sequence as 
   other WordPress content types.
 * To ensure that only WooCommerce product IDs are sequential, you would need to
   separate their ID generation process from other post types. One way to achieve
   this is by creating a custom table for products and managing the ID generation
   manually. However, this approach can be complex and may affect the compatibility
   with WooCommerce and other 3rd party apps and future updates.
 * There might be a 3rd party app out there that already does this, but I myself
   am not aware. Otherwise, you’ll need a developer who can code something for you
   in order to import products thru CSV and ensure they are in sequential order.
 *  [ckadenge (woo-hc)](https://wordpress.org/support/users/ckadenge/)
 * (@ckadenge)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/sequential-product-ids/#post-17941593)
 * Hi [@mstudioeu](https://wordpress.org/support/users/mstudioeu/),
 * Just to add on what community member [@serafinnyc](https://wordpress.org/support/users/serafinnyc/)
   has already shared.
 * When importing products with a CSV, WooCommerce does not overwrite existing products
   by default. The CSV Importer has a column called ‘ID’ which is used to match 
   the product in the CSV to an existing product on your site. Hence, you should
   avoid using the ‘ID’ column unless you’re intending to update existing products.
 * To prevent overwriting, you can use a unique identifier for each product, such
   as the SKU. If the SKU is defined in the CSV, the importer will use it to identify
   if the product is new or existing. If you don’t want to use SKUs, you can leave
   the ‘ID’ column blank when creating new products, and WooCommerce will automatically
   assign a new, unique ID.
 * More details can be found from [the general guidelines when creating a CSV](https://woocommerce.com/document/product-csv-importer-exporter/#general-guidelines).
 * I hope this information helps you. If you have any other questions or need further
   assistance, feel free to ask.

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

The topic ‘Sequential product IDs?’ 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/)

 * 2 replies
 * 3 participants
 * Last reply from: [ckadenge (woo-hc)](https://wordpress.org/support/users/ckadenge/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/sequential-product-ids/#post-17941593)
 * Status: resolved