Wordpress: Easily Reset Your Account Password Using MySQL and PHP وورد : بسهولة إعادة تعيين كلمة المرور الخاصة بحسابك باستخدام ماي و [فب
Posted on 08. نشر يوم 08. Jun, 2009 by Dragos in Coding , MySQL , PHP يونيو ، 2009 من قبل دراكوش في الترميز ، الخلية ، [فب]
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. أنا فقط نسيت كلمة السر المشرف على بلدي بلوق الاختبارات المحلية ، وما هو أسوأ من ذلك -- بلدي الجهاز المحلي لم يتم تكوينه لإرسال بريد إلكتروني خارجي. Oh yeah, got to reinstall wordpress again, what a pity. أوه نعم ، حصلت على إعادة تثبيت وورد مرة أخرى ، ما يدعو إلى الشفقة. No way! بأي حال من الأحوال! There are two ways of resetting your password using two easy methods. هناك طريقتان لإعادة تعيين كلمة المرور الخاصة بك باستخدام طريقتين سهلة. You'll need basic knowledge of PHP or CPanel+PHPMyAdmin. عليك معرفة أساسية من بي إتش بي أو بلوحة التحكم + PHPMyAdmin.
I Method: CPanel+PHPMyAdmin الأسلوب الأول : بلوحة التحكم + PHPMyAdmin
For this method, it is necessary that your host have CPanel and PHPMyAdmin installed. لهذا الأسلوب ، فمن الضروري أن يكون لديك استضافة بلوحة التحكم وتثبيت PHPMyAdmin. 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. إذا كان لديك المضيفة لا تملك هذه القطع من البرمجيات ، ولكن شيئا من هذا القبيل إلى هذه ، يمكنك متابعة هذا البرنامج التعليمي وتطبيق هذه الخطوات إلى الوضع الخاص بك.
First we'll need to open the PHPMyAdmin page. أولا ، سنحتاج إلى فتح صفحة PHPMyAdmin. From the CPanel root page, launch PHPMyAdmin. من بلوحة التحكم صفحة الجذرية ، وإطلاق PHPMyAdmin. The icon of PHPMyAdmin should look similar to the one emphasized in the screenshot below. رمز PHPMyAdmin مماثلة ينبغي أن ننظر إلى واحد وأكد في الصورة ادناه.
Once on the main page of PHPMyAdmin you should remember what database did you use when installing wordpress. مرة واحدة على الصفحة الرئيسية لPHPMyAdmin يجب عليك أن تتذكر ما فعلت وكنت تستخدم قاعدة البيانات عند تثبيت وورد. If you don't remember, don't get angry. إذا كنت لا تذكر ، لا تغضب. 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. انتقل إلى مجلد الجذر حيث ورد تم تثبيت وتنزيل وفتح الملف الفسفور الابيض - config.php مع محرر نص بسيط مثل المفكرة / GEdit. You'll need to find this line: ستحتاج إلى العثور على هذا الخط :
define('DB_NAME', 'ABCD'); تعريف ( 'db_name' ، 'ABCD') ؛ Note that ABCD (without the single quotes around it) is the name of the database that wordpress is installed in. علما بأن ABCD (بدون الاقتباس واحدة من حوله) هو اسم قاعدة البيانات التي ورد فيها مثبت
Back on the PHPMyAdmin page, click on the link of your database name. مرة أخرى على صفحة PHPMyAdmin ، انقر على وصلة من اسم قاعدة البيانات. In my case it was _iwebdevel . في حالتي كانت _iwebdevel.
Now you'll see another PHPMyAdmin page, but this time you'll be presented all your tables contained in the ABCD database. الآن سترى صفحة أخرى PHPMyAdmin ، ولكن هذه المرة سوف يكون عرض جميع الجداول الموجودة في قاعدة البيانات ABCD. We need to select the table users . نحن بحاجة لتحديد جدول المستخدمين. 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. أنك لن ترى المستخدمين الاسم الدقيق لهذا الجدول ، ولكن اسم xx_users في هذا الشكل ، حيث xx_ هي البادئة لديك أسماء الجداول وورد. Click on the link of your users table ( xx_users ). انقر على وصلة المستخدمين لديك الجدول (xx_users). In my case, as in most cases it's wp_users : في حالتي ، كما هو الحال في معظم الحالات انها wp_users :
Now click on browse to see the rows contained in table xx_users . الآن انقر على استعراض لرؤية الصفوف xx_users الواردة في الجدول.
Now look for the username you want to reset the password. الآن نبحث عن اسم المستخدم الذي تريد إعادة تعيين كلمة المرور. In my case I want to reset password for admin. Now click on the edit button. في حالتي أنا أريد أن إعادة تعيين كلمة المرور لمشرف. الآن انقر على زر تعديل.
Now you'll need to generate an MD5 hash of the new password you would like to set. الآن ستحتاج إلى إنشاء تجزئة MD5 من كلمة المرور الجديدة ترغب في تعيين. Go to http://seoanalytic.com/tools/md5_encryptor/ and enter your preferred password. انتقل إلى http://seoanalytic.com/tools/md5_encryptor/ وإدخال كلمة السر الخاصة بك تفضل. After you enter your new password, click on the Encrypt! button. بعد إدخال كلمة السر الجديدة ، انقر على شفر! زر.
After you've encrypted your password, select and copy the newly MD5 generated hash code. بعد قيامك مشفرة كلمة السر الخاصة بك ، حدد ونسخ الرمز الذي تم إنشاؤه حديثا MD5 البعثرة.
Now return to your PHPMyAdmin page and paste your MD5 hash from the clipboard to the input field as shown in the image below: الآن عودة إلى الصفحة الخاصة بك PHPMyAdmin ولصق تجزئة MD5 من الحافظة في حقل الإدخال كما هو مبين في الصورة أدناه :
Finally click on Go button to save your new password. وأخيرا انقر على زر الذهاب لانقاذ كلمة السر الجديدة.
II Method: PHP الأسلوب الثاني : [فب]
In my opinion the second method is much faster and simpler. في رأيي أن الأسلوب الثاني هو أسرع وأبسط. In this method you'll just have to upload a PHP file to your host and access it with a browser. في هذا الأسلوب الذي سوف يكون فقط لإيداع ملف [فب] إلى المضيف الخاص بك ، والوصول إليه باستخدام مستعرض. But we'll talk about it a little bit later. ولكن سنتحدث عن ذلك قليلا في وقت لاحق.
So here's the piece of PHP code I've came up with to help you reset your wordpress account password. حتى هنا وقطعة من بي إتش بي رمز لقد خرجت مع لمساعدتك على إعادة تعيين كلمة المرور الخاصة بك وورد الاعتبار.
$newPassword='NEW_PASSWORD_GOES_HERE'; //put your new password between the single quotes $ newPassword = 'NEW_PASSWORD_GOES_HERE' ؛ / / وضعت كلمة السر الجديدة بين الاقتباس واحد $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 @ include_once ( '. / الفسفور الابيض بين config.php') ؛ / / الحصول على بعض التفاصيل من التثبيت وورد global $table_prefix; العالمية 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) ؛ / / تأسيس اتصال لقاعدة البيانات الخاصة بك 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'; استفسار دولار = 'التحديث` '. table_prefix دولار.' `تعيين المستخدمين user_pass` `= \''. mysql_real_escape_string (md5 ($ newPassword)). '\' حيث user_login `` = \ ''. mysql_real_escape_string (اسم المستخدم دولار). '\' الحد من 1 '؛ $mQuery=mysql_query($query,$conxb); //set new password $ mQuery = mysql_query ($ الاستعلام ، $ conxb) ؛ / / تعيين كلمة المرور الجديدة echo $mQuery?'Successfully set new password. صدى $ mQuery؟ بنجاح تعيين كلمة المرور الجديدة. New password: '.$newPassword:'There was an error. كلمة السر الجديدة : '. $ newPassword :' هناك خطأ. Error: '.mysql_error(); //if result is unsuccessful you'll see the mysql error message خطأ : '. mysql_error () ؛ / / إذا كانت النتيجة غير ناجحة سترى الخلية رسالة الخطأ mysql_close($conxb); mysql_close ($ conxb) ؛
For your convenience you can download the file reset.php from here . لراحتك يمكنك تحميل reset.php الملف من هنا.
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). الآن استخراج أرشيف مضغوط التي قمت بتحميلها فقط وعدل المعلمات الضرورية لتناسب احتياجاتك (تفسير تعليقات موجودة في [فب] رمز أعلاه). Then upload the file reset.php to your wordpress root installation folder. ثم تحميل الملف الخاص بك reset.php ورد التثبيت المجلد الجذر. To make sure that this is the right directory, look for a file named wp-config.php , للتأكد من أن يكون هذا الدليل هو الحق ، والبحث عن ملف اسمه 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. اذا كان هناك كنت على الطريق الصحيح ، وآخر للبحث عن الدليل حيث الفسفور الابيض بين config.php موجود وتحميل الملف reset.php هناك.
Finally you'll want to go to http://yourDomainName.TLD/ reset.php . وأخيرا عليك تريد ان تذهب الى http://yourDomainName.TLD/ reset.php. You'll see the appropriate message depending on how the script worked. سترى الرسالة المناسبة اعتمادا على كيفية عمل البرنامج النصي. 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. إذا كان هناك خطأ ، وبعد ذلك هنا وسأحاول مساعدتك ، وأنت فعلت كل شيء آخر تماما ، ويمكنك الآن تسجيل الدخول باستخدام كلمة المرور الجديدة.
Related posts: الوظائف ذات الصلة :
- Wordpress 2.8.4: Not ready to be installed with PHP 5.3 ? وورد 2.8.4 : ليس على استعداد ليتم تثبيتها مع بي 5.3؟
- Wordpress: Best SEO iTranslator for Wordpress, get free traffic from fully automated plugin script وورد : أفضل كبار المسئولين الاقتصاديين iTranslator لورد ، والحصول على حرية الحركة من مؤتمتة بالكامل النصي المساعد
- PHP: How to get creation time of file with PHP on Linux machines [فب] : كيفية الحصول على الوقت لإنشاء ملف مع بي على لينكس آلات
- PHP Error: Call to a member function fetch_assoc() on a non-object in [فب] خطأ : دعوة إلى وظيفة fetch_assoc عضوا () على غير كائن في
- Coding:How to fetch user profile data with SSI.php from a SMF forum database الترميز : كيفية إحضار البيانات الجانبي للمستخدم مع SSI.php بإمكانك زيارة المجلة الثقافية من قاعدة بيانات منتدى
- Katya كاتيا
- purie purie





















































