Blocking access to WordPress admin

Blocking access to your WordPress admin area is a great way to improve security of your WordPress site. It also helps reduce load from brute force attempts that slow down your website load time. All you need to to enable this feature it paste some text by editing the .htaccess file.

To block access to your WordPress admin portal, you need to add the following to your .htaccess file:

<Files wp-login.php>

# set up rule order
order deny,allow

# default deny
deny from all

# Thexyz Office Ranges

allow from
allow from
allow from
allow from
allow from
allow from

# Add additional IPs for access here


You just need to change the numbers in red to your own IP.

You can find your IP address here.

  • 12 Users Found This Useful
Was this answer helpful?

Related Articles

Enabling two-factor authentication

Thexyz supports various methods for 2FA, setup an additional layer of security with two-factor...

Setup SMS password reset for Webmail

Email password resets for Webmail require SMS verification. If you do not have a phone that can...

Password Help

Here at Thexyz we take your account security very seriously and wanrt to make it easy for you to...

How To Change Your Webmail Password

You can change your email password by logging into webmail: https://webmail.thexyz.comThen at the...

How to enable DKIM Authentication on your domain

Protect your Email with DKIM (Domain Keys Identified Mail). DKIM adds a secure signature to your...