Secure the wp-admin with .htaccess file

Posted on

This post forms part of the video on securing the wp-admin folder on our WPZA Youtube channel.

 

The code below is to be copied into a .htaccess file and then uploaded to the wp-admin folder on your server.

1
2
3
4
5
6
7
8
9
10
11
12
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
Require ip xxx.xxx.xxx.xxx
</IfModule>

# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
Allow from xxx.xxx.xxx.xxx
</IfModule>
Summary
Secure the wp-admin with .htaccess file
Title
Secure the wp-admin with .htaccess file
Description

By just placing a simple file in the "wp-admin" folder you can easily protect the folder from everyone on the internet, while still allowing some users access to the WordPress Admin.

Tags: ,

Leave a Reply