Title: database tables
Last modified: August 22, 2016

---

# database tables

 *  [charmsusa](https://wordpress.org/support/users/charmsusa/)
 * (@charmsusa)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/database-tables-8/)
 * Just switched from Miva to WP and woocommerce. There is no table I can find in
   the database for orders or products (OTOH, there is a table for order-items)
   
   1. Why no orders or products table and 2 How do I create a table in woocommerce?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

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

 *  [ManusH](https://wordpress.org/support/users/manush/)
 * (@manush)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/database-tables-8/#post-5766240)
 * Because, orders/products are not generated as different variables needing their
   own tables,
    they are basically generated using standard WordPress functionality
   known as “Custom Post Types”,
 * therefore they are all stored in the “xxx_posts” table of WordPress database.
 *  Thread Starter [charmsusa](https://wordpress.org/support/users/charmsusa/)
 * (@charmsusa)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/database-tables-8/#post-5766296)
 * Thank you for your help. However, I still have a problem.
    I found a wp_posts
   table, thanks to you help. However, there is nothing there more=recent than 2/
   5/2015, even though there have been orders received since then. How come?
 *  [ManusH](https://wordpress.org/support/users/manush/)
 * (@manush)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/database-tables-8/#post-5766299)
 * You have search a bit more about “Custom Post Types”.
    Becuse in WooCommerce,
   it is not stored in only one table.
 * In the “_posts” table,
    the ones in “post-type” column having the “shop_order”
   value, they represents the ORDERS.
 * That ID is the Order-ID,
 * And the order details are stored in other tables,
    woocommerce_order_itemmeta
   woocommerce_order_items using that Order-Id.
 * ALl those tables used related to each other…
 *  Thread Starter [charmsusa](https://wordpress.org/support/users/charmsusa/)
 * (@charmsusa)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/database-tables-8/#post-5766303)
 * Thank you again, Manus, for your valuable help.
    That info is helpful. I guess
   I’ll need to write a query pulling from several tables to get what I’m looking
   for. what tables do I need to get at the Products? Is there an active/inactive
   field somewhere? If not, how can I make an active product inactive, or vice versa?
   How can I change the inventory counts using a flat file import?
 *  [toknatz](https://wordpress.org/support/users/toknatz/)
 * (@toknatz)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/database-tables-8/#post-5766319)
 * You may active or inactive a product in different ways or both.
 * 1.) In “posts” table set the “post_status” to “inactive” or publish to activate
   the product.
    2.)Using “postmeta” table set the “_visibility” to visible if active
   or something else for inactive. Also you may set the “_stock_status” to out of
   stock and/or “_stock” to 0.

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

The topic ‘database tables’ 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/)

 * 5 replies
 * 3 participants
 * Last reply from: [toknatz](https://wordpress.org/support/users/toknatz/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/database-tables-8/#post-5766319)
 * Status: not resolved