while working on a project, I found that "user_pass" column in "wp_users" table is varchar(64). WordPress always stores user password in md5 which is a 32 char ASCII string. So why not store it in char(32) with ascii collation. I am asking because I am working on a table that stores user password. Is there any other advantage of using varchar(64).

  • 1
    I don't think that WordPress uses md5. It uses phpass
    – shea
    Jul 10 '15 at 9:51
  • phpass is a hashing framework which supports different hashing algorithms, md5 is one of them. However, it is true that WordPress no more uses md5. Jul 13 '15 at 6:04

It is because of different encrypted algorithm. Sometimes users will override the MD5, which is the default algorithm, and add their own, which might need a little longer length to store the password.

Take a look at the Q&A's »What data type to use for hashed password field and what length?«, having detailed information about hashes and their length, at Stackoverflow for reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.