WP SITES

3082 Coded Tutorials & 284 Plugins

Import Users To WordPress By CSV File

$19.00

Import Users from CSV File is a WordPress plugin that enables you to import users from CSV files with advanced features including batch processing, WooCommerce integration, and automatic password generation.

= Key Features =

  • Batch Processing: Import large CSV files in manageable chunks to prevent timeouts
  • WooCommerce Integration: Import customer data including billing and shipping addresses
  • Automatic Password Generation: Generate secure passwords automatically when not provided
  • Flexible Field Mapping: Support for all standard WordPress user fields and WooCommerce customer data
  • Real-time Progress Tracking: See import progress with detailed batch information
  • Error Handling: Comprehensive error reporting and logging
  • Role Management: Assign different user roles during import

= Supported Fields =

Required Fields:

  • username – User login name
  • email – Email address

Optional Fields:

  • password – User password (auto-generated if not provided)
  • display_name – Display name
  • first_name – First name
  • last_name – Last name
  • role – User role (default: customer)
  • number_of_children – Number of children

WooCommerce Billing Fields:

  • billing_first_name – Billing first name
  • billing_last_name – Billing last name
  • billing_company – Company name
  • billing_email – Billing email
  • billing_phone – Phone number
  • billing_address_1 – Address line 1
  • billing_address_2 – Address line 2
  • billing_city – City
  • billing_state – State/Province
  • billing_postcode – Postal code
  • billing_country – Country

WooCommerce Shipping Fields:

  • shipping_first_name – Shipping first name
  • shipping_last_name – Shipping last name
  • shipping_company – Shipping company
  • shipping_address_1 – Shipping address line 1
  • shipping_address_2 – Shipping address line 2
  • shipping_city – Shipping city
  • shipping_state – Shipping state/province
  • shipping_postcode – Shipping postal code
  • shipping_country – Shipping country

== Installation ==

  1. Upload the plugin files to the /wp-content/plugins/import-users-csv/ directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Users -> Import Users screen to import your CSV file

Frequently Asked Questions

= What CSV format should I use? =

Your CSV file should have headers in the first row that match the field names listed above. The order of columns doesn’t matter as long as the headers are correct. Example:

Username,Email,First Name,Last Name,Role
john_doe,john@example.com,John,Doe,Customer
jane_smith,jane@example.com,Jane,Smith,Editor

= Can I import users without passwords? =

Yes! If you don’t include a password column or leave it empty, the plugin will automatically generate secure 12-character passwords for each user.

= How does batch processing work? =

The plugin processes users in configurable batches (25-200 users per batch) to prevent timeouts and memory issues. You can see real-time progress including current batch, total processed, and any errors.

= What happens if a user already exists? =

If a username or email already exists in WordPress, the import will skip that user and report it as failed. The import continues with the remaining users.

= Can I import WooCommerce customer data? =

Yes! If WooCommerce is active, the plugin will automatically import billing and shipping information for each user. This includes addresses, phone numbers, and company information.

= How do I handle large CSV files? =

Use the batch size setting to process large files in smaller chunks. Start with 25-50 users per batch and increase if your server can handle it. The plugin will automatically continue processing all batches.

= Where are imported files stored? =

Uploaded CSV files are temporarily stored in wp-content/uploads/import-users/ and are automatically cleaned up after import completion or after 1 hour.

Usage

After plugin installation and activation :

  1. In your WordPress dashboard, go to Users > Import User
  2. Upload a CSV file containing user data. The first row must contain column headers that match the field names.
  3. Your CSV file must include the required fields. Optional fields can be omitted. The order of columns does not matter as long as the headers match the field names above.

Main Plugin Functions:

  • process_csv_file($file_path) – Main function to process and import users from a CSV file
  • import_users_init() – Plugin initialization function
  • import_users_activate() – Plugin activation hook
  • import_users_deactivate() – Plugin deactivation hook

Admin Functions:

  • add_admin_menu() – Adds the “Import Users” submenu to the WordPress admin
  • enqueue_admin_scripts($hook) – Enqueues admin scripts and styles
  • handle_import() – Handles the AJAX import process
  • render_admin_page() – Renders the admin interface

Available Hooks:

  • plugins_loaded – Initializes the plugin
  • admin_menu – Adds the admin menu
  • admin_enqueue_scripts – Enqueues admin assets
  • wp_ajax_import_users_from_csv – AJAX action for importing users

CSV Field Mapping:

The plugin supports the following fields in the CSV file:

Basic User Fields:

  • username
  • password
  • display_name
  • email
  • first_name
  • last_name
  • role
  • number_of_children

Billing Fields:

  • billing_first_name
  • billing_last_name
  • billing_company
  • billing_email
  • billing_phone
  • billing_address_1
  • billing_address_2
  • billing_postcode
  • billing_city
  • billing_state
  • billing_country

Shipping Fields:

  • shipping_first_name
  • shipping_last_name
  • shipping_company
  • shipping_address_1
  • shipping_address_2
  • shipping_postcode
  • shipping_city
  • shipping_state
  • shipping_country

JavaScript Functions (in admin.js):

  • Form submission handling
  • Progress bar updates
  • Error logging
  • Success/failure reporting

Constants:

  • IMPORT_USERS_VERSION
  • IMPORT_USERS_PLUGIN_DIR
  • IMPORT_USERS_PLUGIN_URL

 

1 review for Import Users To WordPress By CSV File

  1. James (verified owner)

    The perfect addition to the Product Giveaway Manager for WooCommerce
    We have a list of 1500 families to add to our giveaway and a quick csv data sort and import takes care of it
    Thanks Brad

Only logged in customers who have purchased this product may leave a review.

Contact Us If You Have Any Questions

Go back

Your message has been sent

Warning
Warning
Warning
Warning.