{"id":14979008,"url":"https://github.com/williarin/wordpress-anonymizer","last_synced_at":"2025-10-28T14:30:47.237Z","repository":{"id":57080829,"uuid":"454782399","full_name":"williarin/wordpress-anonymizer","owner":"williarin","description":"Anonymize a WordPress database without a WordPress installation","archived":false,"fork":false,"pushed_at":"2022-02-05T04:43:00.000Z","size":47,"stargazers_count":19,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T15:22:01.367Z","etag":null,"topics":["anonymization","docker-image","mysql","third-party-library","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williarin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-02T13:19:52.000Z","updated_at":"2024-12-05T16:28:57.000Z","dependencies_parsed_at":"2022-08-24T13:10:36.438Z","dependency_job_id":null,"html_url":"https://github.com/williarin/wordpress-anonymizer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williarin%2Fwordpress-anonymizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williarin%2Fwordpress-anonymizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williarin%2Fwordpress-anonymizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williarin%2Fwordpress-anonymizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williarin","download_url":"https://codeload.github.com/williarin/wordpress-anonymizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238662664,"owners_count":19509642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anonymization","docker-image","mysql","third-party-library","wordpress"],"created_at":"2024-09-24T13:58:54.453Z","updated_at":"2025-10-28T14:30:41.914Z","avatar_url":"https://github.com/williarin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Anonymizer\n\n## Introduction\n\nThis repository can be used as a third party library or as a standalone Docker application.\n\nThe main use case is to anonymize a database filled with user and customer data before committing it to a VCS repository.\nIt will anonymize both WordPress base data and WooCommerce data. \n\n## Docker standalone usage\n\nRun this command to automatically anonymize your WordPress database.\n\n**WARNING!** This operation is irreversible. Make a database backup before proceeding.\nTo make automatic backups of your WordPress database, you can use [williarin/secure-mysql-backups](https://github.com/williarin/secure-mysql-backups).\n\n```bash\ndocker run --rm \\\n    -e DATABASE_URL='mysql://user:user@127.0.0.1:3306/wp_mywebsite?serverVersion=8.0\u0026charset=utf8mb4' \\\n    williarin/wordpress-anonymizer\n```\n\nVariables:\n\n| Variable       | Description                         | Default                                                                      |\n|----------------|-------------------------------------|------------------------------------------------------------------------------|\n| `DATABASE_URL` | The database url to connect to.     | `mysql://test:test@127.0.0.1:6033/wp_test?serverVersion=8.0\u0026charset=utf8mb4` |\n| `TABLE_PREFIX` | The table prefix used by WordPress. | `wp_`                                                                        |\n\n\n## Installation as a library in your project\n\nTo integrate this library to your project, install it with Composer:\n```bash\ncomposer require williarin/wordpress-anonymizer\n```\n\n### Usage\n\n```php\n$faker = Faker\\Factory::create();\n$connection = DriverManager::getConnection(['url' =\u003e 'mysql://user:pass@localhost:3306/wp_mywebsite?serverVersion=8.0']);\n$tablePrefix = 'wp_';\n\n$anonymizer = new Anonymizer([\n    new UserProvider($connection, $faker, $tablePrefix),\n    new UserMetaProvider($connection, $faker, $tablePrefix),\n    new CommentProvider($connection, $faker, $tablePrefix),\n    new WoocommerceUserMetaProvider($connection, $faker, $tablePrefix),\n    new WoocommercePostMetaProvider($connection, $faker, $tablePrefix),\n]);\n\n// Anonymize the whole database at once\n$anonymizer-\u003eanonymize();\n\n// or use a provider to anonymize only a part\n$commentProvider = new CommentProvider($connection, $faker, $tablePrefix);\n$commentProvider-\u003eanonymize();\n```\n\n## License\n\n[MIT](LICENSE)\n\nCopyright (c) 2022, William Arin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliarin%2Fwordpress-anonymizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliarin%2Fwordpress-anonymizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliarin%2Fwordpress-anonymizer/lists"}