1

Is it mandatory for each user to have entries in usermeta table as well or it's optional? Recently, I came across a wordpress database which has thousands of users in user table however only a few of them have entries in usermeta table.

I am wondering in what scenario this could have happened as it doesn't look like those entries were manually removed from database.

1 Answer 1

0

install a fresh wordpress setup on your local machine and then have a look at wp_usersmeta table . It contains meta(additional) information for each user.You (admin) can also make data entry specific to any user by this function update_user_meta() in usermeta table. and retrive the same using get_user_meta() funciton.

All fields for all users are not necessary. meta keys can be user specific also.

defaults meta key entries for admin in wordpress 3.6 --

first_name
last_name 
nickname 
description 
rich_editing 
comment_shortcuts
admin_color
use_ssl 
show_admin_bar_front
wp_capabilities
wp_user_level 
dismissed_wp_pointers
show_welcome_panel
wp_dashboard_quick_press_last_post_id
managenav-menuscolumnshidden 
metaboxhidden_nav-menus 
nav_menu_recently_edited
closedpostboxes_page 
metaboxhidden_page 
metaboxhidden_page  
wp_user-settings wp_user-settings-time
5
  • Thanks! But that doesn't answer my question. Are there any meta keys which are mandatorily created when a wordpress user is created? For example, type of user - subscriber, editor or admin?
    – eth.block
    Commented Sep 2, 2013 at 6:02
  • yes there are a few .. thats why i suggested you to install a fresh copy of wordpress and lookup in the usermeta table . you will get to know the default meta keys which are created for each user Commented Sep 2, 2013 at 6:06
  • Great, thanks. So it implies there are indeed some meta keys which will be created everytime a user is created.
    – eth.block
    Commented Sep 2, 2013 at 6:37
  • yes :) and welcome Commented Sep 2, 2013 at 6:51
  • I don't understand why there is not a module that can do this yet...
    – Rodney
    Commented Jan 19, 2020 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.