Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Kupası
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPress Yönetici (wp-admin) Dizininizi Nasıl Parola ile Korursunuz?

Editoryal Not: WPBeginner üzerindeki ortak bağlantılardan komisyon kazanıyoruz. Komisyonlar, editörlerimizin görüşlerini veya değerlendirmelerini etkilemez. Editoryal Süreç hakkında daha fazla bilgi edinin.

WordPress yönetici dizininizi nasıl parola ile koruyacağınızı öğrenmek ister misiniz?

WordPress yönetici dizininize başka bir parola koruması katmanı eklemek, WordPress güvenliğinizi artırmanın harika bir yolu olabilir.

Bu makalede, wp-admin dizininizi nasıl kolayca parola ile koruyabileceğinizi öğreneceksiniz.

How to Password Protect Your WordPress Admin (wp-admin) Directory

WordPress Yönetici Dizininizi Neden Parola ile Korumalısınız?

WordPress yönetici dizininizi parola ile koruyarak WordPress web sitenizin en önemli giriş noktasına ekstra bir güvenlik katmanı eklemiş olursunuz.

WordPress yönetici paneliniz sitenizin merkezidir. Yazıları ve sayfaları yayınlayacağınız, temanızı özelleştireceğiniz, WordPress eklentilerini yükleyeceğiniz ve daha fazlasını yapacağınız yerdir.

Bilgisayar korsanları web sitenize girmeye çalıştıklarında bunu genellikle wp-admin ekranı üzerinden kaba kuvvet saldırısı kullanarak yaparlar.

Güçlü bir parola ve giriş denemelerini sınırlama gibi güvenlik önlemleri kullanarak web sitenizi olası saldırılara karşı korumaya yardımcı olabilirsiniz.

Daha da güvenli olması için wp-admin dizinini de parola korumalı hale getirebilirsiniz. Böylece, birisi yönetici alanınıza erişmeye çalıştığında, WordPress giriş sayfasına ulaşmadan önce bir kullanıcı adı ve şifre girmesi gerekecektir.

Bununla birlikte, WordPress yönetici dizininizi adım adım nasıl parola ile koruyabileceğinize bir göz atalım.

Çoğu kullanıcı için ilk yöntem önerilir ve kullanmak istediğiniz yönteme doğrudan atlamak için aşağıdaki hızlı bağlantıları kullanabilirsiniz:

Video Eğitimi

Subscribe to WPBeginner

Yazılı talimatları tercih ediyorsanız, okumaya devam edin.

Yöntem 1: Dizin Gizliliğini Kullanarak wp-admin’i Parola ile Koruyun (Önerilen)

WordPress yönetici dizininizi parola ile korumanın en kolay yolu WordPress barındırma sağlayıcınızın Dizin Gizliliği uygulamasını kullanmaktır.

Öncelikle, hosting hesabınızın kontrol panelinde oturum açmanız ve web sitenizin cPanel kontrol panelinin Dosyalar bölümündeki ‘Dizin Gizliliği’ seçeneğine tıklamanız gerekir.

Click on the Directory Privacy option in the Files section

Not: Bluehost gibi cPanel kullanan çoğu web barındırıcısı benzer adımlara sahip olacaktır. Ancak, barındırma sağlayıcınıza bağlı olarak kontrol paneliniz ekran görüntülerimizden biraz farklı olabilir.

Bu sizi sunucunuzdaki tüm farklı dizinleri listeleyen bir ekrana getirir. Web sitenizin dosyalarını içeren klasörü bulmanız gerekir.

Çoğu web sitesi sahibi için bu, ‘public_html’ klasörüne tıklayarak bulunabilir.

Click public_html

Bu, sunucunuza yüklediğiniz tüm web sitesi dosyalarını getirir.

Ardından, web sitenizin alan adının bulunduğu klasöre tıklamanız gerekir.

Click domain name folder

Bu klasörde bir wp-admin klasörü göreceksiniz.

Klasör adına tıklamak yerine, o klasörün yanındaki ‘Düzenle’ düğmesine tıklamanız gerekir.

Click edit wp-admin folder

Bu sizi parola korumasını açabileceğiniz bir ekrana getirir.

‘Bu dizini parola ile koru’ yazan kutuyu işaretlemeniz yeterlidir. İsterseniz, hatırlamanıza yardımcı olması için dizininize ‘Yönetici Alanı’ gibi bir ad da verebilirsiniz.

Check password protect directory box

Bunu yaptıktan sonra, ‘Kaydet’ düğmesine tıklamanız gerekecektir.

Bu sizi onay mesajının görüneceği bir sayfaya götürecektir.

Confirmation message click back button

Şimdi, ‘Geri Git’ düğmesine tıklamanız gerekecek ve bu dizine erişebilecek bir kullanıcı oluşturabileceğiniz bir ekrana yönlendirileceksiniz.

Bir kullanıcı adı ve parola girmeniz ve ardından parolayı onaylamanız istenecektir. Kullanıcı adınızı ve şifrenizi, şifre yöneticisi uygulaması gibi güvenli bir yere not ettiğinizden emin olun.

Create a User

Bunu yaptıktan sonra ‘Kaydet’ düğmesine tıkladığınızdan emin olun.

Şimdi, birisi wp-admin dizininize erişmeye çalıştığında, yukarıda oluşturduğunuz kullanıcı adı ve şifreyi girmesi istenecektir.

Password protect WordPress admin example

Yöntem 2: Kod Kullanarak wp-admin’i Parola ile Koruyun

WordPress yönetici dizininizi manuel olarak da parola ile koruyabilirsiniz. Bunu yapmak için .htpasswd ve .htaccess adında iki dosya oluşturmanız gerekir.

Not: WordPress sitenize herhangi bir kod eklemek tehlikeli olabilir. Küçük bir hata bile web sitenizde büyük hatalara neden olabilir. Bu yöntemi yalnızca ileri düzey kullanıcılar için öneriyoruz.

.htaccess Dosyasını Oluşturma

İlk olarak, tercih ettiğiniz metin düzenleyiciyi açın ve yeni dosyaya .htaccess adını verin.

Bundan sonra, aşağıdaki kod parçacığını kopyalamanız ve dosyaya eklemeniz gerekir:

AuthName "Admins Only"
AuthUserFile /home/user/public_html/example.com/wp-admin/.htpasswd
AuthGroupFile /dev/null
AuthType basic
require user yourusername

‘AuthUserFile’ yolunu .htpasswd dosyasını yükleyeceğiniz konum olarak değiştirdiğinizden ve ‘yourusername’ ifadesini oturum açmak için kullanmak istediğiniz kullanıcı adıyla değiştirdiğinizden emin olun.

İşiniz bittiğinde dosyayı kaydetmeyi unutmayın.

.htpasswd Dosyasını Oluşturma

Bunu yaptıktan sonra, bir .htpasswd dosyası oluşturmanız gerekir.

Bunu yapmak için bir metin düzenleyici açın ve .htpasswd adında bir dosya oluşturun. Bu dosya kullanıcı adınızı şifrelenmiş bir biçimde parolanızla birlikte listeleyecektir.

Şifrelenmiş parolayı oluşturmanın en kolay yolu bir htpasswd oluşturucusudur.

Kullanıcı adınızı ve parolanızı girmeniz, şifreleme biçimini seçmeniz ve ‘Create .htpasswd file’ düğmesine tıklamanız yeterlidir.

Create htpasswd file

htpasswd oluşturucu, .htpasswd dosyanıza yapıştırmanız gereken bir metin satırı görüntüleyecektir. Bunu yaptıktan sonra dosyayı kaydettiğinizden emin olun.

.htaccess ve .htpasswd dosyalarının wp-admin Dizinine yüklenmesi

Son adım, oluşturduğunuz her iki dosyayı da web sitenizin wp-admin klasörüne yüklemektir.

WordPress barındırma hesabınıza bir FTP istemcisi veya barındırma sağlayıcınız tarafından sağlanan çevrimiçi dosya yöneticisi aracını kullanarak bağlanmanız gerekecektir. Daha fazla ayrıntı için WordPress’e dosya yüklemek için FTP’nin nasıl kullanılacağına ilişkin başlangıç kılavuzumuza bakın.

Bu eğitimde, ücretsiz olduğu ve hem Mac hem de Windows’ta çalıştığı için FileZilla ‘yı kullanacağız.

Web sitenize bağlandıktan sonra, soldaki pencerede bilgisayarınızdaki dosyaları ve sağda web sitenizdeki dosyaları göreceksiniz. Sol tarafta, .htaccess ve .htpasswd dosyalarını kaydettiğiniz konuma gitmeniz gerekir.

Ardından, sağ tarafta, korumak istediğiniz web sitesi için wp-admin dizinine gitmeniz gerekir. Çoğu kullanıcının public_html klasörüne, ardından alan adlarının bulunduğu klasöre ve ardından wp-admin klasörüne çift tıklaması gerekecektir.

Şimdi, soldaki iki dosyayı seçebilir ve sağ tıklama menüsünden ‘Yükle’ye tıklayabilir veya dosyaları soldaki pencereye sürükleyebilirsiniz.

Uploading the Files to Your Website's wp-admin Directory

Artık ‘wp-admin’ dizininiz parola korumalı olacaktır.

wp-admin Parola Koruması Sorunlarını Giderme

Sunucunuzun ve web sitenizin nasıl kurulduğuna bağlı olarak, WordPress hatalarıyla karşılaşma olasılığınız vardır. Bu hatalar .htaccess dosyanıza dikkatlice kod ekleyerek düzeltilebilir.

Not: Bu, ‘wp-admin’ klasörüne yüklediğiniz değil, ana web sitesi klasörünüzde bulunan .htaccess dosyasıdır. Bulmakta sorun yaşıyorsanız, .htaccess dosyasını neden bulamadığınız ve nasıl bulacağınızla ilgili kılavuzumuza bakın.

Ajax Çalışmıyor Hatasını Düzeltme

En yaygın hatalardan biri, Ajax işlevselliğinin sitenizin ön ucunda çalışmayı durdurabilmesidir. Canlı Ajax araması veya Ajax iletişim formları gibi Ajax gerektiren WordPress eklentileriniz varsa, bu eklentilerin artık çalışmadığını fark edeceksiniz.

Bunu düzeltmek için, aşağıdaki kodu wp-admin klasörünüzde bulunan .htaccess dosyasına eklemeniz yeterlidir:

<Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any 
</Files>

404 Hatasını ve Çok Fazla Yönlendirme Hatasını Düzeltme

Karşılaşabileceğiniz diğer iki hata 404 hatası ve çok fazla yönlendirme hatasıdır.

Bunları düzeltmenin en basit yolu, web sitenizin dizininde bulunan ana .htaccess dosyanızı açmak ve WordPress kurallarından önce aşağıdaki kod satırını eklemektir:

ErrorDocument 401 default

Bonus: wp-admin Güvenliği için En İyi WordPress Kılavuzları

Artık wp-admin dizininizi nasıl parola ile koruyacağınızı bildiğinize göre, yönetici alanınızı daha güvenli hale getirmek için bu kılavuzları görmek isteyebilirsiniz:

Umarız bu makale WordPress yönetici (wp-admin) dizininizi nasıl parola ile koruyacağınızı öğrenmenize yardımcı olmuştur. Ayrıca ücretsiz e-posta alanı edinme kılavuzumuza ve küçük işletmeler için en iyi e-posta pazarlama hizmetleri uzman seçimlerimize de 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.

Açıklama: İçeriğimiz okuyucu desteklidir. Bu, bazı bağlantılarımıza tıklarsanız komisyon kazanabileceğimiz anlamına gelir. WPBeginner'ın nasıl finanse edildiğini, neden önemli olduğunu ve nasıl destek olabileceğinizi görün. İşte editoryal sürecimiz.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Ultimate WordPress Araç Kiti

Araç setimize ÜCRETSİZ erişim sağlayın - her profesyonelin sahip olması gereken WordPress ile ilgili ürün ve kaynaklardan oluşan bir koleksiyon!

Reader Interactions

204 yorumBir Cevap Bırakın

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

    • WPBeginner Support says

      That would be where your WordPress folders are, you could either use FTP or your host’s file manager if they have one to get to your WordPress files.

      Yönetici

  2. CHHRIS says

    Please this settings works fine for me, but my problem is that am using woocommerce and yith woocoomerce my account page, so when ever users login to their my-account area they are often prompted to put the login details for my protected admin, how can i fix this?

    • WPBeginner Support says

      For that, you would want to remove this protection unless you wanted to give each user a login for the httpassword

      Yönetici

    • WPBeginner Support says

      It would depend on the specific error you are running into when trying to get to your admin area for how to solve the problem

      Yönetici

  3. Rahul Yogi says

    Hy buddy, i had tried cpanel method which doesnt work for me but manual method work as shown above.

    But i have one problem after going example.com/admin, i have to enter directory username and password but after after entering nothing happens means it does not redirect me to dashboard or anywhere. Just same page — shoing waiting for connection for example.com and get error too many redirect.

  4. Brian says

    Wow,

    You are a legend! Spent like 2hrs jumping from site to site to get this working… First site that mentioned the ErrorDocument 401 default. Works like a charm now

    Thanks

  5. Deb says

    Thanks so much – this is the first place I have found with all 3 bits of code that was needed – (I had the redirect problem). The code worked like a charm. I now have an extra layer of protection without adding another potentially vulnerable plugin.

    • WPBeginner Support says

      If the htaccess method is not working you could remove the code and then use the cpanel method for password protecting the directory

      Yönetici

  6. Samwel says

    I followed the steps but i now can’t log in . It says “The server encountered an internal error or misconfiguration and was unable to complete your request.”

    even on refreshing the page the pop up to key in password does not re-appear help out

  7. maria hag says

    hi,

    i bought new name and i change the name of website and than save it . now i cant login to admin. it show me 404 erorr
    how can i change it
    please advise

    • WPBeginner Support says

      You would want to reach out to your hosting provider and they should be able to help you have your new domain point toward where your site is currently

      Yönetici

  8. taher says

    I have activated password protection to wordpress directory via c-panel but wordfence is unable to scan my site. Due to ajax issue.

    I tried fixing it by updating my wp-admin/.htaccess file with the provided code by you but wordfence is still unable to start a scan. What do you suggest?

    • WPBeginner Support says

      You may want to ensure your caching is cleared and if that error continues, reach out to Wordfence about their plugin

      Yönetici

  9. Amit Mukherjee says

    Enabling password protection of the wp-admin directory prevents me as logging in as the administrator. I get a page not found error. I cannot get to the login page. If I remove the password protection, I can login.

    What should I do. I am setting up a WordPress website for the first time.

  10. mary-anne J. says

    So how do you undo the password protect using the cPanel ..that is, I want to remove my password protection for the wp-admin directory

  11. Keri says

    I followed the instructions to add the password protection using c_panel.

    It works fine in IE 11 but doesn’t work in: Edge; Firefox; Chrome; or Opera.
    Any ideas?

      • Keri says

        I’m not sure what I missed, given that it worked in IE but not in the other browsers. I deleted the user to whom I had given access and added the same user back in and, “Voila!”, all is good.

  12. Valentin says

    > Upload this file outside your /public_html/ directory.

    Good advice—more generally: outside your DocRoot.

    > A good path would be: home/user/.htpasswds/public_html/wp-admin/passwd/

    That, however, doesn’t seem to be outside your DocRoot ;)

  13. pawan singh says

    hi syed, i followed your tutorial as i do always whenever i find a problem but i am facing this error continiously.

    ERROR –

    “401
    Unauthorized

    Proper authorization is required to access this resource!”

    1. I made htpassword file properly with user name and password.
    2. Edited main .htaccess file with proper code.
    3. Implemented this line in .htaccess file on topas first line
    ErrorDocument 401 default
    4. Add AJAX functionality code

    After doing all this i see additional popup box which need login details for wp-admin. – Success here

    But i’m not able to access my home page like example.com. popupbox appears again without calling /wp-admin. Please tell how to remove this 401 Error. I see that many bloggers asked this issue in comment section, but you didn’t reply. I hope you will soon address the problem.

    • WPBeginner Support says

      Hello Pawan,

      This could be because the password your entered is incorrect or your server couldn’t find the .htpasswds file. We will recommend you to retrace your steps to figure out what went wrong.

      Yönetici

      • Robbiegod says

        I am seeing the same issue. On subpages on my site, when I have my /wp-admin/ .htaccess password protecting my site, I get the user/pass pop-up box on pages on the front end.

        The temporary solution was to just remove the htaccess file from wp-admin. Now i am trying to put it back, so I’ll see what i can come up with and post back if i figure it out.

  14. Arinze Ifeanyi says

    Thank you for this. I worked really well especially that line “ErrorDocument 401 default” that prevented it from giving 404 error. I really dont miss tweet from you. My question now is, how can someone remove the password? And again, will the password be required upon users registration via a custom registration page?

  15. Rony Ahamed says

    after using this method now when i try to go in wp-admin its says me maintenance mood ( this mode is on in my wp dashboard ) .. so how can i use it ?

  16. pawan says

    hi how to change my cpanel default url like “www.example.com/cpanel” to “www.example.com/customized”
    there is nothing on the internet about this topic.

  17. Edgar says

    Hi my dear friends I have a problem. I want to make double autentification on my wordpress.But there is conflict in wordpress htacsess between wp default rules and this code:

    AuthType Basic
    AuthName “Password Protected”
    AuthUserFile path/to/.htpasswd
    Require valid-user
    Satisfy All

    I get error like 500 or error “this page is wrong”, but after delating wp default rules my code work.There is some conflict between wp code and my code! Can anyone take solution!

  18. Aurangzeb says

    A very nice approach, but I also suggest to go secure with https, because no matter how protected the admin panel is, with passwords, the passwords itself are not secure if it’s not https.

  19. Daljit Singh says

    Hey guys, my issue is related to this post but it is little different too.
    I need to password protect my wp-content folder in my hosting.
    I called my godaddy hosting and they said that it is not possible.
    But i need to password protect it.
    Can someone help me out please?

  20. Akhil says

    Password Protecting WordPress Admin with Permalink “Post Name” gives error error login page( Redirect too many times). How to solve?

  21. Harmony A-E says

    Can I do this for my wp-login?

    The wp-admin is password protected and gives out a 401 if some tries to exit the pop-up (so 0 access without the 1st password).

    But my wp-login allows access to a disfigured wp-login page if someone exits out of the pop-up.

  22. Frank says

    That’s a great article.

    However, I’d like to ask you how can I track the who visits the page (IP, etc) even though if they don’t type any username or password or type wrong ones. I can’t seem to find a way to do that.

    Please let me know.
    Thanks!

  23. Deivamoorthy says

    Thanks for this article. It is really helped me lot save the login form anonymous person. But, i have an issue on my site. Whenever the user visits and entering to the single post page it asks the user enter the username password, Even though they have didn’t accessed the wp -admin. it happens only in Mozilla browser. How to solve this?

  24. Toan says

    I has finished setting protect password for wp-admin folder. But i can not registered new account for guest. Because it apperance pop-up login require username/password.

  25. paras arora says

    sir actually i have changed my admin directory from example.com/wp-admin to example.com/abcde …how to password protect it now

  26. Sarah says

    Thanks for this valuable info.I have question I want to setup limit login Attempts if users fails 1st time then try after 24 hrs latter how to I make this on cpanel?

  27. RJ says

    Hi there I do password protect my wp-admin directory and I did add that code to my htaccess …but…it is still asking for authorization.

    Any suggestions?

  28. dipesh says

    i dont ve set password for wp-admin folder but still it shows authorization dialog .
    how to solve the issue,

  29. Cjay says

    I recently added password protected my “wp-admin” directory and my “wp-includes” directory. Now each time i try to access my “wp-admin” page with it’s username and password that i created i get to dialogue box popping up for me to enter the username and password for that of the “wp-includes” directory before signing in to the main wordpress admin page.

    Have you encountered such issue with wordpress before?

  30. Lissa says

    Thanx so much for this! After an extended break from blogging I installed a new blog today and as soon as I password protected the admin directory I got the redirect error. This fix worked flawlessly :)

  31. abey says

    After setting this security. Server always ask for password with a popup even in a user visit the site home page. Is there any way to overcome this.

    • Abhimanyu says

      This gets resolved once you add the htaccess entry for admin-ajax.php. Follow the tutorial section towards the end.

  32. Mariah Zuzuvecha says

    You saved me a lot of time .
    I was looking arrange the problem and you post save me !
    thanks again ¡

  33. ece says

    There is no htaccess file in my wp-admin folder! There is only one in var/www
    How do I fix the Ajax problem?

  34. Ricardo says

    It’s a good method but the problem is that regular users can’t recover their password if they click on “Lost your password?” link (/wp-login.php?action=lostpassword).

    How could I prevent that?

  35. ajakayetolu says

    I recently install wordpress but mydomain/wp-admin/ keeps asking for username and password despite inputing the correct password and username its just as if it is refreshing itself.

  36. 【Ƿ】 Fran Kee says

    Good Tutorial. While admin-ajax.php might need extra enabling,
    there is one file on one level up (WP root level), that imho deserves extra disabling:

    require user

    Unless you truly have a blog where regular readers obtain WP accounts for commenting or such, this is not necessary. Extra-htpasswd-protecting this makes brute-forcing of WP accounts harder…

  37. dylanatstrumble says

    Hi,

    I have tried putting the ErrorDocument 401 default in many places in the main .htaccess file to no avail

    I am running W3 Total Cache and the first chunk of the code relates to that

    I have put it before the W3 code which results in a 500, I have tried putting it after the W3 code # END W3TC just before the # BEGIN WordPress

    I get a 500 there as well

    If only this would work, I would be a happy camper

    Hosted by Go Daddy and creating the protected folder via CPanel

    I am putting off calling Go Daddy for the fourth time. as on this particular issue, they have not been at their best

    Thanks in advance

Bir Cevap Bırakın

Yorum bırakmayı seçtiğiniz için teşekkür ederiz. Lütfen tüm yorumların yorum poli̇ti̇kasi uyarınca denetlendiğini ve e-posta adresinizin yayımlanmayacağını unutmayın. Ad alanında anahtar kelime KULLANMAYIN. Kişisel ve anlamlı bir sohbet edelim.