PHPackages                             daan/strip-db-dump - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. daan/strip-db-dump

ActiveWordpress-plugin[Database &amp; ORM](/categories/database)

daan/strip-db-dump
==================

Adds shorthands in WP-CLI to easily create database dumps without sensitive data, i.e. customers, users and/or orders.

v1.1.4(1y ago)1234GPL-2.0-or-laterPHP

Since Jan 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Dan0sz/strip-db-dump)[ Packagist](https://packagist.org/packages/daan/strip-db-dump)[ RSS](/packages/daan-strip-db-dump/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)DependenciesVersions (5)Used By (0)

WP-CLI Strip Database Dump
==========================

[](#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 `wp_users` and `wp_usermeta` 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

[](#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:

```
wp strip-db dump ../stripped-db-dump.sql --all

```

To just strip customer data and store the dump in the current directory, run:

```
wp strip-db dump stripped-dump --customers

```

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` parameter is added to the command, the `users` table will be empty when importing it to your database. This means you need to create at least a new administrator user after importing the generated table. This can be done using the following WP-CLI command: `wp user create username email@address.com --role=administrator`.

3rd Party Plugin Support
------------------------

[](#3rd-party-plugin-support)

The plugin currently removes sensitive data (i.e. any data containing personal information) for the following plugins:

- AffiliateWP
- Easy Digital Downloads
- WooCommerce
- WPForms

Tip

If You want this plugin to support more 3rd party plugins, feel free to submit a pull request!

As of v1.1.1 adding support for additional 3rd party plugins is easy. It's a matter of adding a class to `src/Compatibility` and implementing this plugin's different interfaces along with their required methods. If your plugin requires truncating of Orders and Customers tables, your Compatibility class should `implement` the `CustomersCompatibilityInterface` and the `OrdersCompatibilityInterface`.

Each method should return an array of corresponding table names **without prefix!** Then, add the new class to the corresponding handlers in `Main` and you're ready to submit your PR! :-)

Installation
------------

[](#installation)

[Download the latest release](https://github.com/Dan0sz/strip-db-dump/releases/latest/download/daan-strip-db-dump.zip)from the Releases page (or click the link) and install it in WordPress:

1. Navigate to your Administrator area,
2. Go to Plugins &gt;&gt; **Add New Plugin**
3. Click the **Upload Plugin** button in the top-left of the screen
4. **Browse...** to the ZIP file and install it by clicking **Install Now**.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance45

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

4

Last Release

425d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2e019fb42c3ba635ae169ba79c36f1da6823ee5d8c7910bb0b500502e3bc258?d=identicon)[Dan0sz](/maintainers/Dan0sz)

---

Top Contributors

[![Dan0sz](https://avatars.githubusercontent.com/u/18595395?v=4)](https://github.com/Dan0sz "Dan0sz (40 commits)")

---

Tags

wordpresswp-cli

### Embed Badge

![Health badge](/badges/daan-strip-db-dump/health.svg)

```
[![Health](https://phpackages.com/badges/daan-strip-db-dump/health.svg)](https://phpackages.com/packages/daan-strip-db-dump)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
