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
| Table | What it stores |
|---|---|
wp_posts | The product itself (post type product or product_variation): title, description, slug and status |
wp_postmeta | Product details: price, SKU, stock, weight, dimensions and custom fields |
wp_wc_product_meta_lookup | A fast lookup copy of key fields (price, stock, rating) so shop pages load quickly |
wp_terms, wp_term_taxonomy | Product categories, tags and global attributes |
wp_term_relationships | Which products belong to which categories, tags and attributes |
wp_options | Store-wide WooCommerce settings |
wp_wc_orders and related | Orders, 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.