0

I am looking for a way to export users from one Drupal 8 Site into another Drupal 8 site.

Is it possible to do this by exporting and importing the Users tables? If so which ones?

I see there are user export modules, but I try to avoid those as it seems that the passwords do not get imported.

1
  • 1
    IMO, I would set up a migration using the Migrate/Migrate-Plus module.
    – Kevin
    May 20, 2019 at 18:56

3 Answers 3

4

Export/Importing user tables might work if you're doing some sort of crude one-and-done migration. The caveat is you're going to have to think through everything in the source userbase you want to migrate so you don't ruin DB referential integrity (e.g. any contrib modules that might be storing its own user-specific data).

A better way to go about it, if you're looking for a more robust, ongoing migration process is to use the D8 migration framework. While there's currently no support for a D8-to-D8 user in the core migration framework, there is a contrib project for it.

1

About exporting, Drupal 9 has everything you need.

  • create a new view at "/admin/structure/views/add"
  • choose type (user)
  • create rest export path

You can choose serialisation as json, xml, csv, etc

0

You may want to use migrate for this but if it's a simple export and import then this module allows users import through CSV files.

https://www.drupal.org/project/user_csv_import

Also Feeds is also a good way of importing users now its ready for use in D8, you can quickly set up a parser for CSV and import.

Feeds d8 module

Heres the documentation for importing. https://www.drupal.org/docs/8/modules/feeds/creating-and-editing-import-feeds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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