Import users to wordpress db without emailing

There are a number of plugins out there that help with importing users to wordpress. The ones I found would email the users – probably because they are adding through wordpress, thereby triggering the registration and/or activation process.

We were also using Your members and the Subscribe2 plugin, so I needed to see how they would handle the setup.

I wanted to get the users pre-loaded without emails flying out all over the place, and then advise me that they could come to the site and request a “lost” password or reactivate.


PhpmyAdmin has tools to import from a csv file.   Simply ensure that the column names are the same.

Life is not that simple however.

wp_users table was easy enough.  You need a minimum of

  1. user_login
  2. user_email

and can leave the rest blank or put a dummy password in.

Ideally you probably want at a bit more. I entered into  the phpmyadmin import tool this string:


as well as obviously giving it a csv file with matching columns.  Remember to match the specification of delimiters and encapsulated strings.

Dealing with the passwords

You do not really have to!!   On login attempt, the user request ‘lost password’, get an activation email, click that  and get a new password.

That’s not all though…

However if they try to login with the new password, they get

“You do not have sufficient permissions to access this page.

This is because the user does not have a role in the wp_usermeta table.

The easy way:

If the numbers of subscribers allow you to, use the authors/users too, select all users, deselect admin or others, then click “Change role to” subscriber.  Save .

If you have problems when you are testing this process (as in you cannot get the new password email), check that you use the same browser to click on the activation link as when you requested the password.  I use firefox for my logged in admin user and IE for my subscriber tester, however since firefox is my default for my email package, it used that when ever I clicked on the activation link and wordpress must check and did not send me new password due to no match.  Took me a while to figure that one out!

The hard way:

Find the userids from the wp_user table (or guess/extrapolate) and add entries (perhaps using another csv upload!) . Note (leave umeta_id blank, wp will assign).

  1. user_id
  2. meta_keyyourtableprefix_capabilities
  3. meta_valuea:1:{s:10:”subscriber”;b:1;} for subscribers, or see what your other subscribers have

you also need another set of rows for

  1. user_id
  2. meta_keyyourtableprefix_user_level
  3. meta_value1 for subscribers

At that point, the user should now be able to login, with appropriate access to wp.

Other Plugins:


S2 (Subscribe2 ) data is blank (so no emails?).     Although it does have some bulk update tools, the subscribers do not show up initially.  More sets of user-meta rows required.

  1. s2_subscribed – -1 (for all categories, else category list
  2. s2_autosub – yes
  3. s2_excerpt – post or excerpt
  4. s2_format – text or html

Your Members:

If no data,  YM 1.4.5  treats them as free, with no expiry etc. YM will assign an RSS token when they navigate to the membership details screen. You can do more sets of rows in the user meta table to update.


There are also bulk updates in the YM member managment area, so if volumes are not too low and you can “batch” the data, you can probably update these manually.

or via the db

Creating the ym_user data via the DB  may be trickier…..

  1. ym_status – active or inactive
  2. ym_user O:15:”YourMember_User”:8:{s:8:”duration”;s:2:”10″;s:13:”duration_type”;s:1:”y”;s:6:”amount”;i:0;s:8:”currency”;s:3:”USD”;s:13:”last_pay_date”;s:10:”2009-04-18″;s:11:”expire_date”;s:10:”2019-04-18″;s:12:”account_type”;s:4:”Free”;s:10:”status_str”;s:20:”Free Account Created”;}

Your members does also have a bulk update tool in the member management area, and Sean and Tim are apparently coming up with a migration tool, so check their website.