We always recommend add as many protections as you can on scripts like WP, where probably, is in the first position of targeted attack sites. So to add one more protection layer simply Password Protect the wp-admin directory as instructed in the video tutorial below.



This will add a double protection to your wp-admin section.

If after protecting the directory you are not able to load the url and is returning an error like, "404" Error or a "Too many redirects" error. Simply edit the main .htaccess in your WP installation directory and add the following in the first line:

ErrorDocument 401 default


Fixing the Admin Ajax Issue

If you password protect the wp-admin directory, then it will break the Ajax functionality in the front-end. If you have no plugins using Ajax in the frontend then you are safe, but if you are using any plugin with Ajax then add the following code in the .htaccess file in the /wp-admin/ directory:

<Files admin-ajax.php>
Order allow,deny
Allow from all
Satisfy any
</Files>

This should do the trick!
Was this answer helpful? 0 Users Found This Useful (1233 Votes)