su.Zero
back to main sitelogo and back to blog home
 
 

如果您需要重新設定一個自己架設的 WordPress blog 的密碼卻又不想用寄信的方式。您可以試試看以下的方法。

WordPress 使用 phpass 這個 hash 模組對你的密碼進行加密。因此如果你要重設你的密碼,你必須先切換到 WordPress 目錄下輸入 php -a 啟動 PHP 的互動式環境(Interactive shell)。啟動後,輸入下面的語法產生您的新密碼。

1
2
3
require('wp-includes/class-phpass.php');
$h = new PasswordHash(8, TRUE);
echo $h->HashPassword('your password'); // 請把 your password 換成您的密碼。

取得這個密碼後,使用 phpMyAdmin 把 wp_users 中使用者帳號對應的密碼欄位用上面產生的密碼換掉就可以使用新密碼登入了!

 

留言 Comments

 
© 2009 All Rights Reserved. | Powered by WordPress