views:

135

answers:

2

Hi,

I need help to quickly add about >100 username and password to a locally installed Wordpress.

I have a list of usernames in text file, and I'd let each password to be equal to username (or someother function if equal is not allowed by Wordpress).

Is there a way I can programmatically add users to Wordpress? I have access to wordpress database if that helps.

Thanks.

A: 

Check out this plugin, it will let you import users from a csv which is basically what you're looking to do:

http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/

brendan
A: 

If you don't want to use a plugin and you have your users and passwords stored in an array, simply throw it into a loop and use the 'wp_create_user' function. It takes 3 parameters (username, password and email). It will return the ID if successful and false if not.

http://codex.wordpress.org/Function_Reference/wp_create_user

st4ck0v3rfl0w