WP Scrubber #6 in Privacy & Compliance
BETA: This plugin provides a command-line interface for scrubbing sensitive user and comment data from a WordPress installation.
★ 28stars
20kcomposer installs
5forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/10up/wp-scrubber/archive/refs/heads/develop.zipAlso on Packagist as 10up/wp-scrubber:
composer require 10up/wp-scrubberDeclares an update source (https://github.com/10up/wp-scrubber), so updates arrive through the plugin's own updater.
From the readme
WordPress Scrubber
This WordPress plugin provides a command-line interface for scrubbing sensitive user and comment data from a WordPress installation.
Installation
1. Clone or download the plugin files into your WordPress plugins directory.
1. Note: If on WordPress VIP, the plugin should be added to the /client-mu-plugins directory.
2. Activate the plugin through the WordPress admin interface or via WP-CLI.
3. Set the WPENVIRONMENTTYPE to local or staging.
Usage
The plugin provides a WP-CLI command called wp scrub all that will scrub all user and comment data from the WordPress database. This command can only be run on non-production environments, unless overridden with wpscrubberallowonproduction. You can also run wp scrub users or wp scrub comments to only scrub users or comments.
To use the command, open up your terminal and navigate to your WordPress installation. Then run the following commands:
When creating an export for local development, best practice is to export a scrubbed database from a lower environment:
Copy production into a lower environment (staging, develop, preprod, etc...)
Scrub the data on the lower environment with the wp scrub all command.