Yerel WordPress sitenizin dışında kalmak çalışmalarınızı durdurabilir. Temaları test ederken veya Yerel ortamda müşteri projeleri kurarken bu durumla karşılaştık.
İşin sinir bozucu kısmı, parola sıfırlama e-postalarının localhost kurulumlarında çalışmaması. Yani “Şifrenizi mi kaybettiniz?” seçeneğine tıklasanız bile gelen kutunuzda hiçbir şey görünmüyor.
Neyse ki, e-posta erişimine ihtiyaç duymadan WordPress yönetici şifrenizi sıfırlamanın kolay yolları var. Yerel sitelerimize geri dönmek için bu yöntemleri sayısız kez kullandık.
Bu eğitimde, phpMyAdmin veya WP-CLI kullanarak localhost’ta WordPress yönetici şifrenizi nasıl sıfırlayacağınızı göstereceğiz – hangisi size daha rahat geliyorsa.

Parola Sıfırlama Neden Localhost’ta Çalışmıyor?
“Localhost” dediğimizde, yerel bir sunucudan bahsediyoruz – genellikle bilgisayarınız. Bu, yayına geçmeden önce bir WordPress sitesi oluşturup test edebileceğiniz özel bir alandır.
Yeni eklentileri, tasarım değişikliklerini denemek veya WordPress’in nasıl çalıştığını öğrenmek için genellikle localhost kullanıyoruz. Endişelenmeden bir şeyleri bozmak için güvenli bir yoldur.
Henüz denemediyseniz, bu kılavuzlar başlamanıza yardımcı olabilir:
İşte yeni başlayanlar için kafa karıştırıcı olabilecek kısım. Yerel bir sitede yönetici parolanızı unutursanız, normal “Parolanızı mı kaybettiniz?” bağlantısı size yardımcı olmayacaktır.
Bunun nedeni WordPress’in normalde bir parola sıfırlama e-postası göndermesidir, ancak localhost kurulumları bunu manuel olarak ayarlamadığınız sürece e-posta gönderemez. Ve varsayılan olarak çoğu kişi bunu yapmaz.
Neyse ki, tekrar girmek için bir e-postaya ihtiyacınız yok. Tamamen kilitlenmiş olsanız bile localhost’ta şifrenizi sıfırlamanın iki kolay yolunu göstereceğiz.
Yöntem 1: phpMyAdmin Kullanarak Localhost’ta WordPress Yönetici Parolasını Sıfırlama
XAMPP, WAMP veya MAMP gibi araçlar kullanıyorsanız, phpMyAdmin zaten yüklü olmalıdır. Şifreleri sıfırlamak da dahil olmak üzere doğrudan veritabanında ince ayar yapmak için birçok kez kullandık.
phpMyAdmin, WordPress veritabanınızı yönetmeniz için size görsel bir arayüz sunar. Kulağa karmaşık geliyor, ancak bir kez alıştığınızda, oldukça basittir.
Not: LocalWP kullanıyorsanız, bunun yerine Adminer adlı bir araç göreceksiniz. Tıpkı phpMyAdmin gibi çalışır, bu yüzden bu adımları kolayca takip edebilirsiniz.

Başlamak için tarayıcınızı açın ve bu adrese gidin:
http://localhost/phpmyadmin/
Oturum açmanız istenebilir. Çoğu kurulumda kullanıcı adı root ‘tur ve parola alanı boş bırakılır.
phpMyAdmin’e girdikten sonra, kenar çubuğunda WordPress veritabanınızın adını bulun ve tıklayın.

Bu veritabanı içindeki tabloların bir listesini göreceksiniz. Sonu _users
ile biteni bulun ve yanındaki Gözat bağlantısına tıklayın.
Not: Çoğu WordPress sitesi önek olarak wp_
kullanır, ancak kurulum sırasında değiştirdiyseniz farklı olabilir.

Şimdi sitenizdeki kullanıcıların bir listesini göreceksiniz. Yönetici kullanıcı adının bulunduğu satırı bulun ve yanındaki Düzenle bağlantısına tıklayın.

Bu, veritabanında depolanan tüm kullanıcı verilerini gösteren bir form açar. user_pass alanını bulana kadar aşağı kaydırın.
Değer sütununa yeni parolanızı yazın. Ardından İşlev sütununda, açılır menüden MD5 ‘i seçin.

Bu adım önemlidir – WordPress şifreleri şifreleme kullanarak saklar ve MD5 formatı tanımasına yardımcı olur.
Değişikliklerinizi kaydetmek için en alttaki Git düğmesine tıklayın.

İşte bu kadar! Artık yeni belirlediğiniz parolayı kullanarak yerel WordPress sitenizde oturum açabilirsiniz.
Yöntem 2: Functions.php Dosyası Üzerinden Şifre Sıfırlama
PhpMyAdmin’e erişiminiz yoksa veya farklı bir yaklaşım tercih ediyorsanız, temanızın functions.
php dosyasını düzenleyerek WordPress yönetici şifrenizi sıfırlayabilirsiniz. Bu yöntem basittir ve hızlı bir şekilde yapılabilir.
Adım 1: Temanızın Functions.php Dosyasına Erişin
İlk olarak, aktif temanız için functions.php dosyasını bulmanız gerekir. Bunu yapmak için localhost’unuzdaki WordPress kurulumunuzun kök dizinine gidin.
Hangi yazılımı kullandığınıza bağlı olarak, kök dizinin konumu farklı olabilir. Örneğin, Local kullanıyorsanız, siteniz şu adreste bulunacaktır:
C:\Users\yourusername\Local Sites\yoursitename\app\public\
Ardından, /wp-content/themes/
klasörüne gidin. İçinde, etkin temanızın adını taşıyan bir klasör bulacaksınız.

Aktif tema klasörünüzün içinde functions.php
adlı bir dosya bulun ve Notepad veya TextEdit gibi bir metin düzenleyicide açın.
Adım 2: Şifreyi Sıfırlamak için Kodu Ekleyin
functions.php
dosyasının en altına aşağıdaki kodu yapıştırmanız gerekir:
1 2 3 4 5 6 | function reset_admin_password() { $user_id = 1; // ID of the admin user $new_password = 'newpassword123' ; // Your new password wp_set_password( $new_password , $user_id ); } add_action( 'init' , 'reset_admin_password' ); |
‘newpassword123’ yerine kullanmak istediğiniz daha güçlü bir şifre koymayı unutmayın.
Bu kod, 1 ID’li yönetici kullanıcısı için yeni bir şifre belirler. Ancak, kullanıcı ID’sini bilmiyorsanız ancak yönetici e-posta adresini biliyorsanız, bunun yerine bu kod parçacığını kullanabilirsiniz:
1 2 3 4 5 6 7 8 9 | function reset_admin_password_by_email() { $user_email = 'admin@example.com' ; // Admin user's email address $user = get_user_by( 'email' , $user_email ); if ( $user ) { $new_password = 'newpassword123' ; // Your new password wp_set_password( $new_password , $user ->ID); } } add_action( 'init' , 'reset_admin_password_by_email' ); |
Bu kod, belirtilen e-posta adresiyle ilişkili yönetici kullanıcısı için yeni bir parola(newpassword123
) belirler.
Kodu ekledikten sonra functions.php
dosyasını kaydedin ve localhost WordPress sitenizi tarayıcınızda yenileyin. Artık yeni parolayı kullanarak giriş yapabiliyor olmalısınız.
Adım 4: Kodu Kaldırın
Başarılı bir şekilde giriş yaptıktan sonra, olası güvenlik risklerinden kaçınmak için kod parçacığını functions.php
dosyasından kaldırmanız önemlidir.
Basitçe functions.php
dosyasını açın ve daha önce eklediğiniz kodu silin. Değişikliklerinizi kaydetmeyi unutmayın.
Bonus Kaynaklar:
Aşağıda WordPress’te parolaları ve yönetici hesaplarını yönetmeye ilişkin ek ipuçları ve eğitimler yer almaktadır:
- MySQL ile WordPress Veritabanına Yönetici Kullanıcı Ekleme
- WordPress’te FTP Kullanarak Yönetici Kullanıcı Ekleme (Kolay Öğretici)
- SMTP ile Localhost’tan WordPress E-postaları almak için başlangıç kılavuzu
- Parolalar Nasıl Kolayca ve Güvenli Bir Şekilde Yönetilir (Başlangıç Rehberi)
- WordPress Yönetici (wp-admin) Dizininizi Parola ile Koruma
Umarız bu makale yerel bir sunucuda WordPress yönetici şifrenizi sıfırlamanıza yardımcı olmuştur. Ayrıca WordPress için geçici bir oturum açma oluşturma eğitimimizi görmek veya WordPress’e tek tıklamayla Google oturumu ekleme kılavuzumuza göz atmak isteyebilirsiniz.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Hafiz Muhammad Ansar
Very nice blog for WordPress help. I recommend for beginners to use this platform. Thankful!
WPBeginner Support
Glad you found our article helpful!
Admin
Abdullah
Amazing, it worked
WPBeginner Support
Glad our guide was helpful!
Admin
Nidhi Gupta
it’s really helpful, thankyou so much
WPBeginner Support
Glad our guide was helpful!
Admin
Habu
Omg you save my life !!! THANK YOU VERY MUCHH !!!
Jahir
I can not log in now same process…any updates?
WPBeginner Support
The most common issue would be if you did not set the function to MD5 or click go to apply the changes, you would want to ensure you have done that correctly.
Admin
Kamondo
Wonderful! problem solved. Very Simple steps but powerful.
WPBeginner Support
Glad our guide was helpful
Admin
Joe
I’m encoutering this problem now after installing the 2nd WordPress on MAMP. This article is very to the point and I’ll try it tomorrow!
WPBeginner Support
We hope the guide helps
Admin
Gerron
Solid solid info right here, thanks a lot, really helped, so simple
WPBeginner Support
Glad our guide was helpful
Admin
Odineks
Thank you so much. I always find solutions to every of my WP problems here.
I kept having problems with the login page on the frontend not recognizing my new password, I didn’t realize there is a function to pass that message to myPHPadmin.
WPBeginner Support
Glad our guide was helpful
Admin
naved ahmed
Thanks a lot. Finally problem solved within a minute.
WPBeginner Support
Glad our guide was helpful
Admin
Mohsin
I just love this
Love the way you write every thing
WPBeginner Support
Thank you, glad you like our content
Admin
Jen
I tried this and while I was in there also attempted to change my username, which I realize was probably my mistake… but now I can’t log in at all. Is there a way to undo what I’ve done?
WPBeginner Support
You would need to follow the steps in the article and that would bring you back to where you could edit, you should also be able to use your email as an alternative
Admin
Justina
Your Blog is always so full of rich articles. Thanks so much. was stuck for a while because I skip the MD5 option. You are a lifesaver.
WPBeginner Support
Glad our guide could be helpful
Admin
Sarah
Thank you SO MUCH for this! You saved me so many more hours of tinkering with trying to figure out how to log in!!
WPBeginner Support
Glad we were able to help
Admin
David
Thank you ever so much! Normally, I keep this stuff handy; but in this case, I did could not find where I wrote the information down.
You saved a total re-work of a site I was planning.
WPBeginner Support
Glad our guide could be helpful
Admin
adeel kamran
You saved me, I had a lot of work there.
WPBeginner Support
Glad our guide could help
Admin
lokesh n
thank you it’s really working thank you
WPBeginner Support
You’re welcome glad our article was helpful
Admin
Vivek
Hi,
When I reset My password through link then what fileds affected in Database and in which table.
Kindly share this information i am waiting for your response.
WPBeginner Support
For understanding the database you would want to take a look at our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/
Admin
Adnan Khan
After half an hour of search i just found my help from this site, which solves my problem in no time,
thanks a lot
keep it up guys
WPBeginner Support
You’re welcome, glad our guides can be helpful
Admin
Tenasu Mensah
thanks a lot, kudos to you guys keep the good work doing,you guys are doing great job
WPBeginner Support
Glad our guide could help
Admin
Anuj
It work fine, Thanku so much,
Pádraig
Really simple and great explanation.
Many thanks for sharing.
Saranya
Works Good! Thanks a lot.
Patr
Hello,
I type a new password , click continue and it does not keep the password, it shows a long string of numbers and letters. If I use this , still cannot log in. It looks simple on the video but does not work for me. Thank you.
I looked everywhere on the internet, no solution worling.
Jason
Same problem here. Did you find a solution? Is there any chance of being hacked?
Christian Gochez
when I click on the Go button this error appears:
#1881 – Operation not allowed when innodb_forced_recovery > 0
Edward
Simple and neat! worked thanks
Handel
I started to just reinstall wordpress, but then decided to do a google search, and there was GOOD OLD RELIABLE WpBeginner.com
Thanks a million!!
Sheriff
very effective… kudos
Icholia
Hello
THANKS, Wow there is no other place that you can get well explained information like this , i have been suffering but now i just followed your tutorial and it is a game changer i love you guys and i will always learn from you guys once again thanks
CJ
Thank you! For those who can’t make it work, remember to use the “MD5” function when changing the password. I almost skipped that part and was stuck for a few minutes.
mohamad hossein
so use full thank you so much
Janet
I got completely lost on the video so I tried plugging in the URL. Doesn’t work. Still lost.
Ma
Thanks so much, you saved me from what could have been a very embarrassing situation!
James
I change the password, username, userlogin and nickname not I cant login. Any advice?
suganya
i can’t able to login .because it’s shows me like email is not registered .so what can i do???
Jac
Thanks so much for providing this info – I was really stuck!
Gerhard SCHNEIBEL
Thanks a lot for your help. I am very happy with “wpbeginners”.
Renu
it worked.. thanks a ton..
Anthony
Hi…
I am so thankful for such great information you provide. I have bookmarked your site a while back.
I have been working on a site in wordpress using xampp on the Apache local server. Just recently, I am not able to login on the admin page. I have managed to create a user name and password that works on about 95% of all sites requiring me to register. I also created a file that lists all my login info for everywhere I need to login, including the WP admin login page, IF I ever forget that info.
I have read this page (https://www.wpbeginner.com/wp-tutorials/how-to-reset-wordpress-admin-password-on-localhost/) and watched the video, also. The only problem is that when I click on the wp_users in phpMyadmin, I get this error- ‘#1932 – Table ‘bitnami_wordpress.wp_users’ doesn’t exist in engine.’
Am I reduced to re-installing WordPress, or is there another way around it?
I have tried restoring my computer (using system restore) to various past restore points, but with no luck. Can you help me with this?
I would be so thankful!!! I have put months of work into designing a site to launch, and I HAVE exported everything to a file quite a few times using WordPress import plugin (something like that).
Could you provide a solution?
Thank you so much…
Anthony
WPBeginner Support
Hi Anthony,
you can also add an admin user by adding code to your current WordPress theme’s admin file.
Admin
Kakaire Charles
Extremely wonderful. Thank you for sharing.
Gaurav
i tried this but not working
shaikh muneer
super way to reset admin password thank you for share this