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

Protheme v1.1.2 – Powerful & Flexible Mega WordPress Theme

Download Protheme v1.1.2 | Themeforest Premium Responsive Powerful & Flexible Mega WordPress Theme Protheme v1.1.2 is a Powerful & Flexible MEGA WordPress Theme Designed & developed by a Power Elite Author, Protheme is an awesome, pixel perfect and powerful multi-purpose WordPress theme. It is made simple and functional right out of the box, yet offer […] The post Protheme v1.1.2 – Powerful & Flexible Mega WordPress Theme appeared first on Themes24x7 - Free Premium Blogger and Wordpress Templates. http://www.sushilkumar.ind.in...

Leave a Reply

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

Engineer Sushil Kumar is Stephen Fry proof thanks to caching by WP Super Cache