I try to customize users profile using this code (from this tutorial) :

<?php function extra_user_profile_fields( $user ) { ?>

  <table class="form-table">
        <td><input class="regular-text" id="entreprise" type="text" name="entreprise" value="<?php echo esc_attr( get_the_author_meta( 'entreprise', $user->ID ) ); ?>" /></td>
        <td><input class="regular-text" id="os" type="text" name="os" value="<?php echo esc_attr( get_the_author_meta( 'os', $user->ID ) ); ?>" /></td>

<?php }
add_action( 'show_user_profile', 'extra_user_profile_fields' );
add_action( 'edit_user_profile', 'extra_user_profile_fields' );

function save_extra_user_profile_fields( $user_id ) {
    if ( !current_user_can( 'edit_user', $user_id ) ) { 
        return false; 
    update_user_meta( $user_id, 'entreprise', $_POST['entreprise'] );
    update_user_meta( $user_id, 'os', $_POST['os'] );
add_action( 'personal_options_update', 'save_extra_user_profile_fields' );
add_action( 'edit_user_profile_update', 'save_extra_user_profile_fields' ); ?>

I saw a strange thing when I tried to add custom user meta data into Wordpress; I save custom data on a user's profile, the data is saved on the page and I can see it even if I reload it, but when I take a look in the database, the table _usermeta hasn't changed at all; the custom data is nowhere ! I tried other tutorials, there isn't any php problem, but it doesn't change.

It's driving me mad, where are the data stored then ?

1 Answer 1


It should be stored in the wp_usermeta table under the entreprise and os user meta keys.

You should consider using prefix on your custom meta keys, to avoid name collison. Example:


It should show up with:

SELECT * FROM `wp_usermeta` WHERE `meta_key` = 'entreprise'

in your MySQL administration tool, e.g. PHPMyAdmin.

... and make sure you're in the correct database ;-)

  • I made a request into phpMyAdmin then I saw them. The next lines (after ~30) into the main request were only hidden, that's why I didn't saw them (yeah phpMyAdmin). One reason why command line is better.. I was searching too far for this silly tiny detail. Thank you to have opened my blind eyes and for your quick answer ^^
    – Sovnfield
    Jul 9, 2015 at 12:16
  • glad to hear it worked out for you @Kerzzy
    – birgire
    Jul 9, 2015 at 12:33

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.