To secure your admin area from hackers, you should only allow access to your admin directory from selected IP addresses. You can create a .htaccess file in the directory where you want to restrict access to specific IP addresses.
For example, if you have a WordPress blog installed in your main directory and you log in via example.com/wp-admin, create an htaccess file at /wp-admin/.htaccess and add the following code. Don't forget to replace the allowed IP address with your own IP address.
order deny, allow
deny from all
allow from YOUR-IP-ADDRESS-HEREReplace the YOUR-IP-ADDRESS-HERE text with your IP address.
You can test this by accessing the wp-admin directory from another IP address that is not listed in your htaccess file.
Add Comment