The easiest way to import users to WordPress from CSV

How do I upload bulk users to WordPress? Even creating a new user account can be a bit annoying, you have to add the username, the email, first name, last name, password, role… So what is the easiest and quickest way to import users to WordPress?


There are plenty of plugins in the WordPress plugins repository that do user import, but some bring too much complexity. The Import Users from CSV by Andrew Lima it’s by far the easiest way to bulk upload users to WordPress. You need a CSV file formatted in a specific way and the plugin will:

  • Import all users fields
  • Import user meta
  • Update existing users by specifying ID field
  • Allow setting user role
  • Send new user notification (if the option is selected)
  • Show password nag on user login (if the option is selected)

However, there are some steps you should make in order to have a successful user import.

Do you need to send emails to the new users?

Make a quick check if the site is sending out emails by making a password recovery action with your email

You want to make sure no emails are sent out when a new user is created?

You can redirect all WordPress emails to your address and log them.

Backing up the users tables in the database in case the import does not work

This is a mandatory step and can be easily done using phpMyadmin. You can either backup the entire database either backup just 2 tables: wp_users and wp_usermeta.

To backup these 2 tables, select them, and from the dropdown below select export:

 

Now we are all set.

Using the Import Users from CSV plugin

First, install the plugin from here. The plugin will appear in the WordPress Dashboard under Users

Prepare the CSV file (a sample comes with the plugin). You need  to be careful about the order of the fields and make sure you don’t have any commas inside a column:

  • user_login(can be the user email if the users are going to login with their email addresses)
  • user_email
  • user_pass
  • first_name
  • last_name
  • display_name (how the user will see himself in the dashboard)
  • role(user role)
  • custom_usermeta_1  (if you don’t know what this is, or you don’t need any usermetas you can leave these colums empty)

WordPress has six pre-defined roles: Super Admin, Administrator, Editor, Author, Contributor and Subscriber. But you can have more roles added by other plugins, so you have to make sure you fill the role column with the right value.

The interface is very streamlined:

You browse for the CSV file that you created; send user notifications by email to the new users. Let the users choose their own password by checking the Show password nag on new users signon box. And most importantly you can update users if you made a mistake by checking the Update user when a username or email exists box, which will basically update all the user fields if you re-upload the CSV file with the same username and different columns.