{"id":24592434,"url":"https://github.com/dan0sz/strip-db-dump","last_synced_at":"2025-03-18T02:46:18.755Z","repository":{"id":273941476,"uuid":"921385983","full_name":"Dan0sz/strip-db-dump","owner":"Dan0sz","description":"Adds shorthands in WP-CLI to easily create database dumps without sensitive data, i.e. customers, users and/or orders.","archived":false,"fork":false,"pushed_at":"2025-02-10T14:03:59.000Z","size":42,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T01:19:23.126Z","etag":null,"topics":["wordpress","wp-cli"],"latest_commit_sha":null,"homepage":"https://daan.dev","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dan0sz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-23T21:15:25.000Z","updated_at":"2025-02-19T15:16:09.000Z","dependencies_parsed_at":"2025-01-23T22:23:26.887Z","dependency_job_id":"18c1a563-0153-4f14-aed6-d39cd4ffed0c","html_url":"https://github.com/Dan0sz/strip-db-dump","commit_stats":null,"previous_names":["dan0sz/custom-db-dump"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan0sz%2Fstrip-db-dump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan0sz%2Fstrip-db-dump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan0sz%2Fstrip-db-dump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan0sz%2Fstrip-db-dump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dan0sz","download_url":"https://codeload.github.com/Dan0sz/strip-db-dump/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244147376,"owners_count":20405940,"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":["wordpress","wp-cli"],"created_at":"2025-01-24T10:14:28.102Z","updated_at":"2025-03-18T02:46:18.744Z","avatar_url":"https://github.com/Dan0sz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WP-CLI Strip Database Dump\n\nThis is a tiny plugin, which adds shorthands to WP-CLI which allows you to easily create database dumps and exclude\nsensitive data.\n\nThe following options are available:\n\n- `--users`: excludes the `wp_users` and `wp_usermeta` tables.\n- `--customers`: excludes Customer related tables for supported 3rd party plugins.\n- `--orders`: excludes Order related tables for supported 3rd party plugins.\n- `--all`: exclude all of the above.\n\nAfter running the command, 2 separate database exports are created:\n\n1. `[your-filename]-1.sql` containing all tables where data should be retained.\n2. `[your-filename]-2.sql` containing all tables where all data should be stripped.\n\n\u003e [!IMPORTANT]\n\u003e The created DB dumps must be imported in the provided order.\n\n### Usage\n\nTo create a database that excludes orders, customers and users and save it one directory up from the current directory,\nrun it as\nfollows:\n\n````\nwp strip-db dump ../stripped-db-dump.sql --all\n````\n\nTo just strip customer data and store the dump in the current directory, run:\n\n````\nwp strip-db dump stripped-dump --customers\n````\n\n\u003e [!NOTE]\n\u003e It's not required to append a file extension to the filename argument.\n\nIf no filename is provided, a random one will be generated and saved in WordPress' root directory.\n\n\u003e [!IMPORTANT]\n\u003e When the `--users` parameter is added to the command, the `users` table will be empty when importing it to your\n\u003e database. This means you need to create at least a new administrator user after importing the generated table. This\n\u003e can\n\u003e be done using the following\n\u003e WP-CLI command: `wp user create username email@address.com --role=administrator`.\n\n## 3rd Party Plugin Support\n\nThe plugin currently removes sensitive data (i.e. any data containing personal information) for the following plugins:\n\n* AffiliateWP\n* Easy Digital Downloads\n* WooCommerce\n* WPForms\n\n\u003e [!TIP]\n\u003e If You want this plugin to support more 3rd party plugins, feel free to submit a pull request!\n\nAs of v1.1.1 adding support for additional 3rd party plugins is easy. It's a matter of adding a class to\n`src/Compatibility` and implementing this plugin's different interfaces along with their required methods. If your\nplugin requires truncating of Orders and Customers tables, your Compatibility class should `implement` the\n`CustomersCompatibilityInterface` and the `OrdersCompatibilityInterface`.\n\nEach method\nshould return an array of corresponding table names **without prefix!** Then, add the new class to the corresponding\nhandlers in `Main` and you're ready to submit your PR! :-)\n\n## Installation\n\n[Download the latest release](https://github.com/Dan0sz/strip-db-dump/releases/latest/download/daan-strip-db-dump.zip)\nfrom the Releases page (or click the link) and install it in WordPress:\n\n1. Navigate to your Administrator area,\n2. Go to Plugins \u003e\u003e **Add New Plugin**\n3. Click the **Upload Plugin** button in the top-left of the screen\n4. **Browse...** to the ZIP file and install it by clicking **Install Now**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan0sz%2Fstrip-db-dump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan0sz%2Fstrip-db-dump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan0sz%2Fstrip-db-dump/lists"}