I'm going to import about 10,000 customers to my Wordpress site from another Content management systems. Issue is, none of the passwords are likely to work since they're not encoded.

How do you secure many of these passwords rapidly and in ways that Wordpress will recognize and accept to ensure that customers can login?

Because it works out, I discovered a few different ways to get this done. The first is carried out by your mysql phpmyadmin area (around the "sql" tab once you have selected the best database) and was published by Andrew Vit on another thread within stackoverflow:

get_userdata

for that "where" condition, if all of your passwords are identical length, you may make use of the following condition:

UPDATE wp_users SET user_pass = MD5(user_pass) WHERE ...

Obviously, in case your password length differs, simply alter the "12" above to whatever the duration of your passwords is. When they won't be the same character length then you will need to apply certain other criteria for identifying which passwords to secure (unless of course all of them have to be encoded, by which situation you are able to leave the "where" condition off entirely.

Personally, i wound up utilizing a php script to complete the job, to ensure that the passwords might be encoded by Wordpress itself (or at best while using method that Wordpress uses). Listed here are the items in my php file:

WHERE CHAR_LENGTH(wp_users.user_pass) = 12

Done by doing this, not just would be the passwords encoded using Wordpress' own method, but, additionally you obtain a printout in your screen every time you run the script, demonstrating the ID of all of the records which were up-to-date and supplying the related hashed password.

As file encryption and hashing will vary stuff, I suppose each one of these passwords have been in plain text format. Within this situation, all you want do is to use the md5 formula in it.

It can be done from the SQL or perhaps a PHP posting script. Have a look in the Resetting Your Password Codex page, which should provide you with some light.

Anyway, you will not get carried away from:

require_once( ABSPATH . WPINC . '/registration.php');

$sql = "SELECT ALL USERS FROM YOUR TABLE";
$db = new wpdb (DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);

$result = $db->get_results($sql);
foreach ($result as as $r) {
    wp_update_user(array(
        'user_login' => $r->username,
        'user_pass' => $r->password,
        'user_firstname' => $r->first_name
    ));
}

Have a look around the [cde] function documentation to determine what user info you are able to import in the beginning moment.