WordPress Error 500 when using IP security on htaccess

When I upgraded to the latest php version (Version 7) across all my WordPress sites (which are hosted using bluehost) I encountered a 500 server error when trying to access the WordPress admin page.

It turns out this is because of my htaccess file.

In my htaccess I had the following lines to stop anyone accessing my WordPress Admin if they were outside of my IP address:

<LIMIT GET>
Order deny,allow
Deny from all
Allow 100.8.8.8
</LIMIT>

This stops anyone assessing myWordPress admin unless they are logging in from my IP address. Apparently this is now updated and to do this you now use the following command:

<LIMIT GET>
Require IP 100.8.8.8
</LIMIT>

I changed this and no more server 500 error!

I’ve just typed this up in case anyone else has the same problem. My new htaccess file sitting in my wordpress/wp-admin folder looks like this:

AuthUserFile /dev/null
 AuthGroupFile /dev/null
 AuthName "Example Access Control"
 AuthType Basic
 Require ip 220.233.28.8 

Leave a Reply

Your email address will not be published. Required fields are marked *