Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/edit user profile update

This page is marked as incomplete. You can help Codex by expanding it.


This action hook is generally used to save custom fields that have been added to the WordPress profile page.

This hook only triggers when a user is viewing another user's profile page (not their own). If you want to apply your hook to ALL profile pages (including the current user) then you also need to use the personal_options_update hook.

Consider an example: update_user_meta($user_id, 'custom_meta_key', $_POST['custom_meta_key']);
Make doubly sure that you give a different key name for the $_POST data key and the actual user meta key. If you use the same key for both, Wordpress for some reason, empties the value posted under that key. So you'll always get an empty value in $_POST['custom_meta_key'] so change it in the html input element's name attribute and append a suffix. Changing it to $_POST['custom_meta_key_data'] and it'll pass the data properly.


(integer) (optional) The user ID of the user being edited.
Default: None


This example shows how to save a custom field named 'your_field'...

 add_action('edit_user_profile_update', 'update_extra_profile_fields');
 function update_extra_profile_fields($user_id) {
     if ( current_user_can('edit_user',$user_id) )
         update_user_meta($user_id, 'my_custom_field', $_POST['your_field']);

Source File

The edit_user_profile_update hook is located in /wp-admin/user-edit.php


  • show_user_profile - Hooks near the bottom of profile page (if current user)
  • edit_user_profile - Hooks near the bottom of the profile page (if not current user)
  • personal_options_update - Hooks near top of profile page after update (if current user)
  • edit_user_profile_update - Hooks near top of profile page after update (if not current user)
  • personal_options - Hooks after the "Show toolbar..." option on profile page (if current user)
  • profile_personal_options - Hooks above the "Name" section of profile page

Return to Plugin API/Action Reference