Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Gemakkelijk Reset Uw account wachtwoord in met MySQL en PHP
Posted on 08. Geplaatst op 08. Jun, 2009 by Dragos in Coding , MySQL , PHP Juni, 2009 door 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. Ik heb zojuist ben mijn admin wachtwoord op mijn lokale test blog, en wat erger is - mijn lokale machine is niet geconfigureerd voor externe e-mail verzenden. Oh yeah, got to reinstall wordpress again, what a pity. Oh ja, ik heb aan wordpress weer opnieuw installeren, wat jammer. No way! No way! There are two ways of resetting your password using two easy methods. Er zijn twee manieren om uw wachtwoord opnieuw in met behulp van twee eenvoudige methoden. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. Je hebt basiskennis van PHP of CPanel + PHPMyAdmin.
I Method: CPanel+PHPMyAdmin Ik Methode: CPanel + PHPMyAdmin
For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. Voor deze methode is het noodzakelijk dat uw gastheer hebben CPanel en PHPMyAdmin geïnstalleerd. 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. Als je host heeft nog deze stukjes software, maar iets wat lijkt op deze, kun je deze tutorial volgen en toepassen van deze stappen om uw situatie.
First we'll need to open the PHPMyAdmin page. Eerst we moeten openen PHPMyAdmin pagina. From the CPanel root page, launch PHPMyAdmin. Van de CPanel wortel pagina, start PHPMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. Het icoon van PHPMyAdmin zou moeten lijken op de een benadrukt in de screenshot hieronder.
Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. Eenmaal op de hoofdpagina van PHPMyAdmin je moet onthouden wat database heeft u gebruikt bij het installeren van WordPress. If you don't remember, don't get angry. Als je niet meer weet, niet boos. 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. Ga naar je root map waar wordpress is geïnstalleerd en download en open het bestand wp-config.php met een eenvoudige tekst-editor zoals Notepad / gedit. You'll need to find this line: U moet vinden deze lijn:
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. Merk op dat ABCD (zonder de enkele aanhalingstekens eromheen) is de naam van de database die WordPress is geïnstalleerd inch
Back on the PHPMyAdmin page, click on the link of your database name. Terug op de PHPMyAdmin pagina, klik op de link van uw database naam. In my case it was _iwebdevel . In mijn geval was het _iwebdevel.
Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. Nu zie je een andere PHPMyAdmin pagina, maar dit keer zult u worden gepresenteerd al uw tabellen in het ABCD-database. We need to select the table users . We moeten om de tafel gebruikers. 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. Je zal niet de exacte naam van de gebruikers van deze tabel, maar een naam in dit formaat xx_users, waar xx_ is het voorvoegsel van uw WordPress tafel namen. Click on the link of your users table ( xx_users ). Klik op de link van uw gebruikers tabel (xx_users). In my case, as in most cases it's wp_users : In mijn geval, zoals in de meeste gevallen is het wp_users:
Now click on browse to see the rows contained in table xx_users . Klik nu op bladeren om de rijen die zijn opgenomen in tabel xx_users zien.
Now look for the username you want to reset the password. Nu op zoek naar de gebruikersnaam die u wilt het wachtwoord te resetten. In my case I want to reset password for admin. Now click on the edit button. In mijn geval wil ik resetten wachtwoord voor admin. Klik nu op de knop Bewerken.
Now you'll need to generate an MD5 hash of the new password you would like to set. Nu moet u voor het genereren van een MD5 hash van het nieuwe wachtwoord dat u wilt instellen. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. Ga naar http://seoanalytic.com/tools/md5_encryptor/ en voer uw gewenste wachtwoord in. After you enter your new password, click on the Encrypt! button. Nadat u uw nieuwe wachtwoord, klik op de Encrypt! Knop.
After you've encrypted your password, select and copy the newly MD5 generated hash code. Nadat u uw wachtwoord versleuteld, selecteer en kopieer de nieuw gegenereerde MD5 hash-code.
Now return to your PHPMyAdmin page and paste your MD5 hash from the clipboard to the input field as shown in the image below: Nu terug naar je PHPMyAdmin pagina en plak je MD5 hash van het klembord in het invoerveld zoals weergegeven in de afbeelding hieronder:
Finally click on Go button to save your new password. Klik tenslotte op Go om uw nieuwe wachtwoord.
II Method: PHP II Methode: PHP
In my opinion the second method is much faster and simpler. Naar mijn mening is de tweede methode is veel sneller en eenvoudiger. In this method you'll just have to upload a PHP file to your host and access it with a browser. Bij deze methode je zult moeten een PHP-bestand uploaden naar uw gastheer en toegang met een browser. But we'll talk about it a little bit later. Maar we praten een beetje later.
So here's the piece of PHP code I've came up with to help you reset your wordpress account password. Dus hier is het stukje PHP-code die ik heb bedacht om u te helpen opnieuw instellen van uw WordPress-account wachtwoord.
$newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $ newpassword = 'NEW_PASSWORD_GOES_HERE'; / / zet je nieuwe wachtwoord tussen de enkele aanhalingstekens $username='admin'; //put the login username you'd like to change the password to $ username = 'admin'; / / zet de login gebruikersnaam die u wilt het wachtwoord te veranderen @include_once('./wp-config.php'); //get some details from your wordpress installation @ include_once ( '. / wp-config.php'); / / nog wat details van uw WordPress-installatie 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); / / stand verbinding met uw database 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." gebruikers `SET` user_pass `= \''. mysql_real_escape_string (md5 ($ newpassword)). '\', waar` user_login `= \''. mysql_real_escape_string ($ username). '\' limit 1 '; $mQuery=mysql_query($query,$conxb); //set new password $ mQuery = mysql_query ($ query, $ conxb) / / set nieuw wachtwoord echo $mQuery?'Successfully set new password. echo $ mQuery? 'Succesvol set nieuw wachtwoord. New password: '.$newPassword:'There was an error. Nieuw wachtwoord: '. $ Newpassword:' Er is een fout opgetreden. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message Fout: ". Mysql_error (); / / als resultaat niet succesvol is zie je de MySQL foutmelding mysql_close($conxb); mysql_close ($ conxb);
For your convenience you can download the file reset.php from here . Voor uw gemak kunt u het bestand reset.php downloaden vanaf hier.
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). Nu halen de zip-archief die je net hebt gedownload en de nodige parameters te wijzigen naar uw behoeften (uitleg opmerkingen aanwezig zijn in de PHP-code hierboven). Then upload the file reset.php to your wordpress root installation folder. Dan het bestand uploaden naar uw reset.php wordpress root-installatiemap. To make sure that this is the right directory, look for a file named wp-config.php , Om ervoor te zorgen dat dit de juiste directory, zoek naar een bestand met de naam 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. als het er je op de juiste manier, anders kijken naar de directory waar wp-config.php aanwezig is en het uploaden van het bestand reset.php daar.
Finally you'll want to go to http://yourDomainName.TLD/ reset.php . Tot slot je naartoe wilt http://yourDomainName.TLD/ reset.php. You'll see the appropriate message depending on how the script worked. U ziet de juiste boodschap, afhankelijk van hoe het script gewerkt. 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. Als er een fout, hier posten en ik zal proberen om je te helpen, wat je deed alles perfect en je kunt nu inloggen met uw nieuwe wachtwoord.
Related posts: Gerelateerde berichten:
- Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? Wordpress 2.8.4: Nog niet klaar om geïnstalleerd te worden met PHP 5.3?
- Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script Wordpress: Beste iTranslator SEO voor Wordpress, krijg vrij verkeer van volledig geautomatiseerde plugin script
- PHP Error: Call to a member function fetch_assoc() on a non-object in PHP error: Call to a member function fetch_assoc () op een niet-object in
- PHP: How to get creation time of file with PHP on Linux machines PHP: Hoe krijg ik scheppen tijd van bestand met PHP op Linux-machines
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Hoe te halen gebruikersprofiel gegevens met SSI.php uit een SMF forum database
- Katya Katya





















































