How to password protect WordPress Pages or Full site

Password protection can be applied to WordPress pages or posts.There is a built in option in WordPress for this.In this article I will go through steps to password protect a page or post or even full site by a single password.

Using WordPress built in method

1. Create a page or post in WordPress admin panel.on right side of page or post editor  there is a box named “Publish”.You may already familiar with that :)
By default it look like this..
password_protect_wordpress_post_pages_1
2.  Click on Edit in “Visibility” option.You can see there will be 3 options Public(it is default),Password protected and Private.Select Password protected and enter password you want and publish the post or page.
password_protect_wordpress_post_pages_2

Your post or page is password protected now.It will take a lot of time if you have many pages or even you want to password protect your whole site. In this case a plugin may help.

Protect WordPress site with a single password using a plugin

Go to Plugins section of your WordPress admin panel and search a plugin named “Password Protected”.On search you will get this plugin developed by Ben Huson.Install this plugin and activate it.
To enable this plugin  go to Settings => Password Protected and enable it and enter password of your choice and save it as shown below..
password_protect_wordpress_post_pages_3

You are done!

Comments

  1. Ed says

    Thanks, Gyanendra. I can’t believe I never noticed those links. And here I was expecting a major project.

  2. Ian Young says

    Setting the password as suggested above (Visibility, Password Protect)Unfortunately WordPress stores your password somewhere in the browser so you (and anybody else who uses the same computer – especially if used in an internet café) need not enter the password to gain access to the page. I haven’t been able to find any way to suppress this feature that effectively invalidates the security of their password system.

    • says

      Hi Ian,
      Not only WordPress but other online sites like Facebook stores the password once clicked on “Keep me logged in” in browser session.
      So, in internet cafe it is advisable not to use password save option.
      As this particular (Visibility, Password Protect) is concerned. Clear your browser cache after using a site with password protected.

  3. test says

    Greetings! Very helpful advice within this post!
    It is the little changes which will make the greatest changes.
    Thanks a lot for sharing!

  4. Dana says

    The key question for me is whether password-protecting the home page is sufficient protection for a personal/family website? Can people circumvent the home page and go to individual pages directly? If they can bypass the home page, is it so much trouble as not to be a serious vulnerability for a low-interest website (i.e. one that doesn’t contain financially-sensitive information)?

    • says

      Hi Dana,

      For personal/family website password-protecting home page in not sufficient.
      Use some membership plugins for that and keep content private.

      • says

        thanks Gyanendra , u sent great tutorial for widget create . it is very help full for me … can u please send me any tutorial for create wordpress plugin ….. it willl be help full for me .. Thnaks,Manish.

  5. says

    Gyanendra…it was so great to find this link…and to see this element built right into WordPress. Thank you. I do have a question though….and the issue was raised by Ian Young above:

    Question: Once someone has entered the password for a given page is there any way for them to effectively “logout” so just anyone can’t come by and view the page later (as the password is still in the cache)? Of course clearing the cache takes care of this…but I”m looking for a way around this if possible. Any ideas? ;). If you can e-mail me back I would be SOO thankful!!

  6. Sande says

    Could you recommend a plugin for a password protected website with registration, login logout. This seems to be a bigger job than I expected.

    Any help you could give me would be greatly appreciated

    Sande

Leave a Reply

Your email address will not be published. Required fields are marked *