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 Updates via RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Wordpress: Easily Reset Your… Home / Coding / MySQL / PHP / Wordpress: Easily Reset juaj ...

Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Easily Reset Your Account Fjalëkalimi Përdorimi i MySQL dhe PHP

Posted on 08. Dërguar të 08. Jun, 2009 by Dragos in Coding , MySQL , PHP Qershor, 2009 nga Dragoskodim, 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. Kam harruar fjalë-kalimin tim vetëm admin në blogun tim lokal testim, dhe çfarë është më e keqe - makinë tim lokale nuk është i konfiguruar që të dërgoni një email të jashtëm. Oh yeah, got to reinstall wordpress again, what a pity. Oh yeah, got to reinstall wordpress përsëri, what a pity. No way! No way! There are two ways of resetting your password using two easy methods. Ka dy mënyra për të resetting fjalëkalimin tuaj duke përdorur dy metoda të lehtë. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. Keni nevojë për njohuri themelore të PHP ose CPanel + PHPMyAdmin.

I Method: CPanel+PHPMyAdmin Unë Metoda: CPanel + PHPMyAdmin

For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. Për këtë metodë, është e nevojshme që të presë tuaj kanë CPanel dhe PHPMyAdmin instaluar. 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. Nëse presë juaj nuk i keni këto pjesë të softuerit, por diçka të ngjashme me këto, ju mund të ndiqni kete tutorial dhe zbatohen këto hapa për situatën tuaj.

First we'll need to open the PHPMyAdmin page. Së pari ne do të duhet për të hapur faqen PHPMyAdmin. From the CPanel root page, launch PHPMyAdmin. Nga faqe rrënjë CPanel, nisin PHPMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. Ikona e PHPMyAdmin duhet të duken të ngjashme me një theksuar në screenshot më poshtë.

PHPMyAdmin

PHPMyAdmin PHPMyAdmin

Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. Pasi në faqen kryesore të PHPMyAdmin ju duhet të mbani mend se çfarë i keni përdorur bazën e të dhënave wordpress kur instalimi. If you don't remember, don't get angry. Nëse ju nuk e mbani mend, mos merrni zemëruar. 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. Go to dosjen tuaj rrënjë wordpress ku është instaluar dhe shkarko & hapur wp-file config.php me nje editor teksti të thjeshtë si Notepad-in / gedit. You'll need to find this line: Ju do të duhet të gjeni këtë linjë:

 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. Vini re se abcd (pa citon vetëm rreth tij) është emri i bazës së të dhënave që është instaluar wordpress in

Back on the PHPMyAdmin page, click on the link of your database name. Kthehu në faqen PHPMyAdmin, klikoni mbi lidhjen e emrit tuaj bazës së të dhënave. In my case it was _iwebdevel . Në rastin tim ajo ishte _iwebdevel.

Select your database

Select your database Zgjidhni bazës së të dhënave tuaja

Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. Tani ju do të shihni një tjetër faqe PHPMyAdmin, por këtë herë ju do të paraqiten të gjitha tabelat tuaja të përfshira në bazën e të dhënave abcd. We need to select the table users . Ne kemi nevojë për të zgjedhur përdoruesit tryezë. 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. Ju nuk do të shikoni përdoruesit emrin e saktë të kësaj tabele, por një emër në këtë xx_users format, ku xx_ është prefiksi i juaj emrave tryezë wordpress. Click on the link of your users table ( xx_users ). Kliko në linkun e përdoruesve tavolina juaj (xx_users). In my case, as in most cases it's wp_users : Në rastin tim, si në shumicën e rasteve është wp_users:

Select the users table

Select the users table Zgjidhni tryezë users

Now click on browse to see the rows contained in table xx_users . Tani klikoni në sy për të parë rreshtave që përmban në xx_users tryezë.

Click on browse

Click on browse Klikoni mbi shfleto

Now look for the username you want to reset the password. Tani shikoni për emrin që ju doni të reset password. In my case I want to reset password for admin. Now click on the edit button. Në rastin tim unë dua të rivendosur fjalëkalim për admin. Tani klikoni mbi butonin redakto.

Edit user's details

Edit user's details Details Edit user's

Now you'll need to generate an MD5 hash of the new password you would like to set. Tani ju do të duhet për të gjeneruar një Hash MD5 e fjalëkalim të ri do të doja të vendosur. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. Go to http://seoanalytic.com/tools/md5_encryptor/ dhe shkruani fjalëkalimin tuaj të preferuar. After you enter your new password, click on the Encrypt! button. Pasi ju shkruani fjalëkalimin e ri, klikoni mbi butonin! Encrypt.

Encrypt your password

Encrypt your password Encrypt your password

After you've encrypted your password, select and copy the newly MD5 generated hash code. Pasi ta keni Encrypted fjalëkalimin tuaj, zgjidhni dhe kopje të sapo krijuar kodin MD5 hash.

Select and copy the MD5 hash

Select and copy the MD5 hash Zgjidhni dhe kopje 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: Tani kthimi në PHPMyAdmin faqen tuaj dhe ngjitur MD5 Hash tuaj nga Clipboard në fushë të dhëna siç tregohet në imazhin më poshtë:

Paste MD5 hash in the specified input field

Paste MD5 hash in the specified input field Paste Hash MD5 në fushë input specifikuar

Finally click on Go button to save your new password. Në fund klikoni mbi butonin Go to ruajtur fjalëkalimin tuaj të re.

Save new password

Save new password Ruaj fjalëkalimin e ri

II Method: PHP II Metoda: PHP

In my opinion the second method is much faster and simpler. Në mendimin tim metoda e dytë është shumë më e shpejtë dhe të thjeshtë. In this method you'll just have to upload a PHP file to your host and access it with a browser. Në këtë metodë ju do të keni vetëm të ngarkoni një fotografi PHP për të presë tuaj dhe qasje me një shfletues. But we'll talk about it a little bit later. Por ne do të flasim për këtë pak më vonë.

So here's the piece of PHP code I've came up with to help you reset your wordpress account password. Kështu që këtu është pjesë e kodit PHP Unë kam ardhur deri me ju për t'ju ndihmuar wordpress reset your password llogari.

  $newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $ Newpassword = 'NEW_PASSWORD_GOES_HERE'; / / vendos fjalëkalimin tuaj të ri në mes kuotat e vetme
	$username='admin'; //put the login username you'd like to change the password to admin $ username = ''; / / login vënë emrin që ju dëshironi të ndryshojë fjalëkalimin për të
	@include_once('./wp-config.php'); //get some details from your wordpress installation @ include_once ( '. /-wp config.php'); / / merrni disa detaje nga instalimin tuaj wordpress
	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); / / krijojnë lidhje me bazën e të dhënave tuaja
	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. përdoruesit` vendosur `user_pass` = \''. mysql_real_escape_string (md5 ($ Newpassword)). '\' ku `user_login` = \''. mysql_real_escape_string ($ username). '\' limit 1 ';
	$mQuery=mysql_query($query,$conxb); //set new password $ mQuery = mysql_query ($ query, $ conxb); / / set fjalëkalim të ri
	echo $mQuery?'Successfully set new password. echo $ mQuery? 'Fjalëkalimi i vendosur me sukses të reja. New password: '.$newPassword:'There was an error. Fjalëkalimi i ri: '. $ Newpassword: "Pati një gabim. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message Exit. Error: '(); / / Rezultati është i pasuksesshëm nëse ju do të shihni mesazh mysql gabim
	mysql_close($conxb); mysql_close ($ conxb); 

For your convenience you can download the file reset.php from here . Për lehtësinë tuaj ju mund të shkarkoni file nga reset.php këtu.

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). Tani ekstrakt arkiva zip keni shkarkuar vetëm dhe të redaktoni parametrat e nevojshme që i përshtaten nevojave tuaja (komente shpjegim janë të pranishme në kodin e PHP lart). Then upload the file reset.php to your wordpress root installation folder. Upload Pastaj reset.php kartelën te wordpress dosjen tuaj instalimit rrënjë. To make sure that this is the right directory, look for a file named wp-config.php , Për të bërë të sigurt se kjo është Lista e drejtë, kërkoj një file me emrin 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. nëse është e atje ju jeni në rrugën e drejtë, tjetër shikoni për dosjen ku wp-config.php është i pranishëm dhe ngarkoni reset.php fotografi atje.

Finally you'll want to go to http://yourDomainName.TLD/ reset.php . Së fundi ju do të dëshironi të shkoni në http://yourDomainName.TLD/ reset.php. You'll see the appropriate message depending on how the script worked. Ju do të shihni mesazhin e duhur në varësi se si script ka punuar. 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. Qoftë se ka një gabim, pas këtu dhe unë do të përpiqemi për t'ju ndihmuar, çdo gjë tjetër që ju bëri të përkryer dhe ju tani mund të identifikoheni me password tuaj të re.

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: Jo të gatshme për t'u instaluar me PHP 5,3?
  2. Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script Wordpress: iTranslator mirë SEO për Wordpress, të merrni falas nga trafiku script plugin plotësisht i automatizuar
  3. Wordpress: Version 2.8.6 is out. Wordpress: Version 2.8.6 is out. Make sure to update your blog! Sigurohuni që të update juaj personale!
  4. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call to a member function fetch_assoc () në një vend jo-objekt në
  5. PHP: How to get creation time of file with PHP on Linux machines PHP: Si të merrni kohë krijimin e skedar me PHP në makinat Linux

  • Katya Katya
    :) :)
  • purie purie
    i have to try but why does still there error ? i duhet të provoni por pse ende nuk ka gabim? when i would to login.. kur unë do të identifikohen .. cann`t read the password .. drejtoj anijen t `lexoj fjalëkalimin ..
    could you tell why does my code still error. mund të ju tregoni pse nuk e mi ende kodin gabim. thank you faleminderit
blog comments powered by Disqus Komentet blog powered by Disqus