title: Wordpress MD5 Password
body: <p>I need to insert users into a Wordpress blog via a PHP script or MySQL, and I have a plain text password. I thought I could do something like this:</p>
  
  <pre><code>$query = "INSERT INTO $new_db.wp_users (user_login, user_pass, user_nicename)
  select user_email, md5(user_password), user_name from $source_db.users";
  </code></pre>
  
  <p>But the passwords all look different from what the Wordpress passwords look like now. All the passwords all start with <code>$P$B</code></p>
  
  <p>From reading it says there is a salt... is there a way to take a password like test123 and turn it into the encrypted password that Wordpress expects?</p>