I am about to import about 10,000 users to my WordPress site from another CMS. Problem is, none of their passwords are going to work because they are not encrypted.
How do I encrypt all of these passwords quickly and in a way that WordPress will recognize and accept so that users can login?
As it turns out, I found a couple of other ways to do this. One is done through your mysql phpmyadmin area (on the “sql” tab once you’ve selected the right database) and was posted by Andrew Vit on another thread within stackoverflow:
for the “where” condition, if all your passwords are the same length, you might use the following condition:
Of course, if your password length is different, simply change the “12” above to whatever the length of your passwords is. If they are NOT the same character length then you’ll have to use some other criteria for determining which passwords to encrypt (unless they ALL need to be encrypted, in which case you can leave the “where” condition off entirely.
I personally ended up using a php script to do the work, so that the passwords could be encrypted by WordPress itself (or at least using the method that WordPress uses). Here are the contents of my php file:
Done this way, not only are the passwords encrypted using WordPress’ own method, but, you also get a printout on your screen each time you run the script, showing you the ID of all the records that were updated and providing the corresponding hashed password.