Title: Removing some fields from SQL database
Last modified: May 26, 2018

---

# Removing some fields from SQL database

 *  Resolved [matthewseymour81](https://wordpress.org/support/users/matthewseymour81/)
 * (@matthewseymour81)
 * [8 years ago](https://wordpress.org/support/topic/removing-some-fields-from-sql-database/)
 * 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](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [8 years ago](https://wordpress.org/support/topic/removing-some-fields-from-sql-database/#post-10332605)
 * 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](https://wordpress.org/support/users/matthewseymour81/)
 * (@matthewseymour81)
 * [8 years ago](https://wordpress.org/support/topic/removing-some-fields-from-sql-database/#post-10340042)
 * 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.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [matthewseymour81](https://wordpress.org/support/users/matthewseymour81/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/removing-some-fields-from-sql-database/#post-10340042)
 * Status: resolved