Skip to content

Instantly share code, notes, and snippets.

@robin-scott
Created October 19, 2018 08:37

Revisions

  1. robin-scott revised this gist Oct 19, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions htaccess
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    // Add this to an .htaccess file at the top of the wp-admin directory to lock down this section of your site to only trusted IP addresses - BUT still allow ajax access
    // By Robin Scott of Silicon Dales - details here: https://silicondales.com/tutorials/wordpress/lock-out-all-traffic-except-your-ip-from-login-admin/
    Order Deny,Allow
    Deny from all
    Allow from X.X.X.X
    <Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any
    </Files>

    Order Deny,Allow
    Deny from all
    Allow from X.X.X.X
  2. robin-scott created this gist Oct 19, 2018.
    11 changes: 11 additions & 0 deletions htaccess
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    // Add this to an .htaccess file at the top of the wp-admin directory to lock down this section of your site to only trusted IP addresses - BUT still allow ajax access
    // By Robin Scott of Silicon Dales - details here: https://silicondales.com/tutorials/wordpress/lock-out-all-traffic-except-your-ip-from-login-admin/
    Order Deny,Allow
    Deny from all
    Allow from X.X.X.X
    <Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any
    </Files>