Home › Forums › Back End › WordPress create users by code › Re: WordPress create users by code
October 27, 2011 at 2:33 pm
#89775
Member
If your adding users from a loop you can probably just create a file at root of WP and include wp-blog-header.php
.
Something like this should work.
require 'wp-blog-header.php';
$users = array(); // this is where you would supply all of your users
foreach( $users as $user )
wp_create_user($user->username, $user->password);
You may need to create the script on a local version of WP to fix any bugs before you put it into production. And I would suggest deleting the file when your done with it.