I’d like to to extend the wp_users table in my WordPress’ database.
Why? I want people to add more information about themselves when they sing up at my website.

I know how to extend it, but I’m afraid that when WordPress needs an update the wp_users table, i.e. the columns I added, will be deleted.

I there anyone here who has some experience with extending the wp_users table?
Will this table be updated when the WordPress version is updated?

1 Answer
1

There are far better ways of doing this. Instead of modifying the user table, make use of User Meta. It has a dedicated table, and works the same way as post meta, but for users.

  • add_user_meta
  • get_user_meta
  • update_user_meta

There are many tutorials explaining how to add additional fields to the user profile using User meta to store them, and it’s how a lot of standard data is stored already, such as the positions of boxes on the dashboard when you drag them around, how many posts to show at once in the edit screen, or which popups you’ve clicked dismiss on

Leave a Reply

Your email address will not be published. Required fields are marked *