Skip to content

How to Backup WooCommerce Database and Your Products

How to Backup WooCommerce Database and Your Products

Here is how to backup WooCommerce database tables: export them to one SQL file with a plugin, phpMyAdmin or WP-CLI.

We tested every method in October 2026 on a WooCommerce 11.2 test store with WordPress 7.1.3, UpdraftPlus 1.26.8, phpMyAdmin 5.2.0 and WP-CLI 2.5.0. We exported each backup, deleted products and orders on purpose, restored the file, and counted what came back.

You also get the product CSV route, a list of what each backup misses, and a schedule based on how many orders you take.

What a WooCommerce Backup Contains

A WooCommerce backup is a saved copy of your store’s MySQL database taken at one point in time. It holds products, orders, customers, coupons and settings, but not your theme, plugins or uploaded images. On a store that uses High-Performance Order Storage, orders live in four dedicated tables.

The WordPress backup guide says a database backup does not cover files such as themes, plugins, uploads and wp-config.php. So a full WooCommerce backup is the database plus the wp-content folder, and you should keep both. A database copy alone restores your catalog, orders and customers, but a lost theme or plugin folder needs the files.

WooCommerce 8.2 made High-Performance Order Storage (HPOS) the default for new stores in October 2023. The HPOS documentation names the four order tables as wc_orders, wc_order_addresses, wc_order_operational_data and wc_orders_meta. Check which storage your store uses under WooCommerce > Settings > Advanced > Features.

Order data storage setting on the WooCommerce Features screen
Screenshot from our WooCommerce 11.2 test store

WooCommerce adds many more tables than the four for orders, and our test store had 59 tables in total. The extra ones include woocommerce_order_items with its meta table for line items, woocommerce_sessions for active carts, and wc_order_stats for Analytics reports. The Action Scheduler tables queue background jobs.

Your table names start with wp_ unless someone changed the prefix. If yours look different, the guide on changing the WordPress database prefix explains why.

Open the database in phpMyAdmin and filter the table list by wp_wc_order. On our test store, five test orders produced five rows in each of three order tables. The orders meta table held ten rows.

WooCommerce order tables in phpMyAdmin with row counts
phpMyAdmin 5.2 on our test store

A backup that skips any one of these tables leaves orders half restored.

How to Backup WooCommerce Database: Four Methods Compared

The fastest way to learn how to backup WooCommerce database tables is to pick one of four methods. A backup plugin suits most stores, phpMyAdmin suits a quick copy before a change, and WP-CLI suits large databases. A product CSV is a smaller fourth option that saves only your catalog.

The table below shows what each method covers and where it fits best.

MethodCoversNeedsBest for
UpdraftPlusDatabase, files or bothPlugin installScheduled backups to cloud storage
phpMyAdminDatabase onlyHosting control panelOne-off copy before a change
WP-CLIDatabase onlySSH accessLarge databases and scripts
Product CSVProducts and variationsNothing extraRolling back bulk edits

The graphic below shows the same split. The database holds your orders, the CSV holds products and nothing else, and a files backup holds your theme, plugins and uploads.

How to backup WooCommerce database, products and files compared

Method 1: WooCommerce Backup With UpdraftPlus

A WooCommerce backup plugin is the right choice for most stores because it schedules the copy and sends it off the server. UpdraftPlus is free, has more than 4 million active installs, and lets you back up the database alone. This guide covers the free version, which was 1.26.8 when we tested.

  1. Install the plugin: Go to Plugins > Add New, search for UpdraftPlus and click Install Now, then Activate.
    UpdraftPlus plugin card on the WordPress Add Plugins screen
  2. Skip the setup wizard: On first launch UpdraftPlus shows a welcome wizard. You can follow it or choose Exit setup, because every setting also lives under Settings > UpdraftPlus Backups.
  3. Set the database schedule: Open the Settings tab and set the Database backup schedule to Daily, then choose how many copies to keep. The free version also offers every 2, 4, 8 or 12 hours, plus weekly, fortnightly and monthly.
    UpdraftPlus database backup schedule set to daily
  4. Pick remote storage: Choose a destination in the remote storage list, such as Google Drive, Dropbox or Amazon S3, and follow the sign-in steps. Without one, backups stay on the same server as your store.
    Remote storage options in UpdraftPlus settings
  5. Run the first backup: Save your changes, open the Backup / Restore tab and click Backup Now. Tick Include your database in the backup and untick the files box if you want the database alone.
    Database-only backup dialog in UpdraftPlus
  6. Check the result: When the job finishes, the Existing backups list shows a new row with a Database download button. Our database-only backup was one gzip file of about 300 KB.
    Finished database backup in the UpdraftPlus backup list

For a full store backup, keep the Files schedule on as well. The Include in files backup list had Plugins, Themes and Uploads ticked on our test store. You can exclude folders from Uploads if media makes the files too large.

Pay attention to the free limits. The plugin page lists incremental backups, backups at fixed times and automatic backups before updates as premium features. Free UpdraftPlus also cannot send one backup to more than one location, so keep a second copy yourself.

Backups in the free version land in wp-content/updraft on your server until a remote destination takes them. That folder is the answer to the common question of where UpdraftPlus keeps its files by default. Copy it off the server if you did not connect storage.

Method 2: Export the Database in phpMyAdmin

phpMyAdmin exports the whole database through your hosting control panel without a plugin. It is a good fit for a quick snapshot before an update or a bulk edit. The settings below produce a file you can restore on a populated store.

The WordPress backup guide calls phpMyAdmin unsuitable for very large databases and suggests mysqldump for those. If the export times out or your database is big, use Method 3 instead.

  1. Open phpMyAdmin: Log in to cPanel, Plesk or your host’s panel and open phpMyAdmin from the Databases section. If you are not sure which database is yours, look for DB_NAME in wp-config.php.
  2. Select the database: Click your WordPress database in the left column, then click the Export tab. The Structure tab lists every table, so you can confirm the WooCommerce tables are there.
    Export tab on the phpMyAdmin database screen
  3. Choose Custom: Select Custom – display all possible options and keep the format set to SQL. Custom shows every option, which matters for the next step.
    Custom export method with SQL format in phpMyAdmin
  4. Add the drop statements: Scroll to Object creation options and switch on Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement.
    DROP TABLE option in the phpMyAdmin export screen
  5. Download the file: Leave Save output to a file selected and click the Export button at the bottom. Your browser downloads a file named after the database, such as wp.sql.

Step 4 matters more than it looks, because the default Custom export contained zero DROP TABLE statements in our test. Importing it over a live store stopped on the first table with error 1050. After we switched the option on, the same export held a drop statement for all 59 tables and imported cleanly.

Method 3: Export the Database With WP-CLI

WP-CLI exports the database from the command line over SSH, and it copes with large databases better than phpMyAdmin. The wp db export command runs mysqldump with the credentials from wp-config.php. It also adds a drop statement before every table by default.

Run this command from your WordPress folder to write a dated file:

wp db export backup-$(date +%F).sql

Gzip the file when the database is large, then copy it off the server:

gzip backup-$(date +%F).sql

On our test store the export finished in under a second. The dump was about 1.3 MB and gzip shrank it to roughly 250 KB.

WP-CLI database export command and gzip output
Output from our WooCommerce 11.2 test store

To export only the order tables, let WP-CLI build the table list. The pattern matched nothing in our test until we added --all-tables, because without it wp db tables lists only the tables WordPress registers itself:

wp db export orders-only.sql --tables=$(wp db tables 'wp_wc_order*' --all-tables --format=csv)

That wildcard matched eight tables on our test store and wrote a 16 KB file. Restore every related table together later, because orders without their items and addresses are incomplete.

The docs add two useful options. Pass --tables with a comma-separated list to export only some tables, and pass - as the file name to send the dump to standard output. That lets you pipe it straight into gzip with wp db export - | gzip > backup.sql.gz, which we tested too.

Method 4: WooCommerce Product Backup With a CSV Export

A WooCommerce product backup is a CSV file that holds your catalog, and you can create it without a plugin. You can backup WooCommerce products this way in under a minute. The file restores products only, so treat it as a rollback tool for bulk edits and a portable copy of your catalog.

The product CSV documentation describes the exporter, and the steps are short.

  1. Open the exporter: Go to Products > All Products and click Export next to Add new product and Import.
    Export button on the WooCommerce Products screen
  2. Pick what to export: Leave Export all columns and Export all products selected for a full copy. You can narrow the export by product type or category, or tick Yes, export all custom meta to include plugin fields.
  3. Generate the file: Click Generate CSV and save the file in a dated folder.
    Generate CSV button on the WooCommerce export screen

Our test catalog had 12 simple mugs and one variable T-shirt with three sizes. The product list showed 13 items, yet the CSV held 16 rows across 45 columns, because every variation gets its own row.

What a Product Backup Does Not Contain

A product CSV does not hold orders, customers, coupons, settings or the image files themselves. It stores product data and image URLs only. WooCommerce core can import products and tax rates, but it has no order importer, so a CSV is no substitute for a database backup.

Our own restore test showed three more gaps worth knowing:

  • New product IDs: After we deleted all 13 products and imported the CSV, the first mug moved from ID 10 to ID 48. The documentation confirms you cannot assign a specific ID to a new product during import.
  • Orders keep old IDs: Orders store the ID of the product that was bought. A restore with new IDs leaves old orders pointing at products that no longer exist.
  • A skipped GTIN column: On the mapping screen the GTIN, UPC, EAN or ISBN column defaulted to Do not import. Check the mapping before you click Run the importer.

Product image files stay in your uploads folder. If you restore on a new host, copy wp-content/uploads as well, or the image URLs in the CSV will point at nothing.

Verify Your WooCommerce Backup

Verify a WooCommerce backup by checking that the file ends properly and that the archive opens. A cut-off export looks fine in your downloads folder but fails on import. Open the end of the file, count the tables, and restore it once on a test site.

A mysqldump or WP-CLI file finishes with a line that starts with -- Dump completed on, and tail -n 2 backup.sql shows it. Run gunzip -t backup.sql.gz to test a compressed copy.

A phpMyAdmin file has no such line. Ours ended with three SET statements that restore the character set, so a missing completion line is normal there.

Last lines of a WooCommerce database dump file
Output from our WooCommerce 11.2 test store

Count the tables too. Running grep -c 'CREATE TABLE' backup.sql on our WP-CLI file returned 59, which matched the 59 tables in the database.

The strongest check is a real restore on a copy. Build a local site with Local WP, import the file, and compare product and order counts with your live store. Do this at least once a quarter.

Restoring a WooCommerce Backup

You restore a WooCommerce database backup by importing the SQL file over the current database, and you restore products by importing the CSV. Restoring replaces current data, so take a fresh backup of the broken store first. Test the same steps on a copy before you touch a live store.

Restore a Database Backup With UpdraftPlus

UpdraftPlus restores a database backup from its Backup / Restore tab in three screens. Pick the components, let it prepare the files, and press Restore. We deleted two orders and three products, ran this restore, and got back to 13 products and 5 orders.

  1. Click Restore: Find the backup in the Existing backups list and click Restore, then tick Database and click Next.
  2. Confirm: The second screen says the backup files were processed. Press Restore again to start the import.
    Restore confirmation step in UpdraftPlus
  3. Read the log: The final screen prints Restore successful. The log showed UpdraftPlus loading each table under a temporary name. It renamed the tables only after the import finished, so a failed restore does not leave half a database.
    Restore successful message in UpdraftPlus

The log ends with a Disabling Maintenance mode line, so visitors see a maintenance page while the tables swap. Plan a restore for a quiet hour, and expect your store to be unavailable for a short time.

Restore an SQL File With WP-CLI

The WP-CLI command wp db import loads an SQL file into the database named in wp-config.php. A file made with wp db export includes drop statements, so it replaces the existing tables. Afterwards, count your products to confirm the restore worked.

Our file imported in under a second and the product count came back to 13.

WP-CLI database import command and product count
Output from our WooCommerce 11.2 test store

Restore an SQL File in phpMyAdmin

phpMyAdmin restores a file through its Import tab, but the file must contain drop statements or the import stops. Choose the database, open Import and pick your .sql file. The page shows a maximum upload size, which was 2,048 KiB on our test setup, and your host sets its own limit.

  1. Choose the file: Select the database, click Import and choose your SQL file. Leave the format on SQL and the other options at their defaults.
    SQL file selected on the phpMyAdmin Import tab
  2. Click Import: The default export, made without drop statements, stopped with #1050 - Table 'wp_actionscheduler_actions' already exists. If you see this, export again with the DROP TABLE option switched on.
    Import error in phpMyAdmin for a table that already exists
  3. Read the result: With drop statements in the file, phpMyAdmin printed that the import finished successfully and counted the queries it ran.
    Successful SQL import message in phpMyAdmin

Restore Products From a CSV

Restore products by going to Products > All Products > Import, choosing your CSV and clicking Continue. The Update existing products checkbox decides what happens to rows that match. The CSV documentation says matching uses the ID or the SKU, and unmatched IDs are skipped.

Our three runs on WooCommerce 11.2 show how the checkbox behaves:

  • Unchecked, empty catalog: The import created 13 products and 3 variations, with new IDs.
  • Checked, empty catalog: All 16 rows were skipped, because nothing existed to update.
  • Checked, existing products: A fresh export restored a price we had changed from 99 back to 12, and stock back to 20. The report said 16 products updated.

An older CSV is the catch. After our restore changed the IDs, importing the old file with the checkbox ticked reported that it failed to import 16 products. Export a new file before bulk edits, and import that file to roll them back.

Update existing products option on the product import screen
Screenshot from our WooCommerce 11.2 test store

Large catalogs need care. The documentation gives no size limit for the CSV importer and recommends splitting big files into smaller batches. The import screen on our test store showed a 2 MB maximum, and your host sets its own value.

On the mapping screen, review the column list before you go on.

Column mapping screen of the WooCommerce product importer
Screenshot from our WooCommerce 11.2 test store

When the import ends, the page reports the counts, which should match your export.

Import complete message in the WooCommerce product importer
Screenshot from our WooCommerce 11.2 test store

How Often to Back Up WooCommerce

Back up the WooCommerce database at least daily, and more often as your order count grows. Ask how many orders you could lose between two backups and still recover them by hand. Also take a manual copy before every plugin update, theme change or bulk edit.

The graphic below turns that rule of thumb into settings.

Recommended WooCommerce backup schedule by order volume

The free version of UpdraftPlus offers schedules of every 2, 4, 8 or 12 hours, plus daily, weekly, fortnightly and monthly. In the graphic, a store with under 10 orders a week is fine with daily backups.

At 10 to 50 orders a day, move to every 4 hours. Above that, or during a flash sale, use a real-time service.

After you save a schedule, the Backup / Restore tab shows the next run time for files and database. Check it once to confirm the schedule saved, because a schedule that never runs looks the same as one that works. Before any WooCommerce update, click Backup Now yourself, since backups before updates are a premium feature.

Why Real-Time Backups Matter for WooCommerce Orders

A real-time backup saves each change as it happens, instead of waiting for the next scheduled run. That matters because orders are rows in your database, and a restore rolls the whole database back. Everything placed after the last backup is gone from the store, even though the payments went through.

Here is a worked example. Say your last backup ran at 2:00 AM and the server fails at 4:00 PM, which is 14 hours later.

At 3 orders an hour, 14 hours holds 42 orders. A restore would erase all 42 from your admin, while the customers keep their payment confirmations.

After any restore, compare your payment gateway dashboard with your order list. Recreate missing orders from the gateway records.

Free UpdraftPlus schedules stop at every 2 hours. A store that cannot lose 2 hours of orders needs a real-time backup service instead.

If you would rather hand this work to an expert, our WordPress maintenance services cover scheduled backups and restore checks. Backups also belong in your wider WooCommerce security checklist.

Where to Store WooCommerce Backups

Store backups away from your web server, and keep at least two copies in two places. A copy that lives on the same server disappears when the server fails or gets hacked. Cloud storage plus a copy on your own computer covers most cases.

Name every file with its date, such as backup-2026-10-14.sql.gz, so you can find the right version fast when something breaks. Keep a week or two of history so you can roll back past a problem you notice late. In UpdraftPlus that is the number next to each schedule.

UpdraftPlus keeps only 2 copies by default, and both retention boxes showed 2 on our test store before we raised the database copies to 7. Raise the number so a corrupt backup never replaces the last good one. Backups hold customer names, addresses and order history, so protect them like the live database and limit who can open them.

A smaller database also backs up faster. Clearing old revisions and expired data, as in our guide to speeding up a WooCommerce website, shrinks every file you store.

Conclusion

Now you know how to backup WooCommerce database tables with UpdraftPlus, phpMyAdmin or WP-CLI, and how to protect your catalog with a product CSV. Use the database backup as your real safety net, because it holds orders. Keep the CSV for rolling back bulk edits.

Before you reset a store with the guide to resetting WooCommerce, take a database backup first. Verify that backup, store it off the server, and test a restore once a quarter. A backup you have never restored is only a guess.

Frequently Asked Questions (FAQs)

Q1. Does WooCommerce have a built-in backup feature?

No. WooCommerce core exports and imports products as CSV files and imports tax rates, but it has no full backup and no order importer. For orders you need a database backup from a plugin, phpMyAdmin or WP-CLI.

Q2. How do I back up WooCommerce orders?

Orders live in your database, so any full database backup includes them. With HPOS on, that means the four wc_orders tables. A product CSV does not contain orders.

Q3. What is the difference between a database backup and a full site backup?

A database backup holds your products, orders, customers and settings. A full site backup adds files such as the theme, plugins and uploads. To rebuild a store on a new host you need both, as the WordPress backup guide explains.

Q4. Can I back up only the WooCommerce tables?

Yes. WP-CLI accepts a --tables list, and phpMyAdmin lets you tick tables on the Custom export screen. Restore related tables together, such as the orders, addresses and operational data tables, or orders come back incomplete.

Q5. Will a backup slow down my store?

An export reads your tables, so it adds load while it runs. Schedule backups for quiet hours. Our small test store exported in under a second, but a large catalog takes longer.

Q6. Where does UpdraftPlus save backups by default?

It saves them in the wp-content/updraft folder on your server until a remote storage destination uploads them. Connect cloud storage in the Settings tab so a server failure cannot take the backups with it.

Q7. Do I need a backup before switching hosts?

Yes. Export the database and copy wp-content, then import both on the new host. Keep the old hosting account until you have checked orders, products and customers on the new store.

Q8. Can I use a product CSV from one store on another?

Yes, products import as new products with new IDs. Image URLs in the file still point at the old site, so copy your uploads folder or re-upload the images. Orders and customers do not travel in a product CSV.

Yash Kapoor
Yash Kapoor

Yash Kapoor is the founder and WordPress expert at DevDiggers, where he builds WordPress and WooCommerce plugins for loyalty programs, point-of-sale systems, digital wallets, and affiliate management. He writes about developer tools, site performance, and the technical side of running a WordPress store, drawing on years of building and maintaining production plugin codebases.

Leave a Reply

Your email address will not be published. Required fields are marked *