Woocommerce

Where Are WooCommerce Products Stored in the Database?

A clear, non-scary guide to the WordPress tables WooCommerce uses for products, stock, categories, attributes, and order context.

WooCommerce product database diagram on a laptop screen

Key takeaways

  • WooCommerce products live across WordPress post, postmeta, taxonomy, and WooCommerce lookup tables.
  • Direct database edits can break product relationships, so backups and staging tests matter.
  • Knowing the structure helps with migrations, troubleshooting, imports, exports, and performance fixes.

If you run a WooCommerce website, you may have wondered where all your products are stored behind the scenes. Understanding how WooCommerce organises data in the database can help when you’re troubleshooting, migrating your site, or planning performance improvements.

We often get asked this question by business owners who manage their own WordPress websites, so let’s break it down clearly.


Understanding the WordPress Database Structure

WooCommerce is built on top of WordPress, which means it uses the same database structure. Instead of storing each product in a single table, WooCommerce spreads the data across several interconnected tables.

Here’s where the key information lives:

  • wp_posts – Each product is stored as a post type (product). This table holds the main product details such as title, description, and publish status.
  • wp_postmeta – Stores additional data such as price, SKU, stock levels, and custom attributes.
  • wp_terms and wp_term_taxonomy – Manage product categories, tags, and attributes.
  • wp_term_relationships – Links products to categories, tags, and attributes.
  • wp_woocommerce_order_items and related tables – Contain order and cart data (for context if you’re working on sales data).

So, when you edit a product in your dashboard, WooCommerce is actually updating several different database tables behind the scenes.

WooCommerce database tables: a quick reference

TableWhat it stores
wp_postsThe product itself (post type product or product_variation): title, description, slug and status
wp_postmetaProduct details: price, SKU, stock, weight, dimensions and custom fields
wp_wc_product_meta_lookupA fast lookup copy of key fields (price, stock, rating) so shop pages load quickly
wp_terms, wp_term_taxonomyProduct categories, tags and global attributes
wp_term_relationshipsWhich products belong to which categories, tags and attributes
wp_optionsStore-wide WooCommerce settings
wp_wc_orders and relatedOrders, when High-Performance Order Storage (HPOS) is switched on

A note on orders. Modern WooCommerce uses High-Performance Order Storage (HPOS), which keeps orders in dedicated wp_wc_orders tables instead of wp_posts. Older or upgraded stores may still use the legacy wp_posts and wp_woocommerce_order_items structure. Products, though, still live in wp_posts and wp_postmeta.

If you are moving products between stores, our guide to exporting and importing WooCommerce products is far safer than editing the database directly. And if you are chasing speed, a bloated wp_postmeta table is a common drag on your Core Web Vitals.


Why You Might Need to Know This

Understanding where WooCommerce products are stored can be helpful if you:

  • Need to migrate your shop to a new host or domain
  • Want to clean up unused data or duplicate products
  • Are integrating with another system, such as an inventory or CRM tool
  • Need to improve your site’s speed by optimising the database

However, manually editing these tables directly can be risky. One small error could break your product data or site layout.


Safely Managing WooCommerce Data

If you’re comfortable with SQL and backups, you can use phpMyAdmin or tools like WP-CLI to explore your database. But if you’re not entirely sure, it’s best to leave the heavy lifting to professionals.

We specialise in WordPress and WooCommerce development, including:

  • Secure migrations and backups
  • Website speed improvements
  • WooCommerce design and development

We can help you keep your online shop running smoothly while improving performance and reliability.


Need Help With Your WooCommerce Website?

Whether you’re trying to understand how your site works or you need technical support, our team can help. We work with businesses of all sizes to build, optimise, and maintain high-performing WooCommerce websites.

If you’d like professional help managing your site, get in touch with us today. Let’s make your WooCommerce website faster, safer, and easier to manage.

WooCommerce database FAQs

Which table are WooCommerce products stored in?

Products are stored as a product post type in wp_posts, with the extra details such as price, SKU and stock held in wp_postmeta. Categories and tags live in the wp_terms tables.

Where are WooCommerce product prices and stock stored?

In wp_postmeta, in fields such as _price, _regular_price and _stock. WooCommerce also keeps a fast copy in wp_wc_product_meta_lookup so shop and category pages can sort and filter quickly.

Where are WooCommerce orders stored?

In the dedicated wp_wc_orders tables if High-Performance Order Storage (HPOS) is enabled, which is the modern default. Older or upgraded stores may still keep orders in wp_posts and wp_woocommerce_order_items.

Can I edit WooCommerce products directly in the database?

You can, using phpMyAdmin or WP-CLI, but it is risky and one wrong change can break your products. Always back up and test on staging first. For most jobs, a CSV import or the dashboard is safer.

Turn this advice into a better website.

Talk to us about improving your website, search visibility, or marketing performance.

Let's Create
Together
Contact Us