To secure WordPress login page by IP Address is very easy and you don’t need to use any 3rd party fancy and complicated plugins. When you activate this function through .htaccess file, Unauthorized users and bad bots will get Forbidden message or redirect to 404 page.

Download code from https://www.bnwebdesign.com/wordpress-code-snippet#1539009179039-0361e7fc-5078