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 Erişimini IP Adresine Göre Kısıtlama

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.

Güvenlik nedeniyle WordPress yönetici alanınıza erişimi kısıtlamak mı istiyorsunuz?

Küçük bir ekibiniz varsa, erişimi yalnızca ekip üyeleri tarafından kullanılan IP adresleriyle kısıtlamak iyi bir çözümdür.

Bu makalede, WordPress yönetici erişimini IP adresine göre nasıl kısıtlayacağınızı adım adım göstereceğiz.

How to Restrict WordPress Admin Access by IP Address

WordPress Yönetici Erişimini IP Adresine Göre Neden Kısıtlayalım?

Eğer bir WordPress web sitesi işletiyorsanız, web sitenizin güvenliğini ciddiye almanız gerekir. WordPress çekirdek yazılımı çok güvenli olsa da, kendinizi bilgisayar korsanlarından ve kaba kuvvet saldırılarından korumak için yapabileceğiniz daha fazla şey var.

Bilgisayar korsanları web sitenizi çökertebilir, gelirinize ve itibarınıza zarar verebilir. Veri çalabilir, hatta web sitenizin ziyaretçilerine kötü amaçlı yazılım dağıtabilir ve alan adınızın Google ve diğerleri tarafından kara listeye alınmasına neden olabilirler.

Bilgisayar korsanlarını engellemenin ve WordPress güvenliğini artırmanın akıllıca bir yolu, WordPress yönetici alanınızı yetkisiz erişime karşı korumaktır.

Yönetici alanına yalnızca sizin veya birkaç güvenilir kullanıcının erişmesi gerekiyorsa, bunu yapmanın iyi bir yolu wp-admin ve WordPress giriş sayfasına erişimi ekibinizin IP adresleriyle sınırlamaktır.

Her ekip üyesi, her konum için belirli bir IP adresi kullanarak WordPress sitenize bağlanacaktır. Diğer tüm IP adreslerine erişimi engellerseniz, bir bilgisayar korsanı kullanıcı adınızı ve şifrenizi öğrenmiş olsa bile web sitenize erişemez.

Bunun yerine, hata mesajını göreceklerdir: ‘Yasak. Bu kaynağa erişim izniniz yok.

WordPress yönetici erişimini IP adresine göre nasıl kısıtlayacağımıza bir göz atalım.

WordPress Yönetici Erişimini IP Adresine Göre Kısıtlama

Yapmanız gereken ilk şey, WordPress web sitenizde oturum açması gereken herkes tarafından kullanılan IP adreslerinin bir listesini yapmaktır. Birisi birkaç konumdan çalışıyorsa, her biri için IP adresini toplamanız gerekecektir.

SupportAlly gibi bir siteyi ziyaret ederek IP adreslerini öğrenebilirler.

Listenizi yaptıktan sonra, web sitenizdeki bir dosyayı düzenlemeniz gerekecektir. Bir FTP istemcisi veya barındırma sağlayıcınızın dosya yöneticisi uygulamasını kullanmanız gerekecektir. Daha önce FTP kullanmadıysanız, WordPress’e dosya yüklemek için FTP’nin nasıl kullanılacağına ilişkin kılavuzumuza göz atmak isteyebilirsiniz.

Web sitenizin /wp-admin/ klasörüne gitmek için yazılımı kullanmanız gerekecektir. Oraya gittiğinizde .htaccess dosyasını aramalısınız. Bu gizli bir dosyadır, bu nedenle göremiyorsanız, yazılımınızda gizli dosyaları göster seçeneğini etkinleştirmeniz gerekebilir.

Navigate to wp-admin and Locate .htaccess

Bu dosya klasörde mevcut değilse, yeni bir dosya oluşturmalı ve /wp-admin/ klasörünüze .htaccess adıyla kaydetmelisiniz.

Uyarı: Kök .htaccess dosyanızı düzenlemeyin, aksi takdirde ziyaretçileri web sitenizin ön ucundan kilitlemiş olursunuz! wp-admin/.htaccess dosyasını düzenlediğinizden emin olun.

Öncelikle dosyanın bir kopyasını yedek olarak bilgisayarınıza indirmelisiniz. Bunu yaptıktan sonra, .htaccess dosyasını düzenlemeniz ve aşağıdaki kodu yapıştırmanız gerekecektir:

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "WordPress Admin Access Control"
AuthType Basic
<LIMIT GET>
order deny,allow
deny from all
# whitelist Syed's IP address
allow from xx.xx.xx.xxx
# whitelist David's IP address
allow from xx.xx.xx.xxx
# whitelist Amanda's IP address
allow from xx.xx.xx.xxx
# whitelist Muhammad's IP address
allow from xx.xx.xx.xxx
# whitelist Work IP address
allow from xx.xx.xx.xxx
</LIMIT>

Devam edin ve dosyayı kendi ekip üyelerinizin adlarıyla eşleşecek şekilde düzenleyin ve ardından xx.xx.xx.xxx yazan yerleri değiştirmek için daha önce topladığınız IP adreslerini yapıştırın.

Dosyayı kaydettiğinizde, yalnızca bu IP adresleri WordPress yöneticisine erişebilecektir.

IP adresiniz değişirse veya web sitenize yeni bir konumdan erişmeye çalışırsanız, WordPress yönetici alanınızdan kilitleneceğinizi unutmayın. Yeni IP adresinizi /wp-admin/.htaccess dosyasına eklemeniz gerekecektir.

Umarız bu eğitim WordPress yönetici erişimini IP adresine göre nasıl kısıtlayacağınızı öğrenmenize yardımcı olmuştur. Ayrıca web siteniz için nasıl ücretsiz SSL sertifikası alacağınıza dair WordPress eğitimimize veya sitenizi büyütmek için olmazsa olmaz eklentiler listemize 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

43 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

      You would need to have your FTP or file manager show hidden files if you do not see it.

      Yönetici

    • WPBeginner Support says

      There are multiple methods to find your IP, one of the simple ones would be to use a site like supportally.com

      Yönetici

  2. Rostyslav says

    After this line, you must put a condition for permission to allow php files to prevent conflicts:

    allow from all

  3. Solace says

    I tried the .htaccess password protection method.

    It works, but I tried it on a site with Woocommerce, but then my customers weren’t able to log in.

    Just saying that because it seems no one has mentioned that it doesn’t work with sites that need customers to log in !

  4. Miguel says

    Hello, thank you for the tutorial. Unfortunately, I have not been able to make this .htaccess file to work correctly because it is denying access to the only IP address I included, my own… I am certain I copied your code exactly and I typed my IP correctly. The .htaccess file was saved under: /wp-admin/.htaccess

    Am I missing something? Thanks

  5. Emaan Ali says

    Hi Guys,

    I have blocked the wp-admin with .htaccess as mentioned in this article. But i am having one problem that my admin-ajax file is also being restricted on public site.

    My wordpress theme uses much of admin ajax functionality and that I have put the IP limitation access on wp-admin folder so its not accessible for all IP’s.

    Does anyone find the solution for this ? If so please share .

    Thanks in advance
    Emaan

  6. Len says

    Hi, This seems really a helpful one. Maybe you could help me. Instead of whitelisting an IP can we allow access for specific countries in .htaccess file? Hoping you can help me. Thank you very much.

  7. Scotty says

    Hi, This does work. I checked and am “forbidden” to login on any other computer. I can’t even see the login panel. However, I am still getting about 24 failed log in attempts per day from all different IP addresses. Any ideas how there getting around this? It’s some kind of brute force attack? Thanks, Scott.

  8. Sehrish says

    And how to allow access to only wordpress adminitrator ?What code i will write without any ip ? I just need to know a generic function that get admin related info.Becuse i have to restrict my plugin uploads from other user.And Whoever using this plugin i have to get its admin info to restrict contents from other and allow only to admin of website.

  9. Kim says

    I tried this (after previously successfully password protecting my wp-admin directory and fixing the redirect error per your other article), but then I get a pop-up asking for a user name and password for the “WordPress Admin Access Control”. What user name and password am I supposed to be using for this new pop-up? Neither the wordpress admin logon nor the wp-admin directory logon work for it.
    Thanks!

    • Kim says

      Oh, I believe I figured out the problem; seems to work as long as I make sure to have the added code at the very beginning.

  10. Jordyn says

    I have a big problem :(

    I did what you said about creating the .htaccess and putting in the code snippet. It didn’t work so I deleted the .htaccess file and now I can’t login to my dashboard! It’s just a white screen :( Please help!!!

    Thanks

      • Jordyn says

        All I did was create the file in my wp-admin folder and when it didn’t work I deleted it from the wp-admin folder. I’m not sure what happened but, after a crazy rabbit trail and many shots in the dark, I was able to correct the problem by adding to the top of my login.php file. I still don’t know what went wrong or why what I did fixed it…. but at least its fixed. I may try this again when I’m feeling brave.

  11. Raheem Khan says

    Hi WPB, I don’t think it will be working in Pakistan because every time we reset or turn of our DSL modem so the IP address automatically changes. if any other tip please reply me.
    Thanks

  12. andrew says

    hi, how to make .htaccess with dynamic ip (non static ip)
    my ip is always change xxx.xxx.xxx.12 xxx.xxx.xxx.453 xxx.xxx.xxx.076

    please help…

      • Joe says

        You can harden your wordpress install via .htaccess whitelisting even if you have a dynamic IP address. You can whitelist a range of IP addresses using a /24 or /16 range. While this allows more access than if you always knew the IP you wanted to allow, it still prohibits access from almost the entire internet.

        Just add /24 to the end of the allow from line to allow the whole class C subnet (256 IPs), or add /16 to allow the whole 65,536 range. i.e.

        allow from xxx.xxx.xxx.0/24

        will allow access to IP addresses from xxx.xxx.xxx.0 – xxx.xxx.xxx.255. and

        allow from xxx.xxx.0.0/16

        will allow access from IP addresses from xxx.xxx.0.0 – xxx.xxx.255.255

  13. Kyle says

    You say not to do the root site’s .htaccess file…why is that? Because you just want to limit access to the /wp-admin folder?

    So…if I wanted to have a WordPress site hosted externally but used as an internal company resource so that only people using IPs of our company could access it…if I edited the root folder’s .htaccess folder to only allow IPs from our domain…that would work the same way your /wp-admin fix is, but for the entire site, correct?

    • Editorial Staff says

      Yes Kyle, the reason why we said do not put this code in the root file because then it will limit your site access to only these IP as well. But if you are trying to make a site just for your company’s staff can access it only from work, then you would want to put the .htaccess file in the root folder.

      Yönetici

    • Alim Bolar says

      Can I limit access based on other criterias? Like I need only my laptop to access a particular folder.. I could access it from anywhere so it would be difficult to specify an IP as my internet access would be based on DHCP. Is there a unique identifier for every machine or something like that that can be used as a criteria?

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.