Skip to content

Commands for erasing and exporting personal data #610

@swissspidy

Description

@swissspidy

Back in 2018, WordPress 4.9.6 shipped new personal data export and erasure tools.

Data Export: Site owners can export a ZIP file containing a user’s personal data, using data gathered by WordPress and participating plugins.

Data Erasure: Site owners can erase a user’s personal data, including data collected by participating plugins.

Users can ask to export or erase their data, and the admin will receive an email where they can grant these requests. In wp-admin they can also send those requests themselves, which requires confirmation from the user (they get an email). Admins see a list of pending requests.

For export requests, admins can either download the data as a ZIP themselves or mark the request as completed. After completion they can remove it.

For erasure requests, the admin can either force-erase personal data (oddly enough even for completed requests) or mark the request as completed. After completion they can remove it as well.

So far, this functionality was not covered by WP-CLI. I don't see why that shouldn't be the case. Let's add new dedicated WP-CLI commands for it. I think entity-command is the right place. Not sure about the name, but wp user privacy-request could work. Example:

  • wp user privacy-request list
  • wp user privacy-request create
  • wp user privacy-request delete
  • wp user privacy-request erase
  • wp user privacy-request export
  • wp user privacy-request complete

Both types of requests use the built-in user_request post type. wp user request is too vague though.

Should we support both export and erase as separate subcommands, or a single fulfill command that detects the action type? I lean towards separate commands for clarity, matching the UI.

wp user privacy-request list is theoretically covered by wp post list, but with all the custom meta fields and post statuses, a separate command might be best.

See also:

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions