Logo

Restricting Your Entire Website or Specific Pages

Last updated on Apr 10, 2026

ContentGate allows you to restrict access to your entire WordPress website with a single rule. Instead of protecting individual pages or posts, you can require users to be logged in or have specific roles before they can view any content on your site. This is ideal for creating private intranets, member-only sites, or client portals.

Prerequisites

Before setting up whole site restriction, ensure:

ContentGate plugin is installed and activated on your WordPress site

You have administrator access to your WordPress dashboard

You have configured user roles if restricting by role (WordPress has built-in roles: Administrator, Editor, Author, Contributor, Subscriber)

Create a Whole Site Restriction Rule

Follow these steps to restrict your entire website:

Steps

Go to your WordPress admin dashboard and navigate to ContentGate → Content Rules.

Click the Add New button to create a new access rule.

Give your rule a descriptive name by clicking on the icon next to "Untitled Rule" and entering a name like "Whole Site Access" or "Members Only Site".

Click the + Condition button to add your first condition.

From the condition dropdown, select Login Status. Choose whether to restrict access to Logged In or Logged Out users based on your needs.

OR

From the condition dropdown, select Roles. Choose which user roles should have access (Administrator, Editor, Author, Contributor, Subscriber).

Click the + Content button to define what content this rule protects.

From the content dropdown, choose Whole Site from the options.

To restrict specific pages or posts instead of the whole site, click on Pages/Posts and select the desired pages.

Toggle the Status switch to enable the rule (it should turn green).

Click the Save button to activate your whole site restriction.


What Visitors See

When a visitor doesn't meet the access requirements, they see a restriction message instead of your site content. By default, this message displays:

Heading: "Access Required"

Message: "This content is restricted. Sign up to unlock access, or log in if you already have an account."

Action buttons: Log In and Sign Up links

You can customize this message in the ContentGate settings (see Customize the Restriction Message section below).

Testing Your Restriction

To verify your whole site restriction is working correctly:

Steps

Open a private/incognito browser window or log out of your WordPress account.

Navigate to your website's homepage or any page on your site.

Verify that you see the restriction message instead of your site content.

Test the Log In link to ensure it directs users to your login page.

Log in with a test account that meets your rule conditions and confirm you can now access the site.

Notes and Limitations

When a whole site rule is active and the status is enabled, it applies to all pages, posts, and content on your WordPress site

You can have multiple rules, but be mindful of rule conflicts. If multiple rules apply to the whole site with different conditions, the most restrictive rule takes precedence

The restriction message is controlled globally in Settings → General. Individual rules do not have separate restriction messages

Administrators always have access to the WordPress admin dashboard even when the whole site is restricted

Common Issues

Rule not taking effect → Status toggle is off → Enable the rule by toggling the Status switch to green

Wrong users are blocked → Incorrect role selection or login status condition → Review your rule conditions and ensure they match your intended access requirements

Restriction message not showing → Rule not saved or plugin conflict → Click Save after making changes and deactivate other plugins temporarily to test for conflicts