Wordpress: Easily Reset Your Account Password Using MySQL and PHP ワードプレス:簡単にあなたのアカウントのパスワードをMySQLとPHPを使用してリセット
Posted on 08. 08に掲載した。 Jun, 2009 by Dragos in Coding , MySQL , PHP 6月、2009 符号化 、MySQLは 、PHPのでドラゴシュで
I've just forgot my admin password on my local testing blog, and what is worse – my local machine is not configured to send external email.私はちょうど私の地元でのテストのブログに私の管理者パスワードを忘れてきたが、さらに悪いことに-私のローカルマシンの外部の電子メールを送信するように構成されていません。 Oh yeah, got to reinstall wordpress again, what a pity.そうそう、もう一度、何が残念なワードを再インストールすることになった。 No way!まさか! There are two ways of resetting your password using two easy methods.次の2つの簡単な方法を使用してパスワードをリセットするの2つの方法があります。 You'll need basic knowledge of PHP or CPanel+PHPMyAdmin.また、PHPやCPanelの基本的な知識+ PHPMyAdminにする必要があります。
I Method: CPanel+PHPMyAdmin私は方法:CPanelの+ PHPMyAdminに
For this method, it is necessary that your host have CPanel and PHPMyAdmin installed.この方法では、それはあなたのホストCPanelのとPHPMyAdminをインストールしている必要があります。 If your host doesn't have these pieces of software, but something similar to these, you can follow this tutorial and apply these steps to your situation.お使いのホストソフトウェアのこれらの作品を持っていないが、何か、これらと同様に、このチュートリアルでは、あなたの状況にこれらの手順を適用従うことができます。
First we'll need to open the PHPMyAdmin page.まず、PHPMyAdminのページを開く必要があります。 From the CPanel root page, launch PHPMyAdmin. CPanelのルートページから開始PHPMyAdminに。 The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. PHPMyAdminにのアイコンが1に似て、以下のスクリーンショットで強調したようになります。
Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress.一度PHPMyAdminには、データベースをインストール時のワードプレスを使用する何か忘れてはならないのメインページに。 If you don't remember, don't get angry.場合は覚えていないが、怒っていません。 Go to your root folder where wordpress is installed and download & open the file wp-config.php with a simple text editor like Notepad/GEdit.あなたのルートフォルダに移動しますがワードプレスをインストールされ、ダウンロード&メモ帳のような単純なテキストエディタでファイルをwp - config.phpを開いて/ geditを。 You'll need to find this line:この行を見つける必要があります:
define('DB_NAME', 'ABCD');定義('DB_NAMEパラメータ'、'ABCD'を); Note that ABCD (without the single quotes around it) is the name of the database that wordpress is installed in.は、ABCDの周りは、単一引用符(なし)のデータベースは、ワードプレスのログインがインストールされている名前であることに注意
Back on the PHPMyAdmin page, click on the link of your database name.あなたのデータベース名のリンク上に戻るPHPMyAdminのページをクリックします。 In my case it was _iwebdevel .私の場合はそれ_iwebdevelされました。
Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database.さあ、これが、別のPHPMyAdminのページを参照してくださいよ、すべてのテーブルは、ABCDのデータベースに含まれて提示されるだろう、この時間。 We need to select the table users .我々は、テーブルのユーザーを選択する必要があります。 You won't see the exact name users of this table, but a name in this format xx_users , where xx_ is the prefix of your wordpress table names.あなたが、このテーブルの正確な名前は、 ユーザーは表示されませんがxx_あなたのワードプレスのテーブル名の接頭辞は、この形式xx_usersで、名前です。 Click on the link of your users table ( xx_users ).ユーザーテーブル(xx_users)のリンクをクリックします。 In my case, as in most cases it's wp_users :私の場合は、それwp_usersほとんどのケースのように:
Now click on browse to see the rows contained in table xx_users .行表xx_usersに含まれて参照してくださいを参照する上で今すぐクリックします。
Now look for the username you want to reset the password.今は、ユーザ名、パスワードをリセットする場合を探します。 In my case I want to reset password for admin. Now click on the edit button.私の場合、私は管理者のパスワードをリセットしてください。[編集]ボタンを今すぐクリックします。
Now you'll need to generate an MD5 hash of the new password you would like to set.今あなたが設定したい新しいパスワードのMD5ハッシュを生成する必要があります。 Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password.ご希望のパスワードを入力しhttp://seoanalytic.com/tools/md5_encryptor/と移動。 After you enter your new password, click on the Encrypt! button.後、あなたの新しいパスワードを暗号化!]ボタンをクリックして入力します。
After you've encrypted your password, select and copy the newly MD5 generated hash code.後に、あなたのパスワードを暗号化したを選択して、新たにMD5ハッシュを生成されたコードをコピーします。
Now return to your PHPMyAdmin page and paste your MD5 hash from the clipboard to the input field as shown in the image below:今すぐあなたのPHPMyAdminのページに戻り、クリップボードには、入力フィールドに、下の画像に示すようにからのMD5ハッシュを貼り付けます:
Finally click on Go button to save your new password. [ 移動 ]ボタンをあなたの新しいパスワードを保存する最後にクリックします。
II Method: PHP第二法:PHPで
In my opinion the second method is much faster and simpler.私の意見でははるかに高速で2番目の方法であり、単純な。 In this method you'll just have to upload a PHP file to your host and access it with a browser.このメソッドでは、ちょうどあなたのホストには、PHPファイルをアップロードすると、ブラウザでアクセスする必要があります。 But we'll talk about it a little bit later.しかし、我々はそれについては、少し後に話しましょう。
So here's the piece of PHP code I've came up with to help you reset your wordpress account password.だからここに私はあなたのWordPressのアカウントパスワードをリセットするために思いついたしたPHPコードの一部です。
$newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $username='admin'; //put the login username you'd like to change the password to @include_once('./wp-config.php'); //get some details from your wordpress installation global $table_prefix; $conxb=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); //establish connection to your database mysql_select_db(DB_NAME,$conxb); $query='update `'.$table_prefix.'users` set `user_pass`=\''.mysql_real_escape_string(md5($newPassword)).'\' where `user_login`=\''.mysql_real_escape_string($username).'\' limit 1'; $mQuery=mysql_query($query,$conxb); //set new password echo $mQuery?'Successfully set new password. $ ='NEW_PASSWORD_GOES_HERE'newPassword; / /シングルクォートの間にあなたの新しいパスワードを入力$ユーザ名='管理者'; / /必要なinclude_onceを@にパスワードを変更したいのですがログインユーザ名を('。/ wp - config.phpの'); / /あなたのワードプレスのインストールにglobal $ table_prefixからいくつかの詳細を取得する$(DB_HOST、DB_USER、DB_PASSWORD)mysql_connect = conxb; / /データベースmysql_select_db(DB_NAMEパラメータ、$ conxb); $に'クエリ='更新`接続を確立する$ table_prefix。'ユーザ`user_pass設定`= \ ''。mysql_real_escape_string(md5は($ newPassword)の)。'\'は`user_login`= \ ''。mysql_real_escape_string($名)。'\'の値は1'; $ mQuery = mysql_query($クエリ、$ conxb); / /新しいパスワードを設定するmQuery $エコー?'が正常に設定され、新しいパスワードです。 New password: '.$newPassword:'There was an error.新しいパスワード:'。$ newPassword:'エラーが発生しました。 Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message mysql_close($conxb);エラー:'。mysql_error()の/ /の場合、結果が失敗した場合は、mysqlのエラーメッセージを表示するmysql_close($ conxb)が表示されます。
For your convenience you can download the file reset.php from here .あなたはここからファイルをreset.phpをダウンロードすることができますあなたの便宜のために。
Now extract the zip archive you've just downloaded and edit the necessary parameters to suit your needs (explanation comments are present in the PHP code above).今すぐダウンロードして、お客様のニーズに合わせて必要なパラメータを編集してzipアーカイブを抽出する(説明のコメント上記のPHPコード内で)存在している。 Then upload the file reset.php to your wordpress root installation folder.次に、あなたのワードプレスのルートインストールフォルダにファイルをreset.phpアップロードします。 To make sure that this is the right directory, look for a file named wp-config.php ,確信している、これは正しいディレクトリは、ファイルのwp - config.phpという名前を探しては、確認するには if it's there you're on the right way, else look for the directory where wp-config.php is present and upload the file reset.php there.それがある場合は、正しい方法でなら、他のディレクトリの場所のwp - config.phpが存在し、アップロードするファイルをreset.phpがあるようだ。
Finally you'll want to go to http://yourDomainName.TLD/ reset.php .最後に、あなたにhttp://yourDomainName.TLD/ reset.php移動したいと思う。 You'll see the appropriate message depending on how the script worked.どのようにスクリプトが働いて、適切なメッセージに応じて表示されます。 If there is an error, post it here and I'll try to help you, else you did everything perfectly and you can now log in with your new password.エラーがある場合は、ここにポストされ、私はあなたに役立つようにするよ、他に完全には何でもするとすぐに新しいパスワードを使ってログインすることができます。
Related posts:関連記事:
- Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? ワードプレス2.8.4:まだ準備ができてPHP 5.3以降でインストールされるか?
- Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script ワードプレス:WordpressのためのベストSEOのiTranslator、完全に自動化されたプラグインのスクリプトから無料のトラフィックを取得する
- PHP Error: Call to a member function fetch_assoc() on a non-object in PHPのエラー:メンバにFETCH_ASSOCは(非)上でオブジェクトの関数を呼び出します 。
- PHP: How to get creation time of file with PHP on Linux machines PHPの:どのようにLinuxマシン上でPHPでファイルの作成時刻を取得する
- Coding:How to fetch user profile data with SSI.php from a SMF forum database 符号化:どのようにSMFのフォーラムのデータベースからSSI.phpを持つユーザープロファイルデータをフェッチする





















































