How to add multiple existing users to a multisite site?

I’d try this with two steps.

First, install the Multisite User Plugin or grab the useful bits from its code. Short version: It hooks into user_register and loops through each blog in a multisite, adding the user to each one with a preset role. Handy.

Second, use wp-cli to import a CSV of users:

wp user import-csv /path/to/users.csv

By default, this will not email users. If you want it to email users, add --send-email to the command.

Not having actually done this, I’m not sure if WordPress is going to try to send 19 emails to each user when they’re added to each network site. There are plenty of email blocking plugins out there that you could engage for the import, just in case.

Leave a Comment