Blocking access to WordPress admin

Blocking access to your WordPress admin area is a great way to improve the security of your WordPress site. It also helps reduce the 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 10.10.4.0/23
allow from 10.20.4.0/22
allow from 10.20.7.0/24
allow from 10.30.4.0/2
allow from 10.30.2.0/24
allow from 10.30.104.0/24

# Add additional IPs for access here

</Files>

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

You can find your IP address here.

To further secure your WordPress site, take a look at the complete list of .htaccess snippets to improve WordPress security.

  • 123 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

Enabling two-factor authentication

Setting up 2-factor authentication (or 2FA) provides a second line of defense. If your password...

Password Help

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

Logging in with social media profiles

You can login to your account at Thexyz with Twitter, Facebook and Google. Before adding these...

Help, my website was hacked

Firstly don't panic, although it is a traumatic experience for any site owner when malicious code...

How to add Yubikey Authentication to Thexyz

To add Yubikey authentication to your account login you must first purchase a Yubikey and then...