Restrict WordPress Site Access by IP or Logged in Users | HostGator Support
  1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Restrict WordPress Site Access by IP or Logged in Users

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:

  1. Log in to the WordPress dashboard.
  2. Navigate to Plugins at the left menu. Then, click Add New.

    WP add new plugin

  3. Search Restricted Site Access plugin. The screen will automatically show the plugin.

    WP plugin search

  4. Click Install Now.

    Install plugin

  5. Once installed, click Activate Plugin.

    Activate plugin

Configuring the Restricted Site Access plugin 

  1. Inside the WordPress dashboard, go to Plugins, then click on Installed Plugins.

    Installed plugins

  2. Navigate to the Restricted Site Access plugin and click Settings.

    plugin settings

  3. In the Site Visibility section, click Restrict site access to visitors who are logged in or allowed by IP address.

    Site Visibility

  4. In the Handle Restricted Visitors section, click on the action of your choice.

    Handle restriction

  5. 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.

    Unrestrict option

  6. Click Add My Current IP Address.  This will ensure that you have unrestricted access to your site.
  7. Click Save Changes.