What database does WooCommerce use?

7 minutes
What database does WooCommerce use

WooCommerce uses MySQL as its database, or MariaDB as a fully compatible equivalent, the same relational database that WordPress runs on. As a WordPress plugin, WooCommerce builds on the existing WordPress database and adds its own tables for products, orders, customers and settings. The one thing that has changed in recent versions, and matters most in 2026, is where orders live: modern WooCommerce stores them in dedicated High-Performance Order Storage tables rather than the old WordPress post tables. This guide covers what database WooCommerce uses, how it organizes the data, and how to keep it fast.

What database does WooCommerce use?

WooCommerce uses MySQL, inheriting the database directly from WordPress. It does not change the database type when installed; it extends the existing WordPress database by adding tables for e-commerce data, usually prefixed wc_, alongside WordPress’s own tables for posts, users, comments and options.

MariaDB is a drop-in alternative. It is a fork of MySQL by its original developers, and many hosts run it in place of MySQL with no change to WordPress or WooCommerce. For current stores, WooCommerce recommends MySQL 8.0 or higher, or MariaDB 10.6 or higher, running on the InnoDB storage engine. Older versions work as a floor, but the recommended versions give better performance and security.

How WooCommerce stores orders: High-Performance Order Storage (HPOS)

This is the biggest change to WooCommerce’s database in recent years. Historically, every order was stored as a WordPress post, with all its details packed into wp_posts and wp_postmeta as loosely structured key-value pairs. That table was never designed for order queries, so as a store grew, order screens and reports slowed down.

High-Performance Order Storage (HPOS), previously called Custom Order Tables, replaces that model. Orders now live in dedicated, indexed tables built for e-commerce, including wc_orderswc_order_addresseswc_orders_meta and wc_order_operational_data. HPOS has been the default for new installations since WooCommerce 8.2, released in October 2023, so most recent stores are already using it. The result is faster order queries, a more responsive admin, and better scalability for high-volume stores.

You can check or change the setting under WooCommerce → Settings → Advanced → Features, where three options exist: High-performance order storage (recommended), WordPress posts storage (legacy), and a compatibility mode that keeps both in sync. Existing stores migrate by turning on compatibility mode, letting the data backfill in the background, then switching HPOS to authoritative. Back up and test on staging before making the switch on a live store.

There is an important implication for integrations. Because order data no longer sits in wp_postmeta under HPOS, any code or integration that reads orders with direct SQL against the post tables will break. Custom plugins, and ERP or CRM connections, should use WooCommerce’s data functions (CRUD) or the Store and REST APIs rather than raw queries. If your store connects to external systems, this is worth confirming before you commit to HPOS.

How is the rest of the data organized?

Orders moved to HPOS, but the rest of WooCommerce still uses the WordPress structure where it fits. Products, notably, remain WordPress posts: each product is a product post in wp_posts, with details in wp_postmeta and a wc_product_meta_lookup table for fast filtering and search. The table below shows the main groups.

Data groupMain tablesPurpose
Orders (HPOS)wc_orders, wc_order_addresses, wc_orders_meta, wc_order_operational_dataOrder details, addresses, metadata and operational data
Productswp_posts (post_type = product), wp_postmeta, wc_product_meta_lookupProduct information, variations and searchable attributes
Analytics lookupswc_customer_lookup, wc_order_stats, wc_order_product_lookupFast reporting on customers, orders and products
Taxwc_tax_rate_classes, wc_tax_rates, wc_tax_rate_locationsTax rates, classes and location rules
Shippingwc_shipping_zones, wc_shipping_zone_methodsShipping zones, methods and costs

Splitting data this way lets WooCommerce run efficient queries: an order summary, its line items or a specific field can be retrieved without scanning large, general-purpose tables.

Can you use a different database with WooCommerce?

In practice, MySQL and MariaDB are the only realistic options, and they are interchangeable. Beyond them, support falls away quickly.

  • PostgreSQL: projects exist to run WordPress on it, but they are unofficial and can introduce instability. Not suitable for a production store.
  • SQLite: fine for very small WordPress installs, but its concurrency and performance limits rule it out for WooCommerce.
  • NoSQL (such as MongoDB): incompatible with the WordPress data model without changes that would break WooCommerce.

Large organizations sometimes synchronize the WooCommerce database with an external system such as Oracle or SQL Server for reporting or integration, but the store itself still runs on MySQL or MariaDB. The practical advice is to stay on MySQL or MariaDB and put your effort into configuration and caching rather than changing the database type.

How do you keep a WooCommerce database fast?

Database performance decides how a store feels as it grows. A handful of measures cover most cases.

  • Use HPOS. On any order-heavy store, dedicated order tables are the single biggest structural win.
  • Clean up regularly. Limit post revisions, clear expired transients, and remove abandoned carts and old sessions that quietly bloat the database.
  • Index for real queries. WooCommerce creates the essential indexes; custom search patterns may need more, but avoid over-indexing, which slows writes.
  • Add object caching. Redis or its open-source fork Valkey keeps frequently used data in memory and takes load off the database.
  • Tune the server. Size the InnoDB buffer pool to keep hot tables in memory, and for large stores add read replicas so reporting does not compete with checkout.

Sharding a WooCommerce database is an advanced, rarely needed measure; for almost all stores, HPOS, caching, indexing and a well-sized server solve the problem first.

Common WooCommerce database issues

A few problems recur, and all are easier to prevent than to fix under pressure.

  • Slow queries: common on large catalogs or long order histories. Monitor queries, fix or replace inefficient ones (often in third-party plugins), and add indexes for frequent searches.
  • Database bloat: revisions, transients and abandoned carts accumulate over time, slowing backups and queries. Clean them on a schedule.
  • Connection limits: “too many connections” errors during peaks, especially on shared hosting. Object caching, better hosting and tidy plugins all help.
  • Corruption: after a crash or bad update. Restore from a recent backup, or use MySQL and WordPress repair tools for minor cases.

A well-run database is invisible: customers just experience a fast, reliable store. For complex or high-traffic WooCommerce platforms, the database is usually where scaling is won or lost, and it is a large part of our WooCommerceperformance and B2B e-commerce work, including HPOS migrations and the integrations around them. If your store is slowing down as it grows, the database is the first place we look.

Frequently asked questions

What database does WooCommerce use?

WooCommerce uses MySQL, or MariaDB as a drop-in equivalent, the same relational database WordPress runs on. WooCommerce adds its own tables on top, and in modern versions stores orders in dedicated High-Performance Order Storage tables rather than the old post tables.

Does WooCommerce use MySQL or MariaDB?

Both work. MySQL is the default; MariaDB is a compatible fork many hosts use as a drop-in replacement. WooCommerce recommends MySQL 8.0 or higher, or MariaDB 10.6 or higher.

What is HPOS in WooCommerce?

High-Performance Order Storage stores orders in dedicated database tables such as wc_orders, instead of the legacy wp_posts and wp_postmeta tables. It has been the default for new stores since WooCommerce 8.2 (October 2023) and improves order query speed, admin performance and scalability.

Where are WooCommerce orders stored in the database?

In modern WooCommerce with HPOS, orders live in dedicated tables like wc_orders, wc_order_addresses and wc_orders_meta. On older or legacy-mode stores they are stored as posts in wp_posts with metadata in wp_postmeta. Products remain post-based in either case.

Can WooCommerce use PostgreSQL or MongoDB?

Not in practice. WooCommerce and WordPress are built for MySQL and MariaDB. PostgreSQL is unsupported and unstable, and NoSQL databases like MongoDB are incompatible without changes that would break the platform. Large stores sometimes sync data to external systems for reporting, but the store itself runs on MySQL or MariaDB.

Pwel Zmyslowski

Paweł Zmysłowski

CEO WLC.team

At White Label Coders responsible for the sales process and sales team, still involved in the analytical and advisory roles in case of more complex projects.

Author page

Is your WordPress “working, but slow”?

MORE ARTICLES

Read also

  • Full Site Editing and design systems in WordPress
    7 minutes

    Full Site Editing and design systems in WordPress

    A campaign landing page is due Thursday. The design is signed off, the copy is written, and the change still goes into the engineering queue. We see this pattern in most WordPress platforms built before 2022, regardless of how strong the teams are on either side. WordPress solved this at the platform level. It was…

    Read

  • AI Search and WordPress How to prepare a large-scale platform for generative search
    15 minutes

    AI Search and WordPress: How to prepare a large-scale platform for generative search

    Large WordPress platforms do not disappear from AI-generated answers simply because their content is poor. They often lose visibility because, after years of development, no one has taken ownership of the information architecture, while crawler access may be restricted at a level that is not visible from the WordPress admin panel.

    Read

  • WordPress for Education in 2026
    11 minutes

    WordPress for Education in 2026: Architecture, tools, and decisions that will define your platform’s success

    WordPress powers over 40% of websites worldwide. In the education sector, that dominance is even more pronounced – the platform has become the de facto standard for institutions looking to combine a school website with a fully functional course management system, without per-user licensing costs that grow alongside their student base.

    Read