Where Are WooCommerce Products Stored In The WordPress Database?

Where is woocommerce storing product data in the database

Sometimes you add new WooCommerce products on your staging site and just want to add those new products to the live site without affecting other data like orders and transactions. Therefore you need to make sure to copy only the relevant tables which contain the WooCommerce products data.

Products are located mainly in 2 tables:

  • wp_posts table with a post_type product or product_variation,
  • wp_postmeta table with the corresponding post_id by product (the product ID).

Product types, categories, subcategories, tags, attributes and all other custom taxonomies for particular products are located in the tables below:

  • wp_terms
  • wp_termmeta
  • wp_term_taxonomy
  • wp_term_relationships
  • wp_woocommerce_termmeta
  • wp_woocommerce_attribute_taxonomies (for product attributes only)

Product types are handled by custom taxonomy product_type with the following default terms:

  • simple
  • grouped
  • variable
  • external

Since Woocommerce 3+ a new custom taxonomy named product_visibility handles:

  • The product visibility with the terms exclude-from-search and exclude-from-catalog
  • The feature products with the term featured
  • The stock status with the term outofstock
  • The rating system with terms from rated-1 to rated-5

Particular feature: Each product attribute is a custom taxonomy.


So if you do not like to copy, nor overwrite any WooCommerce data on the live site exclude all tables prefixed with woo_  and also  the tables wp_posts and wp_postmeta