Created
August 31, 2014 14:54
-
-
Save gregrickaby/7929e7d53b082ffe313f to your computer and use it in GitHub Desktop.
Lock down WordPress Dashboard login with .htaccess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# APACHE .HTACCESS | |
# This will deny all traffic (except yours) to /wp-admin (including wp-login.php) | |
# It will also return a 403 forbidden error. | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ | |
RewriteCond %{REMOTE_ADDR} !^111\.222\.333\.444$ | |
RewriteRule ^(.*)$ - [R=403,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment