Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Mudah Reset Password Account Anda Menggunakan MySQL dan PHP
Posted on 08. Posted on 08. Jun, 2009 by Dragos in Coding , MySQL , PHP Jun, 2009 oleh Dragos di 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. Aku baru saja admin saya lupa password pada blog pengujian lokal saya, dan apa yang buruk - mesin lokal saya tidak dikonfigurasi untuk mengirim email eksternal. Oh yeah, got to reinstall wordpress again, what a pity. Oh yeah, harus instal ulang lagi wordpress, kasihan sekali. No way! No way! There are two ways of resetting your password using two easy methods. Ada dua cara untuk mereset password Anda menggunakan dua metode yang mudah. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. Anda akan memerlukan pengetahuan dasar tentang PHP atau CPanel + PHPMyAdmin.
I Method: CPanel+PHPMyAdmin Aku Metode: CPanel + PHPMyAdmin
For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. Untuk metode ini, perlu bahwa tuan rumah telah CPanel dan PHPMyAdmin diinstal. 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. Jika host tidak memiliki buah perangkat lunak ini, tetapi sesuatu yang mirip dengan ini, anda dapat mengikuti tutorial ini dan menerapkan langkah-langkah untuk situasi Anda.
First we'll need to open the PHPMyAdmin page. Pertama kita harus membuka halaman PHPMyAdmin. From the CPanel root page, launch PHPMyAdmin. Dari akar CPanel halaman, peluncuran PHPMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. PHPMyAdmin ikon akan terlihat seperti yang ditekankan dalam gambar di bawah.
Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. Begitu tiba di halaman utama PHPMyAdmin Anda harus ingat apa database yang Anda gunakan ketika menginstal wordpress. If you don't remember, don't get angry. Jika Anda tidak ingat, jangan marah. 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. Pergi ke root folder di mana Anda wordpress terinstal dan mendownload & buka file wp-config.php dengan editor teks sederhana seperti Notepad / gedit. You'll need to find this line: Anda harus menemukan baris ini:
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. Perhatikan bahwa ABCD (tanpa tanda kutip tunggal sekitarnya) adalah nama dari database yang terinstal wordpress masuk
Back on the PHPMyAdmin page, click on the link of your database name. Kembali ke halaman PHPMyAdmin, klik pada link nama database Anda. In my case it was _iwebdevel . Dalam kasus saya itu _iwebdevel.
Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. Sekarang Anda akan melihat halaman PHPMyAdmin lain, tapi kali ini Anda akan disajikan semua tabel yang terdapat dalam database ABCD. We need to select the table users . Kita perlu memilih tabel pengguna. 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. Anda tidak akan melihat nama yang tepat pengguna dari tabel ini, tapi salah satu nama dalam format ini xx_users, di mana xx_ adalah awalan nama tabel wordpress Anda. Click on the link of your users table ( xx_users ). Klik pada link tabel pengguna Anda (xx_users). In my case, as in most cases it's wp_users : Dalam kasus saya, seperti dalam kebanyakan kasus itu wp_users:
Now click on browse to see the rows contained in table xx_users . Sekarang klik pada browse untuk melihat baris tabel yang terdapat dalam xx_users.
Now look for the username you want to reset the password. Sekarang mencari username Anda ingin me-reset password. In my case I want to reset password for admin. Now click on the edit button. Dalam kasus saya saya ingin me-reset password untuk admin. Sekarang klik pada tombol edit.
Now you'll need to generate an MD5 hash of the new password you would like to set. Sekarang Anda harus menghasilkan hash MD5 dari password baru yang ingin Anda tetapkan. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. Pergi ke http://seoanalytic.com/tools/md5_encryptor/ dan masukkan password pilihan Anda. After you enter your new password, click on the Encrypt! button. Setelah Anda memasukkan password baru, klik pada Encrypt! Tombol.
After you've encrypted your password, select and copy the newly MD5 generated hash code. Setelah Anda terenkripsi sandi, pilih dan salin MD5 baru dihasilkan kode 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: Sekarang kembali ke halaman PHPMyAdmin dan sisipkan MD5 hash dari clipboard ke field input seperti terlihat pada gambar di bawah ini:
Finally click on Go button to save your new password. Terakhir, klik pada tombol Go untuk menyimpan password baru anda.
II Method: PHP Metode II: PHP
In my opinion the second method is much faster and simpler. Menurut pendapat saya metode kedua jauh lebih cepat dan sederhana. In this method you'll just have to upload a PHP file to your host and access it with a browser. Dalam metode ini Anda akan hanya perlu meng-upload file PHP ke host dan akses dengan browser. But we'll talk about it a little bit later. Tapi kita akan bicara tentang itu sedikit nanti.
So here's the piece of PHP code I've came up with to help you reset your wordpress account password. Jadi, inilah potongan kode PHP aku sudah datang dengan untuk membantu Anda mengatur ulang sandi account wordpress Anda.
$newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $ Newpassword = 'NEW_PASSWORD_GOES_HERE'; / / memasukkan password baru Anda di antara tanda kutip tunggal $username='admin'; //put the login username you'd like to change the password to $ username = 'admin'; / / memasukkan username login Anda ingin mengubah password untuk @include_once('./wp-config.php'); //get some details from your wordpress installation @ include_once ( '. / wp-config.php'); / / mendapatkan beberapa detail dari instalasi wordpress Anda 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); / / membuat koneksi ke database Anda 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. 'user` set `user_pass` = \''. mysql_real_escape_string (md5 ($ Newpassword)).' \ 'mana `user_login` = \''. mysql_real_escape_string ($ username). '\' limit 1 '; $mQuery=mysql_query($query,$conxb); //set new password $ mQuery = mysql_query ($ query, $ conxb); / / set password baru echo $mQuery?'Successfully set new password. echo $ mQuery? "Berhasil membuat password baru. New password: '.$newPassword:'There was an error. New password: ". $ Newpassword: 'Ada error. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message Error: '. Mysql_error (); / / jika hasil tidak berhasil Anda akan melihat pesan error mysql mysql_close($conxb); mysql_close ($ conxb);
For your convenience you can download the file reset.php from here . Untuk kenyamanan Anda, Anda dapat men-download file reset.php dari sini.
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). Sekarang ekstrak arsip zip yang baru saja Anda download dan edit parameter yang diperlukan sesuai dengan kebutuhan anda (penjelasan komentar yang hadir dalam kode PHP di atas). Then upload the file reset.php to your wordpress root installation folder. Kemudian upload file wordpress reset.php ke folder instalasi root. To make sure that this is the right directory, look for a file named wp-config.php , Untuk memastikan bahwa ini adalah direktori yang tepat, carilah file bernama 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. jika itu kau ada di jalan yang benar, yang lain mencari direktori dimana wp-config.php hadir dan meng-upload file reset.php sana.
Finally you'll want to go to http://yourDomainName.TLD/ reset.php . Akhirnya anda akan ingin pergi ke http://yourDomainName.TLD/ reset.php. You'll see the appropriate message depending on how the script worked. Anda akan melihat pesan yang sesuai tergantung pada bagaimana script bekerja. 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. Jika ada kesalahan, posting di sini dan aku akan mencoba untuk membantu Anda, kalau Anda melakukan segala sesuatu dengan sempurna dan sekarang Anda bisa login dengan password baru Anda.
Related posts: Related posts:
- Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? Wordpress 2.8.4: Belum siap untuk diinstal dengan PHP 5,3?
- Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script Wordpress: Jawaban iTranslator SEO untuk Wordpress, mendapatkan gratis lalu lintas dari skrip plugin otomatis
- Wordpress: Version 2.8.6 is out. Wordpress: Versi 2.8.6 sudah keluar. Make sure to update your blog! Pastikan untuk mengupdate blog Anda!
- PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Call to a member function fetch_assoc () pada non-objek
- PHP: How to get creation time of file with PHP on Linux machines PHP: Cara mendapatkan waktu penciptaan file dengan PHP pada mesin Linux
- Katya Katya
- purie purie





















































