Apache password protection for wordpress admin folder

AuthUserFile /path/to/.htpasswd
AuthType basic
AuthName "Restricted Access"
require valid-user
<Files admin-ajax.php>
 Order allow,deny
 Allow from all
 Satisfy any
</Files>
<Files admin-post.php>
 Order allow,deny
 Allow from all
 Satisfy any
</Files>
<Files "\.(css|gif|png|js)$">
 Order allow,deny
 Allow from all
 Satisfy any
</Files>

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.