Title: Adding new fields to WordPress tables(database)
Last modified: August 19, 2016

---

# Adding new fields to WordPress tables(database)

 *  [wolfull](https://wordpress.org/support/users/wolfull/)
 * (@wolfull)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/)
 * I want to store extra user-information in the wordpress database, thus i want
   to create new fields in the wp_users table. Would this cause any problems later
   on?
 * Eg; When upgrading wordpress do extra fields get lost?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [NC@WP](https://wordpress.org/support/users/ncwp/)
 * (@ncwp)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833326)
 * It may; the problem is the possibility of field name collision; you introduce
   a field called `xyz`, and a year down the road, a field with that name may appear
   in the next version of WordPress, so the upgrade will either fail on your installation
   or it will erase your data or WordPress will work incorrectly because of unexpected
   data in that field.
 * So what you may want to do is to create a new table, call it something like `
   wp_users_extra` and keep your data in it.
 *  [mikesmobile](https://wordpress.org/support/users/mikesmobile/)
 * (@mikesmobile)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833507)
 * Hi Wolfull and NC@WP.
 * I stumbled upon your posts from Google. I am hoping you could provide some guidance.
 * Here is what I am trying to do:
    1) Add a new table to my WP database. I got 
   this part down okay. 2) Add a few fields to said table. I got this part down 
   okay. 3) I need to add the ability to add that field data to my WP templates.
   How do I call that data?
 * I was going to simply add fields to the wp_user table, but after reading NC@WP’s
   response, I decided to create a new table.
 * Any guidance would be much appreciated.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833508)
 * Why not look at a plugin such as [http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/](http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/)
 *  [mikesmobile](https://wordpress.org/support/users/mikesmobile/)
 * (@mikesmobile)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833509)
 * MichaelH. That’s great. I will look at the plug-in. Let’s say that I get the 
   table created and data stored, how do I “call” that data? Is there a preferred
   method? I saw the post located at, [http://codex.wordpress.org/wpdb](http://codex.wordpress.org/wpdb).
   I’m still reading through it. Am I looking in the right area?
 * Thanks.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833510)
 * The docs at [http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/documentation/](http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/documentation/)
   explain that.
 *  [mikesmobile](https://wordpress.org/support/users/mikesmobile/)
 * (@mikesmobile)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833516)
 * Thanks MichaelH. I will look at the documentation.
 *  [mikesmobile](https://wordpress.org/support/users/mikesmobile/)
 * (@mikesmobile)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833517)
 * Thanks also to [NC@WP](http://wordpress.org/support/profile/586011) (above) who
   provided this link which further clarifies the ‘wpdb Class’, [http://codex.wordpress.org/Function_Reference/wpdb_Class](http://codex.wordpress.org/Function_Reference/wpdb_Class).
 *  [rishikeshjha](https://wordpress.org/support/users/rishikeshjha/)
 * (@rishikeshjha)
 * [17 years ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833606)
 * my problem was sloved by this link
 * Why not look at a plugin such as [http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/](http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/)
 * but there is one problem i want to add a date of birth filed in registration 
   form and . can any one tell me how to validate this filed.
 * thanks in advance….

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Adding new fields to WordPress tables(database)’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 5 participants
 * Last reply from: [rishikeshjha](https://wordpress.org/support/users/rishikeshjha/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/adding-new-fields-to-wordpress-tablesdatabase/#post-833606)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
