When creating a user in Wordpress an email address is required for that user. The website I'm working on requires that users remain anonymous (it's part of a research study) and I'd consider email to be an identifying piece of data. Users will be added manually, so email is not required to confirm accounts or prevent spam sign-ups.

Am I going to have to provide a fake email address for each account, or is there a way to leave this field blank?


It's possible, just no so easily via the Users page without some hackery.

The WordPress API will let you insert users without email addresses, so a little custom plugin to accept a login name and password, and a call to wp_insert_user or wp_update_user should work for you. Unfortunately I don't have time to code it up for you, but perhaps this will point you in a direction.

$userdata = array ('user_login' => 'someuser', 'user_pass' => 'swordfish');
$new_user_id = wp_update_user( $userdata );
  • Thanks! I was creating users with wp_insert_user() and, after seeing the email column is set to refuse nulls in the database, assumed that the issue was with not providing an email address. After you pointed out that an email is not required by the WordPress API I discovered the true source of the problem. – Mike Wheaton Jul 13 '11 at 16:34

This is a pretty old question, but is still relevant.

Anyway, @Milo definitely had the right idea.

Here is what I use and it works great. This is very convenient when you want to create users, but prefer to keep your wordpress backend on lockdown. For example if you have a blog and prefer your content authors submit their work to you, this enables you create a user for them while not actually giving them access. Or if you prefer to blog under an alias. Or it's even useful for testing purposes or I guess those "sketchy" people who want to make up a bunch of fake users for their site (you know who you are).

Add this to functions.php temporarily or use it with a useful plugin like code snippets.

function wpse_22754_insert_new_user() {

    $user_data = array(
    'ID' => '', // automatically created
    'user_pass' => 'swordfish',
    'user_login' => 'someuser',
    'user_nicename' => 'Some User',
    'user_email' => '',
    'display_name' => 'John',
    'nickname' => 'jsmith',
    'first_name' => 'John',
    'last_name' => 'John',
    'user_url' => '',
    'user_registered' => '2015-06-26 10:55:55', // leave empty for auto
    'role' => get_option('default_role') // administrator, editor, subscriber, author, etc

    $user_id = wp_insert_user( $user_data );

add_action( 'admin_init', 'wpse_22754_insert_new_user' );

If you are looking to update users from the backend after creating them, add this and you'll avoid getting the error/warning notification.

function wpse_22754_empty_email_error( $arg ) {
    if ( !empty( $arg->errors['empty_email'] ) ) unset( $arg->errors['empty_email'] );
add_action( 'user_profile_update_errors', 'wpse_22754_empty_email_error' );

If you'd rather use a plugin this one will do the job most likely:



According to WordPress' documentation, wp_create_user also let's you insert users without e-mail, as it is an optional parameter. All you need to do is provide a unique username and a password.


Using Wordpress 4.7.2, I solved this with the following hooks:

// This will suppress empty email errors when submitting the user form
add_action('user_profile_update_errors', 'my_user_profile_update_errors', 10, 3 );
function my_user_profile_update_errors($errors, $update, $user) {

// This will remove javascript required validation for email input
// It will also remove the '(required)' text in the label
// Works for new user, user profile and edit user forms
add_action('user_new_form', 'my_user_new_form', 10, 1);
add_action('show_user_profile', 'my_user_new_form', 10, 1);
add_action('edit_user_profile', 'my_user_new_form', 10, 1);
function my_user_new_form($form_type) {
    <script type="text/javascript">
        // Uncheck send new user email option by default
        <?php if (isset($form_type) && $form_type === 'add-new-user') : ?>
        <?php endif; ?>

The "Import Users from CSV" plugin will allow you to create users with no email address. I added them with...

Gamble,Bill,Bill Gamble,BillGamble

Our club leverages the Wordpress wp_users database, but we need to have on file even those members who have no email

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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