Home / Woo-Commerce / How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?

 

Copy and paste the code in .htaccess file.

ErrorDocument 401 /path-to-your-site/index.php?error=404
ErrorDocument 403 /path-to-your-site/index.php?error=404

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^IP Address One$
RewriteCond %{REMOTE_ADDR} !^IP Address Two$
RewriteCond %{REMOTE_ADDR} !^IP Address Three$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>

About Sushil_kumar

Check Also

wordpress-4-7

WordPress 4.7 version released with some unique feature

WordPress 4.7 version Release Candidate The release candidate for WordPress 4.7 version is now available. RC …

Leave a Reply

Your email address will not be published. Required fields are marked *

0

January 24, 2017

Clear all