Tested Plugin to import users via CSV file

For a client, he has many posts on his blog, that are from different authors. He wants to give ’em credit and have an author page for them

The only way to do that is to Add them as users, and fill out the bio and social accounts, depending the set-up of the site. He might even use it in combination wth the  Simple Authorbox plugin.

Simple Author Box Plugin

As always, Google and other WordPress user are my friends, and I found “5 Import User Plugins for WordPress” at the WPSolver site.

The first plugin mentioned did the trick: Import Users via CSV in the WordPress Repository. Although it hasn’t been updated for 4 years, it still performs. Normally I caution everyone in using older plugins, but for this, the user tables haven’t changed in WordPress for a while, so there as no need for additional updates on the plugin. I like that in a plugin that it does what it is supposed to do, and does it well. The plugin is also available on GitHub, for anyone who needs to tinker with it.

Back to the client project.

I created a spreadsheet with the column names, which are also the wp-user column names. The import won’t work if the column names are not identical

You can see an example spreadsheet here

All I head until now was the full name. To populate the other fields, first_name, last_name etc, I used Google Spreadsheet formulas to auto-generated passwords, bogus email addresses, usernames etc.

Our example name is Gerry Spielberg

  1. Split the full name in first_name and last_name – I cleaned up the full name (now display_name) column and removed all middle initials etc. Then For this I used “=Split(A2,” “)” command, which splits the full name cell into the adjacent empty columns on every space. First_name: Gerry last_name Spielberg.
  2. For username generation – I created the rule use lowercase first name and lowercase last name and make it the username: “=lower(C2) & lower(D2)” and Gerry’s username is now “gerryspielberg”
  3. For email and password generation, I first needed to add another column with the numbers like id for each row.
  4. For email I used the feature many email server offer that you can add a + sign and a string at the end of the handle and before the @ sign and it would be a valid email address but arrive at the same email address. Example my email address is birgit.pauli@gmail.com – If I add +15 to my email address as in birgit.pauli+15@gmail.com it still will arrive in my inbox. So I am able to auto-generate email addresses without worrying that bogus emails and notifications go out to the set of authors on this website. The formular for my Google Sheet is  =concatenate(“birgit.pauli+dg1”,B2,“@gmail.com”) with B2 being the value from the additional column I created in #3. 
  5. For password, we use the same command and created something like this: =CONCATENATE(“478o8”,B2,“$%#^RW”,B2,“6373#@”) and B2 again being the value in column B for this row.
  6. The last column is the User role, and we set everyone to be a “Subscriber”,

That’s how you can create, cleanup and assemble a list of users, without giving them access to the site.

Here is Gerry’s entry in the Spreadsheet:

screen-shot-2016-10-03-at-10-35-15-am

 

Demo Sponsors:

[sponsors style=”list” size=”medium”]

 

 

 

 

Leave a comment

Your email address will not be published. Required fields are marked *