Title: Additional Fields and databases
Last modified: August 30, 2016

---

# Additional Fields and databases

 *  [caralandicho26](https://wordpress.org/support/users/caralandicho26/)
 * (@caralandicho26)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/additional-fields-and-databases/)
 * Whenever you add additional fields in the WP-Members Registration Form, does 
   it ever store in PHPmyadmin? I read from your website that it stores it in an
   array in wp_options but is there a way where it stores it in a separate table
   so I can query them?
 * [https://wordpress.org/plugins/wp-members/](https://wordpress.org/plugins/wp-members/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/additional-fields-and-databases/#post-6536348)
 * > does it ever store in PHPmyadmin?
 * To clarify, phpMyAdmin is a database management tool. Nothing is ever stored **“
   in”** phpMyAdmin. Data is stored in your database, which will be _accessible_
   using phpMyAdmin (or some other database management client).
 * > I read from your website that it stores it in an array in wp_options
 * wp_options is a table where settings are stored. So as far as WP-Members is concerned,
   this is where it saves settings – not user data. To be more specific, all of 
   the fields that you create are stored under the option name wpmembers_fields.
   But this is just the information _about_ the custom fields, not the data that
   is saved when a user registers.
 * WordPress (and WP-Members) stores user data in two tables: wp_users and wp_userdata.
 * [wp_users](https://codex.wordpress.org/Database_Description#Table:_wp_users) 
   will contain a row for each user with the following columns:
    - ID
    - user_login
    - user_pass
    - user_nicename
    - user_email
    - user_url
    - user_registered
    - user_activation_key
    - user_status
    - display_name
 * All other fields are saved as entries in [wp_usermeta](https://codex.wordpress.org/Database_Description#Table:_wp_usermeta).
 * Each row (user) in wp_users will have a one-to-many relationship with data in
   wp_usermeta. Each custom field (and several WP native fields) are stored as user
   meta. The table columns are:
    - umeta_id (the primary key for the table)
    - user_id (the primary key from wp_users)
    - meta_key (the name of the custom field)
    - meta_value (the custom fields data for this user_id)
 * > is there a way where it stores it in a separate table so I can query them?
 * Can you query user data directly from the database? Yes. However, I would discourage
   that for two reasons:
 * First, unless you have a strong understanding of structured query language, how
   relational databases (and specifically, one-to-many relationships) work, and 
   how to do table joins in your queries, it’s going to be a challenge for you.
 * Second, working directly in the database is a bad practice in any production 
   environment.
 * That being said, and having no idea what your skill set is when it comes to writing
   queries, if you know what you are doing, yes, you can query users using phpMyAdmin.
   The answer to whether you should or not depends on this: if you read my description
   of the database tables and it makes sense to you, you probably will be able to
   do it. If the database description was confusing to you, don’t touch it.
 * If instead your experience with reading user data within a database amounts to
   single rows per user in a single table, then I would recommend exporting the 
   user data via button the plugin puts at the bottom the Users > All Users screen
   and viewing/searching in a CSV or spreadsheet, or importing that CSV into another
   process where you have a one-to-one relationship of fields.

Viewing 1 replies (of 1 total)

The topic ‘Additional Fields and databases’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/additional-fields-and-databases/#post-6536348)
 * Status: not resolved