Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Leicht Reset "Mein Konto" Passwort mit MySQL und PHP
Posted on 08. Gesendet am 08. Jun, 2009 by Dragos in Coding , MySQL , PHP Juni 2009 von Dragos in Coding, 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. Ich habe gerade vergessen Admin-Passwort auf meinem lokalen Testen Blog, und was noch schlimmer ist - meine lokalen Rechner ist nicht so konfiguriert, dass externe E-Mail zu senden. Oh yeah, got to reinstall wordpress again, what a pity. Oh yeah, got to wordpress wieder neu zu installieren, wie schade. No way! No way! There are two ways of resetting your password using two easy methods. Es gibt zwei Möglichkeiten, das Zurücksetzen des Passworts mit zwei einfachen Methoden. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. Sie müssen Grundkenntnisse in PHP oder CPanel + phpMyAdmin.
I Method: CPanel+PHPMyAdmin I Methode: CPanel + PHPMyAdmin
For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. Für diese Methode ist es notwendig, dass Ihr Rechner haben CPanel und phpMyAdmin installiert. 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. Wenn Ihr Rechner nicht über diese Teile der Software, sondern so etwas wie diese, können Sie das Tutorial und wenden diese Schritte, um Ihre Situation zu folgen.
First we'll need to open the PHPMyAdmin page. Zuerst müssen Sie die PHPMyAdmin Seite zu öffnen. From the CPanel root page, launch PHPMyAdmin. Von der CPanel Root-Seite, starten Sie phpMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. Das Symbol von phpMyAdmin sollte ähnlich aussehen wie die ein betont in der Abbildung unten.
Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. Wenn Sie auf der Hauptseite von phpMyAdmin, sollten Sie daran erinnern, was Datenbank haben Sie bei der Installation von WordPress. If you don't remember, don't get angry. Wenn Sie sich nicht erinnern, ärgern Sie sich nicht. 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. Gehen Sie zu Ihrem Root-Ordner, in dem wordpress installiert ist und Download & öffnen Sie die Datei wp-config.php mit einem einfachen Text-Editor wie Notepad / gedit. You'll need to find this line: Sie müssen diese Zeile zu finden:
define('DB_NAME', 'ABCD'); define ( 'DB_NAME', 'ABCD'); Note that ABCD (without the single quotes around it) is the name of the database that wordpress is installed in. Beachten Sie, dass ABCD (ohne die einfache Anführungszeichen) den Namen der Datenbank, die wordpress installiert ist in.
Back on the PHPMyAdmin page, click on the link of your database name. Zurück auf der phpMyAdmin-Seite, klicken Sie auf den Link zu Ihrer Datenbank-Namen. In my case it was _iwebdevel . In meinem Fall war es _iwebdevel.
Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. Jetzt wirst du PHPMyAdmin anderen Seite sehen, aber dieses Mal werden Sie präsentiert werden alle Tabellen in der ABCD-Datenbank enthalten sind. We need to select the table users . Wir müssen die Tabelle users zu wählen. 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. Sie werden nicht sehen, den genauen Namen der Anwender dieser Tabelle, sondern einen Namen in diesem Format xx_users, wo xx_ ist die Vorwahl Ihres wordpress Tabellennamen. Click on the link of your users table ( xx_users ). Klicken Sie auf den Link Ihrer Tabelle users (xx_users). In my case, as in most cases it's wp_users : In meinem Fall, wie in den meisten Fällen ist es wp_users:
Now click on browse to see the rows contained in table xx_users . Klicken Sie nun auf "Durchsuchen", um die Zeilen in der Tabelle enthaltenen xx_users sehen.
Now look for the username you want to reset the password. Nun suchen Sie nach dem Benutzernamen, den Sie möchten, das Kennwort zurückzusetzen. In my case I want to reset password for admin. Now click on the edit button. In meinem Fall möchte ich das Kennwort für admin zurückgesetzt. Klicken Sie nun auf die Schaltfläche "Bearbeiten".
Now you'll need to generate an MD5 hash of the new password you would like to set. Nun müssen Sie einen MD5-Hash der neuen Passwort, das Sie möchten, setzen generieren. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. Zur http://seoanalytic.com/tools/md5_encryptor/ und Ihr gewünschtes Passwort eingeben. After you enter your new password, click on the Encrypt! button. Nachdem Sie Ihr neues Passwort ein, klicken Sie auf das Verschlüsseln!-Taste.
After you've encrypted your password, select and copy the newly MD5 generated hash code. Nachdem Sie Ihr Kennwort verschlüsselt, und wählen Sie kopieren Sie das neu MD5-Hash-Code generiert.
Now return to your PHPMyAdmin page and paste your MD5 hash from the clipboard to the input field as shown in the image below: Nun kehren Sie PHPMyAdmin Seite und fügen Sie Ihre MD5-Hash aus der Zwischenablage in das Eingabefeld wie im Bild unten dargestellt:
Finally click on Go button to save your new password. Schließlich klicken Sie auf Go-Taste, um das neue Passwort zu speichern.
II Method: PHP II Methode: PHP
In my opinion the second method is much faster and simpler. Meiner Meinung nach der zweiten Methode ist viel schneller und einfacher. In this method you'll just have to upload a PHP file to your host and access it with a browser. Bei dieser Methode müssen Sie nur auf eine PHP-Datei auf Ihren Rechner laden und es mit einem Browser. But we'll talk about it a little bit later. Aber wir reden darüber ein wenig später.
So here's the piece of PHP code I've came up with to help you reset your wordpress account password. Also hier ist das Stück von PHP-Code habe ich kam mit zu helfen, setzen Sie Ihre WordPress-Konto ein.
$newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $ newPassword = 'NEW_PASSWORD_GOES_HERE'; / / schreiben Sie Ihr neues Passwort zwischen die Hochkommata $username='admin'; //put the login username you'd like to change the password to $ username = 'admin'; / / schreiben Sie den Login-Benutzernamen, den Sie möchten, das Passwort zu ändern @include_once('./wp-config.php'); //get some details from your wordpress installation @ include_once ( '. / wp-config.php'); / / get einige Details aus Ihrer WordPress-Installation global $table_prefix; global $ table_prefix; $conxb=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD); //establish connection to your database $ conxb = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD); / / Aufbau einer Verbindung zu Ihrer Datenbank mysql_select_db(DB_NAME,$conxb); 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'; $ query = 'update `'. $ table_prefix." Nutzer "gesetzt" user_pass `= \''. mysql_real_escape_string (md5 ($ newPassword)). '\', wobei` user_login `= \''. mysql_real_escape_string ($ username). '\' LIMIT 1 "; $mQuery=mysql_query($query,$conxb); //set new password $ mQuery = mysql_query ($ query, $ conxb); / / set new password echo $mQuery?'Successfully set new password. echo $ mQuery? 'Erfolgreich setzen neue Kennwort ein. New password: '.$newPassword:'There was an error. Neues Passwort: '. $ NewPassword: "Es war ein Fehler. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message Fehler: '. Mysql_error (); / / Ergebnis ist erfolgreich, wenn Sie sehen, die mysql Fehlermeldung mysql_close($conxb); mysql_close ($ conxb);
For your convenience you can download the file reset.php from here . Zu Ihrer Bequemlichkeit können Sie die Datei reset.php von hier herunterladen.
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). Nun entpacken Sie das Zip-Archiv haben Sie gerade heruntergeladen und bearbeiten Sie die notwendigen Parameter an Ihre Bedürfnisse anzupassen (Erklärung Kommentaren sind in der PHP-Code vor heute). Then upload the file reset.php to your wordpress root installation folder. Dann laden Sie die Datei auf Ihre reset.php wordpress Stamminstallationsordner. To make sure that this is the right directory, look for a file named wp-config.php , Um sicherzustellen, dass dies der richtige Verzeichnis, suchen Sie nach einer Datei namens "wp-config.php ist, 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. wenn es dort auf dem richtigen Weg, sonst für das Verzeichnis suchen, wo wp-config.php vorhanden ist und lade die Datei reset.php gibt.
Finally you'll want to go to http://yourDomainName.TLD/ reset.php . Schließlich werden Sie wollen http://yourDomainName.TLD/ reset.php gehen. You'll see the appropriate message depending on how the script worked. Sie finden die entsprechende Meldung je sehen, wie das Skript gearbeitet. 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. Wenn es einen Fehler, poste es hier und ich werde versuchen, Ihnen zu helfen, sonst haben Sie alles perfekt und man kann sich jetzt mit Ihrem neuen Passwort.
Related posts: In Verbindung stehende Pfosten:
- Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? Wordpress 2.8.4: Nicht bereit, mit PHP 5.3 installiert werden?
- Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script Wordpress: Best SEO iTranslator für Wordpress, erhalten freien Verkehr von vollautomatischen Plugin-Skript
- PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Aufruf einer Member-Funktion fetch_assoc () auf einem Nicht-Objekt in
- PHP: How to get creation time of file with PHP on Linux machines PHP: Wie man die Schaffung Zeitpunkt der Datei mit PHP auf Linux-Maschinen zu erhalten
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Wie zum Benutzerprofil Daten mit SSI.php holen aus einer SMF-Forum Datenbank
- Katya Katya





















































