Whether you need to migrate users between sites, bulk update user information, or restore user data from a backup, you’ll need to import those users at some point. The ability to quickly import users into WordPress using a dedicated file is a time-saving solution that you’ll want to learn how to do—and find the right plugin for.
In this article, we’ll show you how to import users into WordPress from a CSV file. This will use a dedicated plugin to move user data in bulk.
When You’d Want to Import Users Into WordPress Using CSV or Spreadsheet Files
Importing users into a WordPress site can be valuable in various scenarios. One of the most common use cases is during site migration or when consolidating multiple sites. This process will ensure a smooth transition for your existing users, and let them access their accounts without interruption.
Creating users in bulk from a CSV file is a big way to save time. It’s also helpful for certain types of sites, such as membership sites, online courses, or other large organizations. Regardless, if you want to add many users to your site at once without delay, this approach will appeal to you.
What’s more, you can modify existing user data with new information using the same approach. This can help keep your user database up-to-date with minimal effort.
Introducing the WP All Import Plugin
When it comes to plugin options, WordPress has plenty. However, not many offer the right blend of features and functionality to offer the greatest value.
WP All Import is a feature-rich WordPress importer plugin that enables you to import various types of WordPress data—including user data.
The plugin breaks down the entire import process into multiple steps, which makes it easy even for beginners to import user data into WordPress. However, there’s plenty more the plugin provides:
- There’s a drag-and-drop interface to map fields from your import file to WordPress user fields.
- You can automate and schedule your imports to run at specified intervals.
- There’s support for various file formats including CSV, Excel, and XML.
- You’re able to filter data before importing to ensure you only import necessary data.
With WP All Import, it’s a breeze to import users into WordPress. Let’s look at the entire process next.
How to Quickly Import Users Into WordPress From an External File
To begin, you’ll need the premium version of the WP All Import plugin along with its User Add-On. The latter an extension of WP All Import that adds support for mapping user-specific fields during the import process. This add-on is important for handling user data, as it adds support for crucial user fields such as roles, passwords, custom user meta, and others.
Once you install and activate the plugin and add-on, you can begin to import your users.
1. Prepare the Import File
Before you begin with the import process, it’s important to ensure you format the external file in the correct way, and that it contains all the necessary data. Your import file can be an Excel, XML, or CSV file.
Here are a few key points to consider for the best preperation:
- Unique identifier. Make sure your file contains unique identifiers such as an ID, email address, or username. This helps WP All Import differentiate between records and correctly map the fields.
- Required fields. WP All Import requires the username and email address fields to import each user record to your WordPress site. You can also include other information such as first name, last name, user roles, and more.
- Consistent formatting. It’s also important to maintain consistency in the data formatting across all records. For example, if you’re using dates, make sure that the date format is uniform throughout the file.
You can prepare all this data from scratch or export it from your existing website. The WP All Export plugin could help here, as it works in a seamless way alongside its sister plugin.
Regardless, once you have all the data in place, you can begin to import your users.
2. Create a New Import for WordPress Users
To start, navigate to All Import › New Import in your WordPress dashboard and upload your file containing the user information.
WP All Import also enables you to add a file from an external URL such as Dropbox or Google Drive, or use an existing file on your server.
On this screen, select New Items and choose Users as the import type. Next, click Continue to Step 2 to review your data.
3. Review the User Data and Apply Filtering
The Review Import File interface lets you verify whether the data in your import file is correct. WP All Import will detect the number of records in your file and display the total count at the top. You can use the gray arrows to navigate between records and individually verify each user’s information.
This step is important to ensure that the data is accurate before you proceed with the import. If you’re uploading a CSV file, you can set the appropriate field delimiter to use. For Excel and XML files, you can also select the node to import. If your file contains a lot of user information but you only want to import a subset of those records, WP All Import offers on-the-fly filtering that lets you select which specific records to import.
On the same page, expand the Manage Filtering Options panel and start adding your filters. Each filter rule consists of three components: Element, Rule, and Value.
For our example, we’ll select:
- Element for firstname.
- Rule as is not empty.
- Value as blank.
After adding all three values, click the Add Rule button.
Since the import data lives outside of the WordPress database, the plugin applies filters using the dedicated XPath query language. You don’t need to know this, as WP All Import handles it all.
You can also add multiple rules and combine them using AND and OR logic. This gives you complete control over which records to import. For example, you can apply two filters and combine them using the AND condition to only import users whose first name is not empty and who do not have the user role of administrator.
Once you’ve verified that the data looks good, click Continue to Step 3 to look at mapping your fields.
4. Map the Fields From Your Import File to the WordPress User Fields
WP All Import features a drag-and-drop interface that simplifies mapping the fields in your import file to their corresponding WordPress user fields. On the Drag and Drop dialog screen, drag the data elements from the section on the right-hand side to the appropriate fields on the left:
WP All Import requires the username and password fields. You can also expand other sections such as Other User Info and Custom Fields to map additional relevant fields.
WP All Import also lets you use custom PHP code to modify the values in your import file to fit the requirements of plugins such as WooCommerce. The WP All Import documentation covers the scope of what you can achieve with PHP using the plugin.
Once you’ve mapped all the relevant data elements, click the blue Continue to Step 4 button at the bottom to begin to look at your import options.
5. Configure the Import Settings
The Import Settings screen includes various options that let you configure how WP All Import should process the data. These settings include assigning a unique identifier, blocking email notifications to users during the import process, speed optimization options, and scheduling.
Let’s explore some of these options in more detail.
Assigning Unique Identifiers
The Unique Identifier is a value in the import file for each record. It helps WP All Import differentiate between records. This is important when you run the same import again with an updated file.
The auto-detect option works perfectly in selecting the best identifier, but you can also manually select it if needed.
On the Import Settings screen, click the green Auto-detect button, and WP All Import will automatically choose the best identifier from the field list.
There are additional options that let you control what happens when WP All Import finds new or changed data. You can also specify if WP All Import should update or delete previously imported users.
Automatic Scheduling
If you choose the Download from URL or Use Existing File option on the New Import screen, you can choose to automatically import users on a predefined schedule.
This is useful if you need to regularly sync new user data with your website. The plugin enables you to manually configure cron jobs on your server. Alternatively, you can use an optional paid service to set up automatic scheduling.
Simply expand the Scheduling Options section, select Automatic Scheduling, and select specific days and times to run your import. For example, we’ve set the import to run at 1:00 a.m. every Sunday.
This is flexible enough to fit your needs, and with the manual scheduling option, you have complete scope to set your own schedule regardless of complexity.
Configure Advanced Settings
WP All Import also includes several advanced settings to optimize the import process. These include:
- Specifying the number of records to import in each batch to prevent server timeout errors.
- If your import file contains a large volume of data, split the file into multiple files containing 1,000 records each to prevent slowdowns.
After configuring these settings, click Continue to move to run your import.
6. Run the Import and Verify the Imported Users
The next page in the process is the Confirm and Run page. This page enables you to confirm the selected settings before running the import.
The Import Summary section provides a checklist of what will happen during the import process. If you spot any mistakes, you can go back to the previous steps and correct any issues.
If everything looks correct, click the Confirm and Run Import button to start the import process. When the import completes, you’ll see a confirmation screen indicating that the process was successful.
To verify the user import, navigate to Users > All Users in the WordPress main menu and look for the imported users in the list.
That’s it! You simply run through the entire process again if you need to add or update user accounts in bulk from a dedicated file.
WP All Import is Number 1 If You Need to Import Users Into WordPress
Sometimes, you need to import users from an external file when merging multiple sites into one. Other times, you might need to move all your users to a new site. This can be a daunting task without the correct plugin.
WP All Import simplifies the process with its user-friendly, step-by-step import wizard. It comes with a range of powerful features to ensure that you import large volumes of data without any errors:
- A drag and drop interface to map fields from your file to WordPress.
- Automatic scheduling to create recurring imports.
- Advanced filtering to import only the specific records you need.
- Support for various file formats such as Excel, XML, and CSV files.
What challenges to do you face when you need to import users into WordPress? Tell us in the comments section below!