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?

[tblock anim=”swing” tcuscolor=”#7700ff” title=”How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?” tag=”h2″/]

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

UserPro v4.9.15 – User Profiles with Social Login

Download Free UserPro WordPress Plugin 4.9.15 WordPress Plugin Nulled – CodeCanyon |  UserPro v4.9.15 – User Profiles with Social Login version 4.9.15 (Updated on 11th September 2017) offers an out standing and beautiful login, front-end profiles and great registration for WordPress. UserPro is also packed with lots of  many premium features and easy to control options. It is undoubtedly […] Do you need any custome Development Click here and fill your requirement...

Leave a Reply

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