- What the WooCommerce Database Actually Contains
- Method 1 – Back Up Using a Plugin (Recommended for Most Stores)
- Method 2 – Back Up Manually Using phpMyAdmin
- Method 3 – Back Up Using WP-CLI
- How Often Should You Back Up the WooCommerce Database?
- Where to Store Your WooCommerce Database Backups
- How to Restore the WooCommerce Database from a Backup
- Conclusion
- Frequently Asked Questions
- Q.1 Does WooCommerce have a built-in backup feature?
- Q.2 What is the difference between a full site backup and a database backup in WooCommerce?
- Q.3 Can I back up just the WooCommerce tables without backing up the entire database?
- Q.4 Will taking a backup slow down my WooCommerce store?
- Q.5 How do I know if my WooCommerce database backup is valid and complete?
- Q.6 Do I need to back up my WooCommerce database before switching hosts?
How to Back Up the WooCommerce Database (3 Methods)


- What the WooCommerce Database Actually Contains
- Method 1 – Back Up Using a Plugin (Recommended for Most Stores)
- Method 2 – Back Up Manually Using phpMyAdmin
- Method 3 – Back Up Using WP-CLI
- How Often Should You Back Up the WooCommerce Database?
- Where to Store Your WooCommerce Database Backups
- How to Restore the WooCommerce Database from a Backup
- Conclusion
- Frequently Asked Questions
- Q.1 Does WooCommerce have a built-in backup feature?
- Q.2 What is the difference between a full site backup and a database backup in WooCommerce?
- Q.3 Can I back up just the WooCommerce tables without backing up the entire database?
- Q.4 Will taking a backup slow down my WooCommerce store?
- Q.5 How do I know if my WooCommerce database backup is valid and complete?
- Q.6 Do I need to back up my WooCommerce database before switching hosts?
Backing up the WooCommerce database means exporting a copy of your store’s MySQL data, orders, customers, products, settings, and transaction records, so you can restore it if something goes wrong.
Having built and maintained 25+ WooCommerce plugins, we’ve seen what happens when stores skip this step: a failed update, a failed migration, or a single bad query wipes out weeks of order data with no path back.
Most guides treat backups as a last resort. They’re not. Two minutes before an update of your plugin will allow you to complete your repairs in approximately five minutes instead of two days!
In this post, we’ll look at three different techniques for backing up your WooCommerce database: plugins, phpMyAdmin, and WP-CLI. We will also discuss how frequently backups should be performed, where they should be stored, and how to recover them if necessary.
What the WooCommerce Database Actually Contains
You should understand what you are trying to protect before you do anything to back up, as some items in your WooCommerce database may be more important than others.
WooCommerce stores everything required for your store’s operation in your WordPress MySQL database. This means all of the orders that you have received, all of your customer accounts, all of your product listings, all of your coupons, and all of your store settings are stored in the WordPress MySQL database.
WooCommerce-Specific Tables and What They Store
When you first start using WordPress, your database will include 12 tables. Each WooCommerce installation will add more tables to the database as it is used with WooCommerce. Here are the ones that matter most for backups:
- wp_posts / wp_postmeta — Products and product variations, as well as their various attributes such as prices, stock levels, descriptions, etc., are saved in these tables.
- wp_woocommerce_order_items / wp_woocommerce_order_itemmeta — These tables save the information for each line item found in every order.
- wc_order_stats / wc_customer_lookup — WooCommerce uses an advanced method of storing order analytics and customer lookup to create these tables.
- wp_woocommerce_sessions — This table saves active session data for currently logged-in Customers (i.e., information about the contents of their Shopping Carts).
- wp_options — WooCommerce stores settings related to WooCommerce, such as payment gateway credentials, tax rates, and shipping zones, as well as the core WordPress settings that run your website, in this table.
Note: The tables above are relational. For example, an order in the wp_posts table links to its line items in the wp_woocommerce_order_items table. Each line item also has metadata stored in the wp_woocommerce_order_itemmeta table. If you restore an order without its related line items or metadata, those connections break.
Once that happens, the order and its items will no longer be properly linked, and the data will not work as expected. To avoid this, always restore all related tables together. If you want to work directly with WooCommerce data, check our guide on using MySQL to manage WooCommerce orders. It includes the most important queries you’ll need.
Why a Database-Only Backup Is Not Enough (and When It Is)
A database will contain all your site’s data. But your site’s files will hold other forms of data used by your site to function: plugin code, themes, media uploads, and wp-config.php (which holds your database login details).
A database backup alone can restore your orders and products. But it cannot restore your store if your files are missing or corrupted. For a full site recovery, you need both.
That said, a database-only backup is still worth taking in specific situations. Before updating plugins, changing tax settings, or bulk editing products, export your database. This gives you a quick rollback point without needing a full site backup. Use it as a safety net, not your only backup method.
For a complete approach, see our WooCommerce Security Checklist, which explains how to include database backups in your store protection strategy.
Method 1 — Back Up Using a Plugin (Recommended for Most Stores)
For most WooCommerce stores, a backup plugin is the right choice. This tool handles scheduling, off-site storage, and full site backups. You don’t need access to your hosting control panel.
WordPress has more than one free backup plugin. The most popular of all of them is UpdraftPlus. UpdraftPlus schedules backups automatically. It stores them in multiple online locations. You can restore them with one click. This guide covers the free version only.
Setting Up UpdraftPlus for Automated WooCommerce Database Backups
- To install the UpdraftPlus plugin in WordPress, navigate to Plugins > Add New. Locate “UpdraftPlus” and Click on “Install Now” > “Activate“. This ensures that the UpdraftPlus Plugin is added to your WordPress site.

- After activating UpdraftPlus, go to Settings > UpdraftPlus Backups to open the settings page.
- In the Settings tab, find Files backup schedule. Select a frequency from the drop-down menu. Use Daily if your store has high activity.

- Under the Database backup schedule, set the same or a more frequent interval. For stores processing orders daily, daily database backups are the minimum. Busy stores should go hourly.

- In the Choose your remote storage section, select your preferred cloud destination. Google Drive and Dropbox both work well. Follow the on-screen instructions to authenticate your account.

- Click Save Changes.

- Return to the Backup / Restore tab and click Backup Now to run your first manual backup. In the pop-up, check both Include your database in the backup and Include your files in the backup.

Scheduling, Storage Destinations, and What to Include
Getting a few things right at the beginning of your project:
Make sure to have your file and database backups scheduled at the same interval. A mismatched schedule means your database and file backups may not align. This can cause issues during a restore.
Always use remote storage. Storing backups on the same server as your WooCommerce site creates a single point of failure. If the server fails, both your live store and backups can be lost.
Choose how many backups to keep. UpdraftPlus lets you set the number of stored copies. For most stores, keeping 7 to 14 days of backups provides enough history to recover from issues that were not detected immediately.
Method 2 — Back Up Manually Using phpMyAdmin
Manual backups using phpMyAdmin give you direct control over exactly what gets exported. This method does not rely on a plugin. Use it for quick database snapshots before changes. It also works when your host does not support your preferred backup plugin.
- Log in to your hosting control panel (cPanel, Plesk, or your host’s equivalent).

- Navigate to the Databases section and click phpMyAdmin.

- In the phpMyAdmin interface, locate your WordPress database in the left sidebar. If you’re not sure which database your store uses, open your wp-config.php file and look for the
DB_NAMEvalue.
- Click on your database to select it. You’ll see a list of all your tables, including the WooCommerce-specific ones listed above.

- Click the Export tab at the top of the screen.

- For a complete backup, select Custom as the export method. This lets you confirm all tables are selected. For a quick snapshot, Quick works fine.

- Under Format, select SQL. This produces a .sql file that can be imported back into any MySQL database.

- Under Output, choose Save output to a file. This downloads the backup directly to your computer.

- Click Go. phpMyAdmin will generate your backup and prompt a download.

The WooCommerce official database import and export guide recommends the SQL format. It is preferred because it can be imported directly into any MySQL-compatible database. It’s the most portable and widely supported option.
How to Verify Your Backup File Is Complete

This is the step most guides skip. A downloaded backup file is not useful if it’s corrupt or incomplete.
After the export finishes, open the .sql file in a plain text editor such as Notepad, VS Code, or TextEdit.Scroll to the very end of the file. A complete, valid MySQL backup ends with the line:
-- Dump completed on [timestamp]
If that line is missing, the export was cut short. This usually happens with very large databases that hit a server timeout. In that case, increase the execution time limit in your host’s PHP settings. Or switch to WP-CLI (Method 3 below). It handles large databases more reliably.
Move the verified backup file to your off-site storage immediately. Leaving it only on your local machine is better than nothing, but cloud storage is safer.
Method 3 — Back Up Using WP-CLI
This is the method most tutorials skip. WP-CLI lets you export your WooCommerce database over SSH. It is faster than phpMyAdmin and works reliably with large databases. It also supports automation.
You’ll need SSH access to your hosting server. Most managed WordPress hosts and VPS plans provide this.
- Open your terminal (Mac/Linux) or an SSH client like PuTTY (Windows).

- Connect to your server using your SSH credentials.
- Navigate to your WordPress root directory:
cd /var/www/html
Replace /var/www/html with your WordPress path if needed. On shared hosts, this is often /public_html.
- Run the export command:
wp db export backup-$(date +%F).sql
This exports your entire database to a file named with today’s date. Example: backup-2026-04-11.sql
- To compress the file immediately (recommended for large databases):
gzip backup-2026-04-11.sql
- Download the resulting .sql.gz file to your local machine or upload it to cloud storage using your preferred method (rsync, SFTP, or your host’s file manager).
The process usually takes under a minute on most servers. If you use WP-CLI in a deployment workflow, add this command to a simple shell script. Run it automatically before each deployment
Having built 25+ WooCommerce plugins, we run this exact command before every plugin release that touches the database. It takes two minutes and has saved us more than once.
How Often Should You Back Up the WooCommerce Database?
The right backup frequency depends on one question: if you lost everything since your last backup, how much would that hurt?
A store processing 5 to 10 orders per week can usually get away with a daily backup. Losing a few hours of data is an inconvenience, not a crisis.
A store processing 30 to 50 orders per day needs, at a minimum, a daily backup, but hourly is better. One day of lost orders on an active store could mean thousands in revenue and dozens of customer support issues.
A store running flash sales, seasonal promotions, or a high daily order volume should use real-time or near-real-time incremental backups. Tools that back up every 5 to 15 minutes exist for exactly this scenario.
There’s also a fourth scenario that applies to every store, regardless of size: always back up before a significant update. Before updating WooCommerce, WordPress core, or any plugin that integrates with your database, take a manual snapshot first. WooCommerce itself displays a warning in the admin panel recommending this before major version updates. A pre-update backup takes two minutes. A full store recovery without one takes days.
A practical framework:
- Low-activity stores (under 10 orders/week): Daily backup minimum
- Active stores (10–50 orders/day): Daily backup, with a manual snapshot before any update
- High-volume stores (50+ orders/day or frequent catalog changes): Hourly or real-time incremental backup
Where to Store Your WooCommerce Database Backups
Never store your only backup on the same server as your WooCommerce store. If the server fails, goes down, or gets compromised, your backup goes with it. That’s a single point of failure, the exact scenario a backup is meant to protect against.
Off-site storage options worth using:
- Google Drive — Free storage up to 15GB, integrates directly with UpdraftPlus. Good for small to medium stores.
- Amazon S3 — More reliable for large or high-frequency backups. Pay-per-use pricing scales with your storage needs.
- Dropbox — Straightforward to set up, well-supported by most backup plugins.
Keep at least two copies: one on cloud storage and one downloaded locally. Cloud storage goes down, too. Rarely, but it happens.
Think about retention periods as well. Most stores benefit from keeping 14 to 30 days of backup history. This window gives you time to catch issues before backups are overwritten. Examples include corrupted product tables, missing orders, or failed migrations. Regular cleanup of post revisions and expired changes is mandatory for speeding up a WooCommerce website. It keeps your database lean and reduces backup file size over time.
WooCommerce backups contain personally identifiable information (PII) covered by GDPR and similar regulations. Encrypt backup files before storing them and restrict access to trusted team members. Also, state in your privacy policy that customer data may be stored in encrypted backups.
How to Restore the WooCommerce Database from a Backup
If you created your backup with UpdraftPlus, restoration is straightforward. Go to Settings > UpdraftPlus Backups, scroll to Existing Backups, find the backup you want, and click Restore. Select all components and follow the prompts. The plugin handles the import.
For a manual restore using phpMyAdmin, the process follows these steps:
- Log in to phpMyAdmin via your hosting control panel.

- Select your WordPress database from the left sidebar.

- If you want a clean import, select all tables and choose Drop to delete them first. Do this only if you have a verified backup ready to import; dropping tables permanently removes your existing data.

- Click the Import tab.

- Click Choose File and select your .sql backup file.

- Leave the remaining settings at their defaults.

- Click Go. phpMyAdmin will import the file and rebuild your database tables.

After any restore, check your store’s front-end and admin panel immediately. Confirm that recent orders are present, product listings are unchanged, and WooCommerce settings are correct. If you restore to a staging environment first before touching your live store, you reduce the risk of a failed restore taking your store offline. This is the step most store owners skip, and the one they regret most when a restore goes wrong.
Conclusion
Backing up the WooCommerce database is a straightforward process. What makes it fail is inconsistency: skipping weeks, storing backups on the same server, or assuming a backup worked without checking.
The three methods covered here, plugin, phpMyAdmin, and WP-CLI, cover every situation, from a beginner setting up their first automated schedule to a developer scripting pre-deployment exports.
Pick the method that fits your setup, schedule it based on your order volume, store your files off-site, and verify each backup before you need it. That last step is the one most guides miss.
If you need help building a more resilient WooCommerce setup, our WooCommerce development services cover everything from database optimization to custom plugin development.
Frequently Asked Questions
Q.1 Does WooCommerce have a built-in backup feature?
No, WooCommerce does not include a built-in backup tool. You need either a dedicated backup plugin, your hosting provider’s backup service, or a manual process using phpMyAdmin or WP-CLI. WooCommerce recommends backing up before every major update, but the actual backup must be set up separately.
Q.2 What is the difference between a full site backup and a database backup in WooCommerce?
A full site backup includes both your database and your files, plugin code, theme files, media uploads, and wp-config.php. A database backup covers only the MySQL data: orders, products, customers, and settings. You need both to fully restore a WooCommerce store. A database backup alone cannot rebuild your files if they are lost or corrupted.
Q.3 Can I back up just the WooCommerce tables without backing up the entire database?
You can select specific tables during a phpMyAdmin export, but it’s not recommended for WooCommerce. WooCommerce stores data across multiple linked tables. Restoring a partial set of tables can break the relational data between orders, order items, and order metadata, leaving your store in an inconsistent state. Always back up the full database.
Q.4 Will taking a backup slow down my WooCommerce store?
Traditional backup methods using mysqldump can briefly lock database tables, which may cause slow page loads or checkout delays on very large or high-traffic stores. Plugin-based backups generally minimize this with incremental approaches that only save changes since the last backup. For large stores, scheduling backups during low-traffic hours reduces any performance impact.
Q.5 How do I know if my WooCommerce database backup is valid and complete?
Open the .sql file in any plain text editor and scroll to the very end. A complete MySQL export ends with the line — Dump completed on [timestamp]. If that line is missing, the export was cut short, and the file is not a reliable backup. For plugin-based backups, check the plugin’s log to confirm the backup completed without errors, and test a restore on a staging site periodically.
Q.6 Do I need to back up my WooCommerce database before switching hosts?
Yes. Before migrating to a new host, take a fresh backup of both your database and your site files. Export your database via phpMyAdmin or WP-CLI, download all files via FTP or your host’s file manager, and verify both before beginning the migration. Migrating without a verified backup risks losing data if the transfer fails or the new environment has compatibility issues.

Kartika Musle
Kartika Musle is a tech writer at DevDiggers covering WooCommerce features, web design, and development security. Her articles translate technically dense subjects into guides that a non-developer can follow without losing the detail that matters, drawing on a background that touches both design and development.
Join thousands of readers getting smarter every week.

Leave a Reply