Go to your Online Web Host Cpanel account and open site directory looking a file in default WordPress installation here is the directory that have to be protected and that is wp-admin mostly because it contains sensitive functionality. To secure this directory create a new blank .htaccess file in wp-admin directory. Next open the file and copy and paste the following code
- If you are not able to work with .htaccess file you may want to check with your web host and most setup these days is pretty easy to password protect directories for your server control panel.
- You can always add other IP addresses and allow multiple access like so. Simply copy and replicate the line and replace the IP address with other IP address such as mobile and other Internet access for which you like to give access in admin area.