What is WP-Restrict?
WP-Restrict is a WordPress plugin that allows WordPress admins to restrict access to their web site based on IP addresses.
Use WP-Restrict to block all access to your web site, only allowing those in your ‘allowed list’, through the use of .htaccess rules.
WP-Restrict has two management User Interfaces. The main user interface allows you to view all your ‘allowed list’ IP addresses. This interface also allows you to delete IP addresses too. The second interface allows you add new IP addresses.
Both interfaces offer tips and advise if the module finds any problems. For example, if your .htaccess file is not writable, a alert message will be displayed.
You can sort your allowed list by IP address accending or descending.
The plugin has its own activate and deactivate options in the WordPress main plugins page.
How does it work?
It’s really simple.
Once you install the WP-Restrict plugin on your WordPress website, WP-Restrict first creates a new table in your MySQL database with some initial setup settings.
WP-Restrict then carries out some checks to make sure the module can run correctly. If WP-Restrict finds any problems, an alert message will be shown with tips and advise on how to resolve the problem.
Once WP-Restrict is ready to rock and roll, it first checks to see if you have an existing .htaccess file. If one is found, WP-Restrict adds your current IP address with comments so your website is instantly locked down so only you can access it.
When you visit the main user interface, you can manage your allowed IP addresses. You can also add new IP addresses too.
If you add or remove an IP address from the list, WP-Restrict updates your .htaccess file automatically with any comments you provided.
If you deactivate WP-Restrict, WP-Restrict will remove all the allowed list IP addresses from your .htaccess. It also removes its MySQL database tables.