We manually create users via the Acquia Cloud Sites Factory. I want to create a script that bulk creates users at one time using a .csv file with just username, email, and password.

I know I can use a command like drush ucrt username —password password1 —mail test@example.com, but I need to create multiple users at the same time.

How can I achieve this?

  • Which drupal version ? Aug 4 '18 at 10:04
  • Using Drupal 8 on Acquia
    – Taz Brown
    Aug 6 '18 at 17:36
  1. Use a shell-script to stick the drush ucrt-command in a loop reading from the .csv-file.
  2. If you're on Drupal 7, use contributed module User Import.
  • Ok, not sure how to incorporate drush into the script
    – Taz Brown
    Aug 6 '18 at 15:36
  • I figured creating multiple users from a .csv would require a loo, right
    – Taz Brown
    Aug 6 '18 at 15:36
  • 1) drush is a command like any other CLI-command. you just put the command line containing the drush-command on a line in the script; 2) I've no idea why you would require a loo Aug 6 '18 at 16:36
  • Well I need to create multiple users at the same time using a .csv file.
    – Taz Brown
    Aug 6 '18 at 16:50
  • Both methods I've suggested to you will create multiple users at the same time using a .cvs file. Aug 6 '18 at 17:30

If you working with drupal 7 you can use User Import module. Import users into Drupal, or update existing users, with data from a CSV file (comma separated file). Provides a wide range of features out of the box, and a comprehensive API to customise imports.


Create an account for each user

Update existing users option (data can be added or replaced)

Upload Options

Upload CSV files through browser

Use file uploaded through SFTP, FTP,...

Drop an import file into a directory to trigger an automatic import

  • Using Drupal 8, so I guess User Import won't work.
    – Taz Brown
    Aug 6 '18 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.