Daan - Strip DB Dump
Adds shorthands in WP-CLI to easily create database dumps without sensitive data, i.e. customers, users and/or orders.
by Daan from Daan.dev · github.com/dan0sz/strip-db-dump · website
★ 12stars
13release downloads
34composer installs
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/dan0sz/strip-db-dump/releases/download/v1.1.4/daan-strip-db-dump.zipAlso on Packagist as daan/strip-db-dump:
composer require daan/strip-db-dumpDeclares an update source (Dan0sz/strip-db-dump), so updates arrive through the plugin's own updater.
From the readme
WP-CLI Strip Database Dump
This is a tiny plugin, which adds shorthands to WP-CLI which allows you to easily create database dumps and exclude
sensitive data.
The following options are available:
- --users: excludes the wpusers and wpusermeta tables.
- --customers: excludes Customer related tables for supported 3rd party plugins.
- --orders: excludes Order related tables for supported 3rd party plugins.
- --all: exclude all of the above.
After running the command, 2 separate database exports are created:
1. [your-filename]-1.sql containing all tables where data should be retained.
2. [your-filename]-2.sql containing all tables where all data should be stripped.
[!IMPORTANT]
The created DB dumps must be imported in the provided order.
Usage
To create a database that excludes orders, customers and users and save it one directory up from the current directory,
run it as
follows:
To just strip customer data and store the dump in the current directory, run:
[!NOTE]
It's not required to append a file extension to the filename argument.
If no filename is provided, a random one will be generated and saved in WordPress' root directory.
[!IMPORTANT]
When the --users paramet
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.1.4 | Mar 19, 2025 | daan-strip-db-dump.zip | 4 |
| v1.1.3 | Jan 26, 2025 | daan-strip-db-dump.zip | 1 |
| v1.1.2 | Jan 26, 2025 | daan-strip-db-dump.zip | 0 |
| v1.1.1 | Jan 26, 2025 | daan-strip-db-dump.zip | 3 |
| v1.1.0 | Jan 26, 2025 | daan-strip-db-dump.zip | 0 |
| v1.0.1 | Jan 25, 2025 | daan-strip-db-dump.zip | 3 |
| v1.0.0 | Jan 25, 2025 | daan-strip-db-dump.zip | 2 |