{"id":583,"date":"2016-03-31T05:48:50","date_gmt":"2016-03-31T05:48:50","guid":{"rendered":"https:\/\/www.sushilkumar.ind.in\/blog\/?p=583"},"modified":"2016-03-31T05:48:50","modified_gmt":"2016-03-31T05:48:50","slug":"how-to-secure-your-wordpress-admin-to-restrict-access-to-specific-ip-address-with-htaccess","status":"publish","type":"post","link":"https:\/\/www.sushilkumar.ind.in\/blog\/wordpress\/how-to-secure-your-wordpress-admin-to-restrict-access-to-specific-ip-address-with-htaccess\/","title":{"rendered":"How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?"},"content":{"rendered":"[tblock anim=&#8221;swing&#8221; tcuscolor=&#8221;#7700ff&#8221; title=&#8221;How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?&#8221; tag=&#8221;h2&#8243;\/]\n<div class=\"clear\"><\/div><div style=\"margin-top:10px; margin-bottom:10px;\" class=\"divider divider-normal\"><\/div>\n<p><strong>Copy and paste the code in .htaccess file.<\/strong><\/p>\n<pre>ErrorDocument 401 \/path-to-your-site\/index.php?error=404\r\nErrorDocument 403 \/path-to-your-site\/index.php?error=404\r\n\r\n&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine on\r\nRewriteCond %{REQUEST_URI} ^(.*)?wp-login\\.php(.*)$ [OR]\r\nRewriteCond %{REQUEST_URI} ^(.*)?wp-admin$\r\nRewriteCond %{REMOTE_ADDR} !^IP Address One$\r\nRewriteCond %{REMOTE_ADDR} !^IP Address Two$\r\nRewriteCond %{REMOTE_ADDR} !^IP Address Three$\r\nRewriteRule ^(.*)$ - [R=403,L]\r\n&lt;\/IfModule&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[tblock anim=&#8221;swing&#8221; tcuscolor=&#8221;#7700ff&#8221; title=&#8221;How to Secure Your WordPress Admin to Restrict Access to Specific IP Address with HTACCESS?&#8221; tag=&#8221;h2&#8243;\/] 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 &lt;IfModule mod_rewrite.c&gt; 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[54,13],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","","category-woo-commerce","category-wordpress"],"jetpack_publicize_connections":[],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p99pkJ-9p","_links":{"self":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/posts\/583"}],"collection":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":0,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sushilkumar.ind.in\/blog\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}