Skip to content

WordPress.org

English (Canada)

  • Home
  • Blog
  • Themes
  • Plugins
  • Join the Team
  • Style Guide
  • About Us: Our Mission
  • Get WordPress

Plugins

  • My Favourites
  • Beta Testing
  • Developers
Download

Password Protected

By Ben Huson
  • Details
  • Reviews
  • Installation
  • Support
  • Development

Description

A very simple way to quickly password protect your WordPress site with a single password.

This plugin only protects your WordPress generated content. It does not protect images or uploaded files so if you enter and exact URL to in image file it will still be accessible.

Features include:

  • Password protect your WordPress site with a single password.
  • Option to allow access to feeds.
  • Option to allow administrators access without entering password.
  • Works with Mark Jaquith’s Login Logo plugin.
  • Works with the Uber Login Logo plugin.

Please note, this plugin works by setting a cookie to allow access to the site. If you are using a caching plugin or web hosting such as WP Engine that has in-built caching, you will need to configure the caching service to be disabled if the Password Protected cookie is set.

Translations

If you would like to translate this plugin you can easily contribute at the Translating WordPress page. The stable plugin needs to be 95% translated for a language file to be available to download/update via WordPress.

Screenshots

  • Login page perfectly mimicks the WordPress login.
  • Password Protected settings page.

Installation

To install and configure this plugin…

  1. Upload or install the plugin through your WordPress admin.
  2. Activate the plugin via the ‘Plugins’ admin menu.
  3. Configure the password options in the Password Protected settings.

Upgrading

If you are upgrading manually via FTP rather that through the WordPress automatic upgrade link, please de-activate and re-activate the plugin to ensure the plugin upgrades correctly.

FAQ

How can I change the WordPress logo to a different image?

Install and configure the Login Logo plugin by Mark Jaquith or the Uber Login Logo plugin. This will change the logo on your password entry page AND also your admin login page.

How can I enable feeds while the site is password protected?

In the settings, check the ‘Allow Feeds’ checkbox.

Can I prevent administrators having to enter password?

In the settings, check the ‘Allow Administrators’ checkbox.

I cannot preview my changes in the Theme Customizer

You must be an administrator (have the manage_options capability) and in the Password Protected settings, check the ‘Allow Administrators’ checkbox.

How can I log out?

Just add a “password-protected=logout” query to your URL.
eg. http://www.example.com/?password-protected=logout

How can I redirect to a different domain name when logging out?

If passing a redirect URL using ‘redirect_to’ when logging out you need you may need to use the allowed domain names filter to allow redirecting to an external domain.

Where can I report bugs and issues?

Please log issues and bugs on the plugin’s GitHub page.
You can also submit suggested enhancements if you like.

How can I contribute?

If you can, please fork the code and submit a pull request via GitHub. If you’re not comfortable using Git, then please just submit it to the issues link above.

How can I translate this plugin?

If you would like to translate this plugin you can easily contribute at the Translating WordPress page. The stable plugin needs to be 95% translated for a language file to be available to download/update via WordPress.

Reviews

Wicked simple and powerful! ⭐️

Joel October 30, 2019
Awesome slight plugin! Does the job in a simple and elegant way. 👌

Easy and Work well

supakwong October 24, 2019
It's good feature for sharing your content to your client or your team. However, It's will powerful when you add one time login feature with cookie (hour or date). It's will helping your limit your client or somebody knowing password access or share your content without permission.

Simple, Excellent

mqfell September 4, 2019
This is a simple to use and excellent quick plugin to password protect your site. Invaluable for when a site is under construction and you want to limit access to friendlies for feedback.

Simple. Perfect.

Liew Cheon Fong March 24, 2019
What would you do when you want to show an under development website to your client ONLY but DO_NOT want your client to mess up in the WP admin panel? Use this plugin!

This is the one I use

asw March 6, 2019
If I need to password protect a site, this is the plugin I go to. Easy to use. I have never had a problem with it.

Easy to use!

c0ahwvvi January 19, 2019
Best if you do not want to show it to the general public before publishing the site.
Read all 74 reviews

Contributors & Developers

“Password Protected” is open source software. The following people have contributed to this plugin.

Contributors
  • Ben Huson

“Password Protected” has been translated into 16 locales. Thank you to the translators for their contributions.

Translate “Password Protected” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

Unreleased

2.2.5

  • Added password_protected_login_password_title filter to allow customizing the “Password” label on the login form. Props Jeremy Herve.
  • Fix stray “and” in readme. Props Viktor Szépe.
  • Update Portuguese translation. Props Jonathan Hult.
  • Update Russian translation. Props Alexey Chumakov.

2.2.4

  • Check that $_SERVER['REMOTE_ADDR'] is set.

2.2.3

  • Restrict REST-API-access only if password protection is active.
  • Added viewport meta tag to login page.
  • Added password_protected_show_login filter.
  • Cookie name is not editable in the admin so display just for reference.
  • Use default WordPress text domain for “Remember Me” and “Log In” buttons.

2.2.2

  • Change locked Toolbar icon to green.
  • Fix REST option and always allow access to REST API for logged in users.

2.2.1

  • Fixed PHP error when calculating cookie expiration date.

2.2

  • Added Toolbar icon to indicate wether password protection is enabled/disabled.
  • Option to show “Remember me” checkbox. Props Christian Güdel.
  • REST API access disabled if password not entered.
  • Admin option to allow REST API access.
  • More robust checking of password hashes.

2.1

  • Update caching notes for WP Engine and W3 Total Cache plugin.
  • Tested up to WordPress 4.8

2.0.3

  • Declare methods as public or private and use PHP5 constructors.
  • Show user’s IP address beside “Allow IP Addresses” admin setting.
  • Add CHANGELOG.md and README.md

2.0.2

  • Check allowed IP addresses are valid when saving.
  • Only redirect to allowed domain names when logging out.

2.0.1

  • Split logout functionality into separate function.
  • Security fix: Use a more complex password hash for cookie key. Props Marcin Bury, Securitum.

2.0

  • Added password_protected_logout_link shortcode.
  • Load ‘password-protected-login.css’ in theme folder if it exists.
  • Added password_protected_stylesheet_file filter to specify alternate stylesheet location.
  • Added is_user_logged_in(), login_url(), logout_url() and logout_link() methods.
  • Added Basque, Czech, Greek, Lithuanian and Norwegian translations.
  • Better handling of login/out redirects when protection is not active on home page.

1.9

  • Fixed “Allow Users” functionality with is_user_logged_in(). Props PatRaven.
  • Added option for allowed IP addresses which can bypass the password protection.
  • Added ‘password_protected_is_active’ filter.

1.8

  • Support for adding “password-protected-login.php” in theme directory.
  • Allow filtering of the ‘redirect to’ URL via the ‘password_protected_login_redirect_url’ filter.
  • Added ‘password_protected_login_messages’ action to output errors and messages in template.
  • Updated translations.
  • Use current_time( ‘timestamp’ ) instead of time() to take into account site timezone.
  • Check login earlier in the template_redirect action.

1.7.2

  • Fix always allow access to robots.txt.
  • Added ‘password_protected_login_redirect’ filter.
  • Updated translations.

1.7.1

  • Fix login template compatibility for WordPress 3.9

1.7

  • Remove JavaScript that disables admin RSS checkbox.
  • Added ‘password_protected_theme_file’ filter to allow custom login templates.
  • Add option to allow logged in users.

1.6.2

  • Set login page not to index if privacy setting is on.
  • Allow redirection to a different URL when logging out using ‘redirect_to’ query and full URL.

1.6.1

  • Language updates by wp-translations.org (Arabic, Dutch, French, Persian, Russian).

1.6

  • Robots.txt is now always accessible.
  • Added support for Uber Login Logo plugin.

1.5

  • Added note about WP Engine compatibility to readme.txt
  • Requires WordPress 3.1+
  • Settings now have their own page.
  • Fixed an open redirect vulnerability. Props Chris Campbell.

1.4

  • Add option to allow administrators to use the site without logging in.
  • Use DONOTCACHEPAGE to try to prevent some caching issues.
  • Added a contextual help tab for WordPress 3.3+.
  • Updated login screen styling for WordPress 3.5 compatibility.
  • Options are now on the ‘Reading’ settings page in WordPress 3.5

1.3

  • Added checkbox to allow access to feeds when protection is enabled.
  • Prepare for WordPress 3.5 Settings API changes.
  • Added ‘password_protected_before_login_form’ and ‘password_protected_after_login_form’ actions.
  • Added ‘password_protected_process_login’ filter to make it possible to extend login functionality.
  • Now possible to use ‘pre_update_option_password_protected_password’ filter to use password before it is encrypted and saved.
  • Ready for translations.

1.2.2

  • Show login error messages.
  • Escape ‘redirect_to’ attribute. Props A. Alagha.

1.2.1

  • Added a “How to log out?” FAQ.
  • Only disable feeds when protection is active.

1.2

  • Use cookies instead of sessions.

1.1

  • Encrypt passwords in database.

1.0

  • First Release. If you spot any bugs or issues please log them here.

Meta

  • Version: 2.2.5
  • Last updated: 6 months ago
  • Active installations: 200,000+
  • WordPress Version: 4.6 or higher
  • Tested up to: 5.2.4
  • PHP Version: 5.6 or higher
  • Languages:

    Albanian, Catalan, Czech, Dutch, English (Canada), English (UK), English (US), Finnish, French (France), Galician, German, Greek, Japanese, Portuguese (Portugal), Spanish (Spain), Spanish (Venezuela), and Swedish.

    Translate into your language

  • Tags:
    loginpasswordPassword Protectprotect
  • Advanced View

Ratings

See all
  • 5 stars 61
  • 4 stars 3
  • 3 stars 3
  • 2 stars 3
  • 1 star 4

Contributors

  • Ben Huson

Support

Issues resolved in last two months:

0 out of 9

View support forum

Donate

Would you like to support the advancement of this plugin?

Donate to this plugin

  • About
  • Blog
  • Hosting
  • Donate
  • Support
  • Developers
  • Get Involved
  • Showcase
  • Plugins
  • Themes
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
  • @WordPress
  • WordPress

Code is Poetry.

Skip to toolbar
  • About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register