PHPackages                             williarin/wordpress-anonymizer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. williarin/wordpress-anonymizer

ActiveProject[Utility &amp; Helpers](/categories/utility)

williarin/wordpress-anonymizer
==============================

Anonymize a WordPress database without a WordPress installation

1.0.1(4y ago)235071[6 issues](https://github.com/williarin/wordpress-anonymizer/issues)MITPHPPHP &gt;=8.0

Since Feb 4Pushed 4y ago2 watchersCompare

[ Source](https://github.com/williarin/wordpress-anonymizer)[ Packagist](https://packagist.org/packages/williarin/wordpress-anonymizer)[ RSS](/packages/williarin-wordpress-anonymizer/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (15)Versions (3)Used By (0)

WordPress Anonymizer
====================

[](#wordpress-anonymizer)

Introduction
------------

[](#introduction)

This repository can be used as a third party library or as a standalone Docker application.

The main use case is to anonymize a database filled with user and customer data before committing it to a VCS repository. It will anonymize both WordPress base data and WooCommerce data.

Docker standalone usage
-----------------------

[](#docker-standalone-usage)

Run this command to automatically anonymize your WordPress database.

**WARNING!** This operation is irreversible. Make a database backup before proceeding. To make automatic backups of your WordPress database, you can use [williarin/secure-mysql-backups](https://github.com/williarin/secure-mysql-backups).

```
docker run --rm \
    -e DATABASE_URL='mysql://user:user@127.0.0.1:3306/wp_mywebsite?serverVersion=8.0&charset=utf8mb4' \
    williarin/wordpress-anonymizer
```

Variables:

VariableDescriptionDefault`DATABASE_URL`The database url to connect to.`mysql://test:test@127.0.0.1:6033/wp_test?serverVersion=8.0&charset=utf8mb4``TABLE_PREFIX`The table prefix used by WordPress.`wp_`Installation as a library in your project
-----------------------------------------

[](#installation-as-a-library-in-your-project)

To integrate this library to your project, install it with Composer:

```
composer require williarin/wordpress-anonymizer
```

### Usage

[](#usage)

```
$faker = Faker\Factory::create();
$connection = DriverManager::getConnection(['url' => 'mysql://user:pass@localhost:3306/wp_mywebsite?serverVersion=8.0']);
$tablePrefix = 'wp_';

$anonymizer = new Anonymizer([
    new UserProvider($connection, $faker, $tablePrefix),
    new UserMetaProvider($connection, $faker, $tablePrefix),
    new CommentProvider($connection, $faker, $tablePrefix),
    new WoocommerceUserMetaProvider($connection, $faker, $tablePrefix),
    new WoocommercePostMetaProvider($connection, $faker, $tablePrefix),
]);

// Anonymize the whole database at once
$anonymizer->anonymize();

// or use a provider to anonymize only a part
$commentProvider = new CommentProvider($connection, $faker, $tablePrefix);
$commentProvider->anonymize();
```

License
-------

[](#license)

[MIT](LICENSE)

Copyright (c) 2022, William Arin

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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 ~0 days

Total

2

Last Release

1610d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/69433384?v=4)[William Arin](/maintainers/williarin)[@williarin](https://github.com/williarin)

---

Top Contributors

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

---

Tags

anonymizationdocker-imagemysqlthird-party-librarywordpress

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/williarin-wordpress-anonymizer/health.svg)

```
[![Health](https://phpackages.com/badges/williarin-wordpress-anonymizer/health.svg)](https://phpackages.com/packages/williarin-wordpress-anonymizer)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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