This is a translated page. The original can be found here: http://iwebdevel.com/2009/06/08/wordpress-easily-reset-your-account-password-using-mysql-and-php/
UPDATES VIA RSS | Email FRISSÍTÉSEK VIA RSS | E-mail Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Wordpress: Easily Reset Your… Home / Coding / MySQL / PHP / WordPress: Könnyen Reset Your ...

Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Könnyen Reset Your Account jelszót a MySQL és a PHP

Posted on 08. Posted on 08. Jun, 2009 by Dragos in Coding , MySQL , PHP Június, 2009 Dragos ben Kódolás, 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. Most Elfelejtett admin jelszót meg a helyi vizsgálatok blog, és ami még rosszabb - én a helyi gép van beállítva, hogy ne a külső küldjön e-mailt. Oh yeah, got to reinstall wordpress again, what a pity. Ó, igen, van-hoz visszahelyez wordpress megint, milyen kár. No way! Sem lehet róla! There are two ways of resetting your password using two easy methods. Kétféle módon helyreállít a jelszó segítségével két egyszerű módszerekkel. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. Szükséged lesz az alapvető ismereteket PHP vagy CPanel + phpMyAdmin.

I Method: CPanel+PHPMyAdmin I. módszer: CPanel + phpMyAdmin

For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. Ennek a módszernek, szükséges, hogy a vendégeik CPanel és PHPMyAdmin telepítve. 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. Ha a gép nem rendelkezik ilyen darab szoftvert, de valami hasonló-e, akkor kövesse a bemutató, és alkalmazza ezeket a lépéseket a helyzet.

First we'll need to open the PHPMyAdmin page. Először is szükségünk lesz, hogy megnyitja a PHPMyAdmin oldalt. From the CPanel root page, launch PHPMyAdmin. A CPanel gyökér oldalt indít, PHPMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. Az ikon a PHPMyAdmin valahogy így fog kinézni az egyik hangsúlyozta a screenshot alább.

PHPMyAdmin

PHPMyAdmin PHPMyAdmin

Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. Amint a főoldalon a PHPMyAdmin akkor emlékszem, mit tett adatbázist használ, ha a telepítés wordpress. If you don't remember, don't get angry. Ha nem emlékszik, nem mérges. 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. Megy a root mappát, ahol wordpress telepítve van, és töltse le és nyissa meg a fájlt wp-config.php egy egyszerű szövegszerkesztővel, mint a Jegyzettömb / gedit. You'll need to find this line: El kell találni ezt a sort:

 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. Ne feledjük, hogy ABCD (anélkül, hogy egyetlen idézőjelbe is) az adatbázis nevét, hogy a wordpress telepített be

Back on the PHPMyAdmin page, click on the link of your database name. Vissza a phpMyAdmin oldalra, kattintson a linkre az adatbázis nevét. In my case it was _iwebdevel . Az én esetemben ez volt _iwebdevel.

Select your database

Select your database Válassza ki az adatbázis

Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. Most majd látni PHPMyAdmin másik oldal, de ezúttal fogsz be kell mutatni minden asztal foglalt ABCD adatbázisban. We need to select the table users . Azt ki kell választania a táblázat felhasználók számára. 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. Nem jelenik meg a pontos neve igénybe ezt a táblázatot, de a név ebben a formában xx_users, ahol xx_ az előtag az Ön wordpress tábla nevek. Click on the link of your users table ( xx_users ). Kattints a linkre a felhasználóinak táblázat (xx_users). In my case, as in most cases it's wp_users : Az én esetemben, mint a legtöbb esetben ez wp_users:

Select the users table

Select the users table Válassza ki a felhasználók tábla

Now click on browse to see the rows contained in table xx_users . Most kattintson a legel látni a sorok táblázatban található xx_users.

Click on browse

Click on browse Kattints a böngészés

Now look for the username you want to reset the password. Keresd meg a felhasználónevet vissza szeretné állítani a jelszót. In my case I want to reset password for admin. Now click on the edit button. Az én esetemben én vissza szeretné állítani az admin jelszót. Most kattintson a Szerkesztés gombra.

Edit user's details

Edit user's details Edit felhasználói adatait

Now you'll need to generate an MD5 hash of the new password you would like to set. Most akkor szükség van-e MD5 hash az új jelszót szeretne beállítani. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. Go to http://seoanalytic.com/tools/md5_encryptor/ és adja meg a kívánt jelszót. After you enter your new password, click on the Encrypt! button. Miután megadta az új jelszót, kattintson a titkosítása! Gombra.

Encrypt your password

Encrypt your password Titkosítja a jelszót

After you've encrypted your password, select and copy the newly MD5 generated hash code. Miután titkosított jelszavát, válassza ki és másolja az újonnan generált MD5 hash-kódot.

Select and copy the MD5 hash

Select and copy the MD5 hash Válassza ki és másolja a MD5 hash

Now return to your PHPMyAdmin page and paste your MD5 hash from the clipboard to the input field as shown in the image below: Most vissza a phpMyAdmin oldalra, és illessze be a MD5 hash a vágólapról a beviteli mezőbe a képen látható az alábbiakban:

Paste MD5 hash in the specified input field

Paste MD5 hash in the specified input field Beillesztés MD5 hash, a megadott beviteli mező

Finally click on Go button to save your new password. Végül kattintson a Tovább gombra, hogy mentse az új jelszót.

Save new password

Save new password Mentés jelszó

II Method: PHP II módszer: PHP

In my opinion the second method is much faster and simpler. Véleményem szerint a második módszer sokkal gyorsabb és egyszerűbb. In this method you'll just have to upload a PHP file to your host and access it with a browser. E módszer akkor csak azt kell feltölteni egy PHP fájlt fogadó és a hozzáférés azt egy böngészőben. But we'll talk about it a little bit later. De majd beszélünk róla egy kicsit később.

So here's the piece of PHP code I've came up with to help you reset your wordpress account password. Szóval itt a darab PHP kód, amit kitaláltam, hogy segítsen állítani a Wordpress fiók jelszavát.

	$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. $ Newpassword = 'NEW_PASSWORD_GOES_HERE'; / / tesz be az új jelszót között aposztrófokat $ username = 'admin'; / / tesz a bejelentkezési felhasználónevet szeretné megváltoztatni a jelszót a @ include_once ( '. / wp-config.php '); / / egy kis részleteket a Wordpress telepítési Table_Prefix global $ $ conxb = mysql_connect (DB_Host, db_user, DB_Password); / / létrehozza a kapcsolatot az adatbázis mysql_select_db (DB_Name, $ conxb); $ query =' UPDATE `" . $ Table_Prefix. "felhasználók" set `user_pass` = \''. mysql_real_escape_string (md5 ($ Newpassword)). '\', ahol "user_login` = \''. mysql_real_escape_string ($ username). '\' limit 1 "; $ mQuery = mysql_query ($ query, $ conxb); / / set új jelszót echo $ mQuery? sikeresen beállítva új jelszót. New password: '.$newPassword:'There was an error. Új jelszó: ". $ Newpassword:" Hiba történt. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message mysql_close($conxb); Error: '. Mysql_error (); / / ha az eredmény sikertelen látni fogja a mysql hibaüzenet mysql_close ($ conxb); 

For your convenience you can download the file reset.php from here . Az Ön kényelme letöltheti a fájlt a reset.php itt.

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). Most kivonat a fütyülés archív, amit csak letöltött és adjuk meg a szükséges paramétereket, hogy megfeleljen az Ön igényeinek (magyarázat hozzászólások jelen vannak a PHP kódot pontot). Then upload the file reset.php to your wordpress root installation folder. Akkor töltsd fel a fájlt reset.php, hogy a Wordpress gyökér telepítési mappát. To make sure that this is the right directory, look for a file named wp-config.php , Annak érdekében, hogy ez a helyes könyvtár, munkát keres nevű fájlt 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. ha már ott vagyunk a helyes út, máshol keresse meg a könyvtárat, ahol wp-config.php van jelen, és töltsd fel a fájlt reset.php ott.

Finally you'll want to go to http://yourDomainName.TLD/ reset.php . Végül érdemes menni http://yourDomainName.TLD/ reset.php. You'll see the appropriate message depending on how the script worked. Látni fogja a megfelelő üzenetet, attól függően, hogy milyen a forgatókönyvet dolgozott. 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. Ha van egy hiba, tedd fel itt, és megpróbálok segíteni neked, különben te mindent tökéletesen, és most már jelentkezzen be az új jelszót.

Translate this post Translate this post


Related posts: Related posts:

  1. Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? WordPress 2.8.4: Nem készen kell telepíteni a PHP-ben 5,3?
  2. Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script Wordpress: Best SEO iTranslator a Wordpress, ingyenes forgalmat a teljesen automatizált plugin script
  3. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call to a member function fetch_assoc () on a non-object in
  4. PHP: How to get creation time of file with PHP on Linux machines PHP: How to get létrehozásakor a fájl a PHP Linux gépek
  5. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Hogyan lehet letölteni a felhasználói profil adatok SSI.php egy SMF fórum adatbázis

  • Katya Kátya
    :) :)
blog comments powered by Disqus iPhone Disqus szerint