I am attempting to limit wp-admin access to a specific set of IPs. This works great on the live server, but when viewing locally I am getting a 403 forbidden error.

The site is developed using Vagrant and so I have set the following line in the Vagrantfile

    config.vm.network "private_network", ip: ""

So in /wp-admin I have the following .htaccess file:

order deny,allow
deny from all
allow from

I have attempted many variations and loading multiple IPs with no luck. Any suggestions on how I can gain access when viewing the site locally?

Read more here: How can I allow IP in htaccess from Vagrantfile


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: