Create a Random Password


/**
* The letter l (lowercase L) and the number 1
* have been removed, as they can be mistaken
* for each other.
* USAGE: $password = createRandomPassword($strlength);
*/

function createRandomPassword($strlength) {

$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ023456789";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;

while ($i <= $strlength) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; }

Don’t forget to change wp_options

update wp_options set option_value = "http://yourdomain.com" where `option_name`="siteurl";
update wp_options set option_value = "http://yourdomain.com" where `option_name`="home";