• Resolved matthewseymour81

    (@matthewseymour81)


    Hi,

    I use your plugin to run a member area of our website with a number of additional custom fields. Due to GDPR we’ve been reducing the amount of data that we collect for new applications to join our site. However, I’m wondering if there is a way to delete the historic data from those now removed additional fields for each member from our site.

    For example, if we’ve removed the company field from our signup form is this something that we can remove from the historic data for a user who signed up a year ago and gave us this information?

    I can see that the data is held in the wp_usermeta table, but we have over 1000 members and I can’t go through each meta key and value and delete each one manually.

    Thanks for your help in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    Probably the simplest way to remove a meta value from all users is to do it as a SQL query directly in the db. A delete query as follows would delete all entries where the meta_key is “your_custom_meta_key”:

    DELETE FROM wp_usermeta WHERE meta_key = "your_custom_meta_key"

    This is the simplest way to clear out the data that isn’t needed and will no longer be used, but use caution when doing this since you’re obviously deleting records. A good habit would be to backup the database before doing a delete like this.

    Thread Starter matthewseymour81

    (@matthewseymour81)

    Hi,

    Thanks for your help. That solution worked great.

    Matthew

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing some fields from SQL database’ is closed to new replies.