Securing WordPress wp-login.php
WordPress's login file, wp-login.php, is a frequent target of attacks. Hackers automatically try thousands of passwords on it. You can secure it so that only your IP address can access it.
How to set it up
Add this to the .htaccess file in the public_html folder:
<Files wp-login.php> Require ip 192.0.2.10 </Files>
Replace 192.0.2.10 with your own IP address. You can find it on whatsmyip.org, for example.
See also: I can't log in to WordPress: what now? and Extra WordPress security: permissions, wp-config and .htaccess.
See also in the DirectAdmin manual: Password-protected directories and My website has been hacked: step-by-step plan.
Detailed explanation with screenshots: Showing and editing hidden files such as .htaccess in the DirectAdmin manual.
Want to learn more? Take the free WordPress course, lesson 7.3 Logging in: passwords, two-factor authentication and brute force.
