Skip to content

Instantly share code, notes, and snippets.



Created Oct 19, 2018
What would you like to do?
Deny access to wp-admin BUT allow ajax to be used in WordPress
// 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:
<Files admin-ajax.php>
Order allow,deny
Allow from all
Satisfy any
Order Deny,Allow
Deny from all
Allow from X.X.X.X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment