Submit a enquiry

Back to all posts

Restrict WordPress login to IP address

by Tomas Docherty Developer

This is a great way to keep you WordPress site secure and ensure no-one can login unless from specific IP addresses (i.e. your home, office etc).

Add this to your .htaccess file in the root directory:

<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from xx.xx.xx.xx

Simply replace the x’s with your IP address/es.

If you need help with your WordPress security please get in touch with Gooey via 0161 237 3114 or email