BBQ Pro provides flexible protection against a wide range of threats. This quick tutorial explains how to set up BBQ Pro so that only select IP addresses are allowed access to your site. So any requests from other IP addresses will be blocked. It’s an effective technique for making any WordPress site private, and it requires only a few minutes to set it up.
Follow these steps
Here are the steps to block all requests except those made from your chosen IP address(es).
- Make a good working backup of your WP database. Just in case something unexpected happens, you can restore original functionality asap. Do not skip this step.
- Visit BBQ Pro Settings and enter your IP address(es) that you want to allow to the plugin setting, “Whitelist IPs”. Make sure your local IP address is included, or you will be blocked from your site (see notes below).
- Visit BBQ Pro Settings and check the box next to the setting, “Custom Rules”. Click the “Save Changes” button.
- Visit the BBQ Pro Firewall ▸ Custom tab. In the “Request URI” box, click “Add Pattern” and enter a forward slash
/. Click the “Save Changes” button.
Done! Here is what we did. First we whitelisted the desired IP address(es). Then we enabled the custom part of the firewall, and added a single forward slash, should look like this:
The result of these changes is that every request will be blocked (because every request includes at least one forward slash
/) unless it is coming from the IP address(es) defined in the whitelist setting.
Now, a couple things to keep in mind.
First, testing. With your own IP address whitelisted, you always will have access to your site. So you won’t be able to test firewall patterns. In this case, you can use a free proxy server or VPN to test things using a different IP address (one that is not whitelisted).
Second, if you make a mistake and get blocked from your own site, you will need to access to the WordPress database. To restore access, simply delete
bbq_options from the Options table. That will restore default options, which will never block you from site access. So now you can log in to WordPress and start over with the default options.