If you're looking to import WordPress users from CSV, you're likely managing a site that needs to handle a large number of users quickly. This is common for online stores, membership sites, e-learning platforms, or internal company portals. Manually adding users one by one just isn’t practical when dealing with hundreds or thousands of accounts.
In this guide, you’ll learn exactly how to import users into WordPress using a properly formatted CSV file. We will walk you through:
- A plugin-based method (for most users);
- A manual method using PHP code (for developers);
- And a done-for-you method by LitExtension experts if things get tricky
This tutorial is designed to help you streamline the process, avoid common mistakes, and ensure your imported users are correctly added and ready to log in.
Why Importing Users from CSV is Useful in WordPress
Manually adding users in WordPress is fine for a handful of accounts — but not when you're dealing with dozens or thousands. Importing users from a CSV file is a faster, more reliable way to bulk add customers, members, or internal users to your site.
This method is especially useful for:
- WooCommerce stores needing to migrate customer data
- Membership sites or online communities onboarding users with predefined roles
- LMS platforms enrolling students in bulk
- Internal portals or intranets adding team members efficiently
With CSV import, you can validate and format data ahead of time, avoid errors, and save hours of manual work. It’s an essential process if you're migrating from another system, onboarding users in bulk, or syncing data between environments.
Prerequisites Before WordPress Import Users from CSV
Before you begin importing users into WordPress, it’s important to set up your CSV file correctly and understand the key components involved in the process. Doing so will help you avoid errors, ensure data accuracy, and streamline the import experience — especially if you're working with sensitive user data like passwords or roles.
1. Backup your WordPress site first
Before making any bulk changes to your user database, always back up your site — including both the database and files. A failed import or corrupted CSV file can lead to duplicate users, broken accounts, or even overwritten data. Having a backup ensures you can roll back in case something goes wrong during the import process.
Learn more: How to backup WordPress site with 3 methods.
2. Understand WordPress user roles and permissions
Each user in WordPress must be assigned a role, which determines their level of access and capabilities on the site. You’ll need to define this in your CSV under the role field.
Some common roles include:
subscriber
– Basic read-only access (default for most sites)customer
– WooCommerce users who can manage their account and orderseditor
– Can edit and publish all postsadministrator
– Full access (not recommended to assign in bulk)
If you’re using plugins like LearnDash, MemberPress, or User Role Editor, you might have custom roles that also need to be mapped correctly in the CSV.
3. What information should your CSV contain?
To ensure a smooth import, your CSV file must be formatted correctly with specific columns.
These required fields are essential for creating valid user accounts:
user_login
– The username for logging in (must be unique)user_email
– The email address (must also be unique)user_pass
– Password (depending on the plugin, you may use plain text or auto-generate it)role
– The user’s assigned WordPress role
Without these fields, most plugins or scripts will not be able to process the import.
These optional fields help populate user profiles more completely:
first_name / last_name
display_name
nickname
billing_address
,shipping_address
(WooCommerce-specific)user_url
– User’s websitedescription
– Bio or about section- Custom meta fields – For memberships, courses, user levels, etc.
The exact optional fields you can use may depend on the plugin handling the import or any plugins/themes you have installed that add user meta.
Best Plugins for Effortless WordPress Import Users from CSV
There’s no one-size-fits-all solution when it comes to WordPress import users from CSV file task. Whether you're working with WooCommerce customers, user meta fields, or a simple CSV file, there's a plugin that fits your needs. Below are some of the best tools we've found, each with its own unique strengths.
1. WP All Import
WP All Import is a powerful and flexible plugin trusted by thousands of WordPress merchants. While it’s a general-purpose importer, it’s highly customizable and works flawlessly for importing users when used with its companion User Import Add-On. It supports drag-and-drop mapping, custom meta fields, and works with massive data files.
Key features:
- Supports CSV, XML, Excel, and SQL data sources;
- Drag-and-drop interface for mapping fields;
- Works with custom fields, user roles, and hashed passwords;
- Handles large-scale imports efficiently;
- Developer-friendly with PHP function integration and WPML support.
We personally recommend WP All Import for websites managing thousands of users or dealing with complex user data structures. Its flexibility and reliability make it a go-to choice for high-volume or technically demanding imports.
2. Export and Import Users and Customers
Tailored specifically for WooCommerce sites, Export and Import Users and Customers by WebToffee is perfect if you're migrating customer accounts along with their billing and shipping info. Unlike generic import tools, it understands the structure of WooCommerce customer data and handles it with ease, making it a lifesaver for store owners.
Key features:
- Import/export WordPress users and WooCommerce customers;
- Includes metadata like customer addresses and order history;
- Supports user role-based filtering;
- UTF-8 CSV support and downloadable templates;
- Free and pro versions are available for extended functionality.
We recommend this plugin for small to mid-sized WooCommerce stores (with a few hundred to several thousand customers) that require a straightforward, WooCommerce-aware solution for user migration. It's especially helpful when accuracy in customer data is critical.
3. Import and Export Users and Customers
What sets Import and Export Users and Customers apart is how well it deals with user metadata. If your users have extra profile fields, like phone numbers, job titles, or membership tiers, this plugin ensures nothing gets lost in the import. It's a solid choice for community sites or membership platforms that rely on detailed user profiles.
Key features:
- Imports users with custom metadata and user roles;
- Supports both plain text and hashed passwords;
- Sends notification emails to imported users;
- Compatible with WooCommerce and WPML;
- Offers export and bulk update options.
We recommend this plugin for smaller WordPress or WooCommerce sites (typically with fewer than 5,000 users) that require a quick and straightforward tool for transferring user data. It’s perfect for site administrators who want a functional solution without a steep learning curve.
4. Import Users from CSV
As one of the oldest and most lightweight solutions for importing users from a CSV file into WordPress, Import Users from CSV does exactly what it says. You upload a CSV, map your columns, and import. It supports WooCommerce customers, user roles, and sending welcome emails, no fuss, just results.
Key features:
- Simple CSV import with basic field mapping;
- Support for user roles, passwords, and metadata;
- Email notification options upon user creation;
- WP-CLI support for advanced users;
- Works well with WooCommerce.
We recommend this plugin for small to medium-sized sites (a few hundred to a few thousand users) looking for a lightweight, dependable solution without unnecessary complexity. It’s perfect if you value speed and simplicity over advanced features.
5. WP Import Export Lite
WP Import Export Lite goes beyond user data, it’s a comprehensive import/export tool for almost every content type in WordPress. You can manage users, posts, custom post types, and taxonomies all from one interface. It’s especially handy if you're managing full site migrations or backups.
Key features:
- Imports and exports users, posts, products, pages, etc.;
- Supports CSV, Excel, XML, and JSON formats;
- Powerful filtering and field mapping tool;
- Scheduler for automated import/export tasks;
- Clean interface with export history tracking.
We recommend this plugin for smaller sites or developers looking to test import/export processes with moderate user volumes (up to a few thousand users). It's a solid entry-level tool, and if your needs grow, the Pro version is there when you're ready.
Each of these plugins serves a distinct use case, whether you're running a WooCommerce store, managing a membership site, or handling a full-site migration. As noted in each recommendation above, the best fit ultimately depends on your site's size, complexity, and the level of control or simplicity you require during the import process.
Now that you’ve seen the top tools available, continue to the next section to see the actual process of importing users to WordPress using a plugin, step by step.
How to Perform WordPress Import Users Using a Plugin?
If you’re looking for a free, straightforward, and flexible plugin for WordPress user import, WP All Import is an excellent choice. We included it here not just because it’s popular, but because it’s proven to be reliable across a wide range of use cases. It supports CSV, XML, and Excel files, offers drag-and-drop field mapping, and handles everything from basic user data to custom fields and hashed passwords.
Step 1: Install the plugin
- In your WordPress dashboard, go to Plugins > Add New
- Search for: WP All Import
- Click Install Now, then Activate
Step 2: Start a new import for users
Now you will see the All Import section appear on the left-hand sidebar of your WordPress dashboard. Navigate to the All Import > New Import page, where you can upload your file. Please remember to select Users as the import type before uploading the CSV file.
Step 3: Review the import file
Next, check that your file has been read correctly. You’ll see how many user records were detected (for example, in the image, there are 839 users), and you can preview individual entries. If you’re using a CSV, choose the correct delimiter if needed.
Step 4: Map your data to WordPress user fields
After that, you’ll land on the drag-and-drop mapping screen. On the left, you’ll see WordPress user fields, including Username, Email, First Name, Last Name, User Role, and Password. On the right, you’ll see your imported data fields.
Simply drag each data field from your file into the corresponding WordPress field. For example:
- Drag the email column from your file into the Email field.
- Drag the username column into Username.
- If you're importing passwords, map them to the Password field (plain text or hashed, depending on your setup)
- Use the User Role field to assign roles like subscriber, customer, or editor.
You can also scroll down to map optional information in the Other User Info section (such as display name or website) and Custom Fields if your users have additional metadata.
Once all the necessary fields are mapped, click Continue to Step 4 to proceed.
Step 5: Set import options
At this step, configure how WP All Import will handle your user data.
Click Auto-detect to let the plugin automatically identify a unique field (such as email or username) for tracking each user (1). For a first-time import, the default settings are usually fine. If you plan to re-run the import, you can choose how to handle existing users, whether to update them, skip duplicates, or remove users not in the file (2).
Be sure to enable “Block email notifications during import” to prevent WordPress from sending welcome or password emails to users (3).
Once everything looks good, click Continue (4) to proceed.
Step 6: Run the import
Finally, review your import summary on the confirmation screen. If all the settings look good, click Confirm & Run Import.
Once the import is complete, navigate to Users > All Users in your WordPress dashboard to verify that all users have been successfully imported.
And that’s it! Your user data is now live on your WordPress site, thanks to WP All Import.
Pros and cons of the WordPress import users from CSV plugin method
Pros:
- User-friendly drag-and-drop interface (no coding needed).
- Supports bulk imports for all user roles, including custom ones.
- Handles custom user meta and WooCommerce customer fields.
- Compatible with large CSV files and complex data structures.
- Allows email notifications to imported users.
Cons:
- Depends on ongoing third-party plugin updates and support.
- May require some learning curve for advanced mapping setups.
How to Import Users to WordPress Manually Using PHP Code?
If you’re comfortable working with code and want more control over the import process, you can use a custom PHP script to import users directly from a CSV file. This method is ideal for developers or technically advanced users who want to automate user creation without relying on plugins.
Important note: Always create a full backup of your WordPress site before running any custom scripts.
Step 1: Prepare your CSV file
First, you should prepare a CSV file with the following required columns in the first row:
user_login
– Unique usernameuser_email
– Valid and unique email addressuser_pass
– Password (plain text)role
– WordPress user role (e.g., subscriber, customer). Optional fields like first_name and last_name can also be included.
Here’s a basic example of what your CSV file should look like when preparing to import users into WordPress:
user_login,user_email,user_pass,role,first_name,last_name johnsmith,[email protected],Password123,subscriber,John,Smith janedoe,[email protected],Password456,customer,Jane,Doe adminuser,[email protected],SecurePass789,editor,Admin,User
Then, save the file as users.csv and upload it to your WordPress site’s root directory or a folder like /wp-content/uploads/.
Step 2: Create a custom PHP script to import users
Here’s a basic PHP script that reads the CSV and creates users:
<?php // Load WordPress environment require_once( dirname(__FILE__) . '/wp-load.php' ); // Set the path to your CSV file $csv_file = ABSPATH . 'wp-content/uploads/users.csv'; if (!file_exists($csv_file)) { die('CSV file not found at: ' . $csv_file); } $row = 0; if (($handle = fopen($csv_file, "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $row++; // Skip header row and store headers if ($row === 1) { $headers = $data; continue; } // Combine headers with data to create associative array $user_data = array_combine($headers, $data); // Basic validation: check required fields if (empty($user_data['user_login']) || empty($user_data['user_email']) || empty($user_data['user_pass'])) { echo "Row {$row}: Missing required user_login, user_email, or user_pass. Skipping.<br>"; continue; } // Check if username or email already exists if (username_exists($user_data['user_login'])) { echo "Row {$row}: Username '{$user_data['user_login']}' already exists. Skipping.<br>"; continue; } if (email_exists($user_data['user_email'])) { echo "Row {$row}: Email '{$user_data['user_email']}' already exists. Skipping.<br>"; continue; } // Prepare user data array for wp_insert_user $userdata = [ 'user_login' => sanitize_user($user_data['user_login']), 'user_email' => sanitize_email($user_data['user_email']), 'user_pass' => $user_data['user_pass'], // WordPress will hash this automatically 'first_name' => $user_data['first_name'] ?? '', 'last_name' => $user_data['last_name'] ?? '', 'role' => $user_data['role'] ?? 'subscriber', // Default role if not set ]; // Insert the user $user_id = wp_insert_user($userdata); if (is_wp_error($user_id)) { echo "Row {$row}: Error importing user '{$user_data['user_login']}': " . $user_id->get_error_message() . "<br>"; } else { echo "Row {$row}: Successfully imported user '{$user_data['user_login']}'.<br>"; } } fclose($handle); } else { echo "Could not open the CSV file."; } ?>
Place this file in your WordPress root (e.g., import-users.php
) and run it by visiting https://yourdomain.com/import-users.php
.
Step 3: Test and verify imported users
Once the script completes:
- Go to WordPress Dashboard > Users
- Verify that the imported users appear correctly
- Test logging in with one of the new user credentials
- Check that assigned roles and names display properly
Pros and cons of the manual WordPress import users from CSV method
Pros:
- No plugin dependencies
- Complete control over import behavior
- Easier to automate or extend with custom logic
Cons:
- Requires PHP and WordPress knowledge
- Risky if errors exist in the code or CSV
- Lacks user-friendly UI for non-technical users
How to Import WordPress Users from CSV with LitExtension Experts?
Running into issues while importing users from CSV? Even with the right format and tools, things don’t always go as planned. Some common problems include:
- CSV formatting errors – Incorrect delimiters, missing headers, or encoding issues
- Duplicate emails or usernames – WordPress skips conflicting records silently or throws errors
- Invalid or missing roles – Using roles that don’t exist on your site can break the import
- Password handling – Some plugins require plain text, others auto-generate or expect hashed formats
If you’re dealing with a large user list, a legacy system, or a messy CSV, consider handing it off to the experts. At LitExtension, we offer custom user migration and CSV import services tailored to your WordPress or WooCommerce setup.
Step 1: Migration consultation & CSV file review
The WordPress import users from CSV file with LitExtension process begins with you sending us your CSV file. This file may contain a variety of user information, including usernames, emails, passwords, roles, addresses, and custom fields. During this phase, we’ll consult with you directly to understand your site setup, goals, and any special considerations (e.g., WooCommerce integration, custom roles, or multisite support).
We’ll review your CSV structure to identify potential issues, such as missing fields, invalid roles, or encoding problems, and plan the best strategy for a successful import.
Step 2: Customization & Demo migration
Once we’ve understood your needs, our team will clean and format your CSV file to match WordPress’s requirements. We’ll also handle:
- Mapping user roles and metadata accurately.
- Ensuring compatibility with custom fields and user-specific data.
- Adjusting field names and formats to avoid import conflicts.
Before running a full migration, we perform a demo import using a sample of your data. This provides a preview of the outcome and enables us to refine any field mappings or adjustments based on your feedback.
Step 3: Perform WordPress import users from CSV
After you approve the demo results, our migration experts proceed with importing the full set of users to your WordPress or WooCommerce site. During this phase, we:
- Import all user data according to your site’s structure.
- Ensure no conflicts with existing accounts or roles.
- Monitor the process in real-time to avoid data loss or corruption.
Our team fully manages this step, so you don’t have to worry about errors, plugins, or technical mishaps.
Step 4: Quality assurance
Now that the CSV file migration has completed, we run a comprehensive check to verify the integrity and completeness of your data. Our QA team inspects:
- Accurate role assignments and user statuses.
- Functional login credentials.
- Proper display of custom user fields.
If any issues arise, we resolve them before the final handover. Finally, we deliver the completed site to you, ready to use, with all imported users properly set up in your WordPress dashboard.
After your initial CSV import is complete, LitExtension continues to support you with a range of post-migration services to ensure your data stays accurate and up to date:
- Recent Data Migration: This service allows you to migrate any new data that was created during the CSV import process. It’s free and unlimited within 30 days after migration completion, as long as the new data accounts for less than 5% of the total entities from the initial migration.
- Re-migration: If you're not fully satisfied with the initial import or need to make changes, we offer free and unlimited re-migrations within 30 days after your migration is completed.
- Smart Update: This feature updates your site by importing only new or modified data since your last CSV import. It is available for free, with unlimited use, for up to 90 days after the migration is completed.
For a visual walkthrough, watch the video below to see how LitExtension handles the WordPress import of users from a CSV file. You'll get a behind-the-scenes look at how we manage everything from file preparation to final delivery.
With LitExtension, you’re not just getting a service; you’re gaining a team of experts dedicated to making your WordPress import users from CSV process smooth, accurate, and stress-free. Whether your CSV is simple or complex, our tailored approach ensures every user is imported correctly and securely.
We bring the best of both methods: the flexibility of plugins and the control of WordPress’s built-in tools. At the same time, we solve the limitations that each method alone can’t handle.
Bonus: How to Export Users to CSV in WordPress
Just as importing users from a CSV is useful, you may also want to export your WordPress users to a CSV file, whether for backup, syncing with other systems, email marketing, or migrating to another site.
One of the easiest tools to use you can consider is Export Users for WordPress, which is also published by WP All Import. To export your users:
- Install the plugin from Plugins > Add New
- Navigate to Users > Export to CSV
- Choose which user roles to export (e.g., subscribers, customers, editors)
- Click Download CSV
The file will include standard fields like username, email, role, and registration date. If you need to export custom user meta, you may need a more advanced tool.
If your site uses a lot of custom fields (like phone, membership_level, etc.), consider using:
- WP All Export – Offers meta field selection and scheduling (paid add-on required for users)
- Advanced User Export For WP – A niche plugin that supports exporting user meta for specific use cases
WordPress Import Users from CSV: FAQs
How do I import multiple CSV files?
To perform WordPress import users from multiple CSV files, you can either combine them into one file before importing or import each file separately using plugins like WP All Import or Import Users from CSV. Ensure the data is clean and free from duplicate records.
How do I transfer users from one WordPress site to another?
You can transfer users by exporting them from the original WordPress site using a plugin, then importing them into the new site with a compatible tool. Ensure that you preserve important fields, such as roles, passwords, and custom metadata.
To make this even easier, you can rely on LitExtension’s expert team to handle the entire user transfer process for you, especially if you’re dealing with WooCommerce data or a large user base.
How do I import data from Excel to WordPress?
Most import plugins support Excel files, or you can save your Excel file as a CSV and import it using a plugin like WP All Import. Just ensure your column headers match the standard WordPress user fields.
How do I import a CSV file into WordPress without plugins?
Yes, it’s possible to import users without a plugin by writing a custom PHP script using functions like wp_create_user() or wp_insert_user(). This approach is powerful but requires coding knowledge and careful handling of the CSV data.
Final Words
Mastering WordPress import users from CSV gives you a major advantage when managing large user lists. Instead of wasting time on manual data entry, you can streamline onboarding, ensure accuracy, and scale your site faster.
If you’re comfortable with code, the manual method works well. For most users, though, the import users from CSV plugin offers a reliable, flexible way to get the job done, complete with role assignments, passwords, and user meta support.
For more advanced cases, like importing customers from another eCommerce platform or preserving order data, consider using LitExtension’s custom migration service. Our team can handle the complexity for you securely and accurately.
We hope you found this article insightful and now have a clear understanding of WordPress import users from CSV. For more content like this, be sure to visit the LitExtension blog and join our eCommerce community to gain further insights and connect with fellow business owners.