12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Sep 7, 2018

How to Password Protect entire WordPress site

Sridhar Katakam

Updated on September 10, 2018

In the Oxygen Facebook group a user asks:

I'm designing a members-only site for clients who purchased my book.

Is there a nice way to present a "password" field?

I don't need a full membership plugin, since there's no way (currently) to purchase the membership access. You have to have the book (the password is a word inside a page in the book).

The default password-protect from the wp core is pretty ugly (maybe i can design it with css anyway).

In this members-only tutorial, I show Password Protected plugin can be used for this followed by using a hook in the plugin to add some intro text and finally adding custom CSS to the WordPress login page so we can style the text.

Note: This is not a Oxygen specific tutorial and works with any WordPress site.

Step 1

Install and activate Password Protected, Login Logo and Code Snippets plugins.

Step 2

Go to Settings > Password Protected and tick Enabled for "Password Protected Status".

Under "Protected Permissions", you may want to tick "Allow Administrators" so that admins can view the frontend without having to enter the password.

Set your desired password twice in the "New Password" section.

Optionally tick "Allow Remember me".

Click on Save Changes.

Step 3

Add a new Code Snippet titled say, "Add intro text before the login form and styling on password protected page" having the following code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.