Skip to main content
deleted 1 character in body
Source Link
тнє Sufi
  • 1.7k
  • 3
  • 19
  • 28

You can use wp_insert_user. Since your old database has passwords in base64, you can easily get the original password string using base64_decode.

$new_user_data = array(
        'user_pass' => 'password',//pass your decoded password string
        'user_login' => 'username',//pass your username
        'user_email' => 'email',
        'first_name' => 'firstname',
        'last_name' => 'lastname',
        'role' => 'author'//if you want to specify a different role other than default one
);
wp_insert_user( $new_user_data );

You need to format your old data in csv or xml or text file and read and pass themethem accordingly. And don't try to import all 15000 users at once. Do this in several parts. Also sleep() function will be quiet good to give the server some rest.

You can use wp_insert_user. Since your old database has passwords in base64, you can easily get the original password string using base64_decode.

$new_user_data = array(
        'user_pass' => 'password',//pass your decoded password string
        'user_login' => 'username',//pass your username
        'user_email' => 'email',
        'first_name' => 'firstname',
        'last_name' => 'lastname',
        'role' => 'author'//if you want to specify a different role other than default one
);
wp_insert_user( $new_user_data );

You need to format your old data in csv or xml or text file and read and pass theme accordingly. And don't try to import all 15000 users at once. Do this in several parts. Also sleep() function will be quiet good to give the server some rest.

You can use wp_insert_user. Since your old database has passwords in base64, you can easily get the original password string using base64_decode.

$new_user_data = array(
        'user_pass' => 'password',//pass your decoded password string
        'user_login' => 'username',//pass your username
        'user_email' => 'email',
        'first_name' => 'firstname',
        'last_name' => 'lastname',
        'role' => 'author'//if you want to specify a different role other than default one
);
wp_insert_user( $new_user_data );

You need to format your old data in csv or xml or text file and read and pass them accordingly. And don't try to import all 15000 users at once. Do this in several parts. Also sleep() function will be quiet good to give the server some rest.

Source Link
тнє Sufi
  • 1.7k
  • 3
  • 19
  • 28

You can use wp_insert_user. Since your old database has passwords in base64, you can easily get the original password string using base64_decode.

$new_user_data = array(
        'user_pass' => 'password',//pass your decoded password string
        'user_login' => 'username',//pass your username
        'user_email' => 'email',
        'first_name' => 'firstname',
        'last_name' => 'lastname',
        'role' => 'author'//if you want to specify a different role other than default one
);
wp_insert_user( $new_user_data );

You need to format your old data in csv or xml or text file and read and pass theme accordingly. And don't try to import all 15000 users at once. Do this in several parts. Also sleep() function will be quiet good to give the server some rest.