How to Import Users into WordPress From a CSV File

Soflyy Plugin Review Team
August 31, 2024
Home
/
Blog
/
How to Import Users into WordPress From a CSV File

Table Of Contents

Are you looking to import user CSV file into WordPress?

Manually adding users one by one can be incredibly time-consuming and often leads to mistakes, especially when handling large numbers of users. This is a common challenge faced by website administrators who need an efficient and easy way to import users into WordPress.

In this article, we’ll share the step-by-step process of importing users into WordPress using a CSV file. We’ll be using the WP All Import plugin to make the whole process smooth and efficient.

When Should You Import Users From a CSV File?

WordPress allows you to add new users to your website one by one, but this can be a time-consuming process, especially when you have hundreds of users to add.

For example, you might run a membership or course website where you need to bulk import a list of users from an organization. Or perhaps you manage a restaurant listing website and need to add restaurant owners so they can manage their listings.

Whatever the case, an efficient and better process would be to bulk import all users from a CSV file. This method can save you a significant amount of time and simplify the entire process.

Since WordPress does not have built-in bulk import features, you will need to rely on third-party plugins to carry out this process. WP All Import stands out as the best WordPress importer plugin and supports all types of WordPress and WooCommerce data.

It is designed for beginners and comes with a user-friendly drag-and-drop interface for mapping fields from your import file to WordPress. To start the import process with WP All Import, you’ll need to create a CSV file containing all the user information.

Prepare Your WordPress CSV User Import File

If you’re migrating from another site or merging multiple sites, you can easily get a ready-to-import CSV file using the WP All Export plugin. To learn more about this process, refer to this article that walks you through how to export users.

However, if you’re preparing your CSV file from scratch, you’ll need to include all the required information. The two mandatory fields for the user import process are the username and email fields. You can also include additional fields such as:

  • First Name
  • Last Name
  • Display Name
  • User Role
  • Website
  • Registration Date
user data in a CSV file

Other than these, you might want to include additional fields specific to your needs. For example, if it’s a membership website, you might want to include the membership level and membership start date.

Once you’ve gathered all the necessary data, let’s dive into the import process in detail.

How To Easily Import Users Into WordPress Using a CSV File

Thanks to the WP All Import plugin, importing users into WordPress is a straightforward task. Though a free version is available, you’ll need the premium version of the core WP All Import plugin along with its User add-on for this task.

Import WordPress user using WP All Import

WP All Import includes a wizard that breaks down the entire import process into five simple steps. It also offers advanced features like filtering, automatic scheduling, support for custom fields, and the ability to run custom PHP code.

Once you have both the core plugin and the add-on installed on your website, follow the steps below.

1. Create a New User Import in WP All Import

Start the import process by navigating to All Import › New Import from your WordPress dashboard. WP All Import provides three ways to import your user data:

  • Upload the CSV file from your local disk.
  • Paste the file URL including from services like Dropbox or Google Sheets/Google Drive.
  • Select an existing file on your server. 

Since we have the user data in a CSV file, we’ll select the first option. Click the Upload a file option and select the CSV file from your computer.

Once the file is uploaded, under New Items, select Users as the import type. 

Start a new import and upload your user data file

Next, click the Continue to Step 2 button to move to the next step.

2. Review the User Data From the CSV File and Apply Filtering

The Review Import File step allows you to verify the user data in your CSV file. It displays the total user count in your file at the top, and you can use the gray arrows to navigate between individual user records.

Review your imported user data

This page also includes a filtering option that allows you to import only selected user data from the import file. This feature is particularly useful when dealing with large datasets, as it allows you to import only specific users. For example, if your import file is from another website, you might want to exclude the previous website’s admins from the import.

At the bottom of the page, expand the Manage Filtering Options panel and start adding your filter rules. For each filter rule, you need to add three components:

  • Element as User role.
  • Rule as not equals.
  • Value as the user role you don’t want to import.

After adding all three components, click the Add Rule button. This won’t filter the user data as the data is stored outside the WordPress database. To apply the filter to your import file, click the Apply Filters To XPath button.

apply filters to exclude specific users

You’re not restricted to applying just one filter. WP All Import lets you combine multiple filter rules to easily select which specific users to import. Once you have filtered your import file and are ready to proceed, click the Continue to Step 3 button.

3. Map Data From the User CSV File to the WordPress User Fields

This is the most important step in the import process. The Drag & Drop screen allows you to easily map fields from your CSV file to the relevant user fields in WordPress.

The page is organized into different sections such as User Account Info, Other User Info, and Custom Fields. If you’re using any other plugin, such as WooCommerce, additional sections will appear on the page.

To map a field, drag the field from the user table on the right to the relevant field box on the left.

map user fields from import file to your WordPress website

Sometimes, when you receive the user data file from a third-party service, it may not align with how you want to add the data to your website. For example, you may want to add a field that shows the user’s position and the company they work at.

WP All Import comes with advanced customization features that allow you to combine multiple columns from your import file into a single field in WordPress. You can also add field values along with static text.

For example, you use the Description field to add information about user’s position and the company.

combine multiple fields to a single import user field

Looking for even more customization? WP All Import lets you manipulate the user data by applying built-in PHP functions.

You can leave the password field blank to send a welcome email containing a password reset link to newly imported users.

After mapping all the fields, click the Continue to Step 4 button to move to the next step.

4. Send a Welcome Email With a Password Reset Link to Imported Users

The Import Settings page includes a few settings that allow WP All Import to efficiently process the data. These settings include assigning a unique identifier, allowing WordPress to send a welcome email, automatic scheduling, and a few speed optimization options.

The unique identifier helps WP All Import differentiate between user records and ensures all values are mapped properly. You can click the Auto-detect option to let WP All Import automatically select the best identifier from your records.

select unique identifier from your import file

The next option allows you to send a welcome email containing a password reset link to newly added users. Leave it unchecked to enable sending the email.

block email notification during import

While the default welcome email that WordPress sends is plain and boring, you can use a free plugin like Swift SMTP to edit the email content.

If you’re importing the file from a URL or using an existing file on your server, you can use WP All Import to import newly added data on a fixed schedule. This saves you from repeatedly running the same import process. Just add the user data to the file, and they’ll be automatically added to the website when the import runs next time. When set up, the Scheduling Options panel would look like this.

automatic scheduling of import of WordPress users

There’s also an Advanced Settings panel on the page. This includes a few speed optimization settings and some additional other settings. All these are self-explanatory and can be enabled using simple checkboxes.

advanced settings during user import

Once you’ve configured all the settings on this page, click Continue to move to the next step.

5. Confirm and Run the WordPress User CSV Import

This is the final step in the import process. Before running the import, WP All Import gives you a summary of all the steps we’ve covered and the settings we’ve applied. Review the summary to ensure everything is correct.

Import summary on the Confirm and Run screen

If you spot any mistakes, you can go back to the previous steps and correct any issues. If everything looks correct, click the green Confirm & Run Import button to start the process.

import user complete confirmation

Depending on the number of user records in your import file, WP All Import will take a few minutes to complete the process. When done, it will show a confirmation along with a summary of how many users were added and if any users were updated.

To verify if everything is correctly imported, navigate to Users › All Users in the WordPress menu and search for the newly added users. You can open individual user profiles to verify additional user fields.

imported user list in WordPress

Next: Import Other WordPress Data Types

WP All Import is a comprehensive plugin that allows you to import different types of WordPress data beyond just users. Whether you need to import posts, pages, custom post types, WooCommerce products, or any other custom data, WP All Import provides a flexible and powerful solution to handle it all.

import other data types into WordPress

For example, if you’re running a WooCommerce store, you can use WP All Import to bulk import products with detailed attributes, images, and other product details. If you’re managing a blog, you can easily import posts and pages, complete with metadata and custom fields.

Ready to simplify your data management tasks? Download and install the WP All Import plugin today!

Import User CSV File Into WordPress – Frequently Asked Questions

How Do I Import Customers Into WordPress?

Importing customers into WordPress follows the same process as importing users. In the first step, simply choose WooCommerce Customers as the import post type instead of Users.

How Do I Export All Users to CSV in WordPress?

You can follow these steps using the WP All Export plugin:

  1. Navigate to All Export › New Export and select Users as the export post type.
  2. Use the Drag & Drop interface to add your export columns.
  3. Run the export.
  4. Click the CSV button to download your export file in CSV format.

How To Mass Upload Users to WordPress?

WP All Import makes it easy to import multiple users at once from an Excel, CSV, or XML format. Here’s how:

  1. Navigate to All Import › New Import.
  2. Load your file and select Users as the import type.
  3. Use the Drag & Drop interface to map data from your file to WordPress user fields.
  4. Run the import.

How Do I Import Users From One WordPress Site to Another?

To efficiently migrate users from one WordPress site to another, use a combination of the WP All Export and WP All Import plugins.

  1. Use the WP All Export plugin to export users from your source site.
  2. Import the exported file to your destination site using the WP All Import plugin.

More Posts

Elementor vs Squarespace Which Website Builder Wins

Elementor vs Squarespace: Which Website Builder Wins?

If you’re exploring website builders, you’ve likely come across Elementor and Squarespace—two popular options that suit different needs. Elementor, a WordPress plugin, offers impressive design flexibility. It’s ideal for users [...]
Read more