Categories
Fixing Stuff Samuel

limiting wordpress logins via IP server wide in WHM

This post is just for my own future use so please excuse the lack of polish. The goal here was to lock down all the wordpress sites on our server for 2 main reaonns:

1.) Our Server was working way harder than it needed to, and this was in a great deal due to the fact that several popular wordpress sites we have on the serve were constantly getting bombarded with bad login requests
2.) This greatly increases the security of your wp-admin section

How to do this:

-login to WHM/cpanel
-navigate to Service Configuration > Apache Configuration > Post VirtualHost Include
-Select “All Versions” of apache
-Add the following code snippet:


# Restrict wp-login

Order deny,allow
Deny from all
Allow from 0.0.0.0.0.0 (replace with your IP address)
ErrorDocument 403 "Not allowed from your IP."

Hit update to save