Restrict WordPress Site Access by IP or Logged in Users
Suppose you need to redirect restricted visitors to a specific page or prevent them from accessing all or certain portions of your site. In that case, there is a way to limit access to your WordPress site to only visitors who are logged in or to specific IP addresses. While we do not often recommend using plugins, the Restricted Site Access plugin can be beneficial in limiting access to your WordPress site.
We recommend backing up your WordPress from within the WordPress Dashboard before adding or activating a new plugin. For instructions on how to backup WordPress, please refer to the following article from WordPress: WordPress Backups.
How to install the Restricted Site Access plugin
To install the Restricted Access Plugin on your WordPress site:
- Log in to the WordPress dashboard.
- Navigate to Plugins at the left menu. Then, click Add New.
- Search Restricted Site Access plugin. The screen will automatically show the plugin.
- Click Install Now.
- Once installed, click Activate Plugin.
Configuring the Restricted Site Access plugin
- Inside the WordPress dashboard, go to Plugins, then click on Installed Plugins.
- Navigate to the Restricted Site Access plugin and click Settings.
- In the Site Visibility section, click Restrict site access to visitors who are logged in or allowed by IP address.
- In the Handle Restricted Visitors section, click on the action of your choice.
- In the Unrestricted IP Addresses section, add any IP addresses that are allowed to have unrestricted access to your WordPress site. This should include your developers or website designers.
- Click Add My Current IP Address. This will ensure that you have unrestricted access to your site.
- Click Save Changes.