Website Building » WooCommerce » What Table Does WooCommerce Store Orders?

What Table Does WooCommerce Store Orders?

Last updated on October 1, 2022 @ 11:01 pm

WooCommerce is a popular eCommerce platform for WordPress. It is estimated that WooCommerce powers approximately 30% of all online stores.

One of the reasons for its popularity is its flexibility – it can be used to sell physical and digital products, and it also has a wide range of plugins to extend its functionality.

Another reason for WooCommerce’s popularity is that it is easy to set up and use. Once you have installed the plugin and added your products, you can start selling almost immediately.

orders are stored in the WordPress database, in the wp_posts table. This table also stores other information such as blog posts, pages, and comments.

PRO TIP: If you are using WooCommerce to sell products or services online, it is important to know which database table is used to store orders. By default, WooCommerce uses the WordPress posts table to store orders. However, this can be changed by adding the following code to your wp-config.php file:

define( ‘WC_ORDER_TABLE’, ‘my_orders’ );

Be sure to change “my_orders” to the name of the database table you want WooCommerce to use.

The wp_posts table has a column called post_type. This column is used to distinguish between different types of data that are stored in the table.

For example, blog posts have a post_type of “post”, while pages have a post_type of “page”. Similarly, WooCommerce orders have a post_type of “shop_order”.

If you want to view or export your WooCommerce orders, you can do so by opening the wp_posts table in your database management tool (such as phpMyAdmin) and filtering for records with a post_type of “shop_order”.

What Table Does WooCommerce Store Orders?

Orders are stored in the WordPress database, in the wp_posts table.

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.