A very simple way to quickly password protect your WordPress site with a single password.
This plugin only protects your WordPress content. It does not protect and images or uploaded files so if you enter and exact URL to in image file it will still be accessible.
- 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 does not currently work with WP Engine hosting due to their page caching implementation.
To install and configure this plugin…
- Upload or install the plugin through your WordPress admin.
- Activate the plugin via the ‘Plugins’ admin menu.
- Configure the password options in the Password Protected settings.
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.
- How can I change the WordPress logo to a different image?
- 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.
- 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?
Works as expected and is clean.
I’m currently using this plugin on a website. It used to work great, but now it’s acting weird. When I go to login (enter the password to see the site) it requires me to enter the password twice. Once I can see the website and click on a link to the new page it asks me to enter the password again. When I enter the password again it takes me back to the home page. I think that it works only if you are logged in as an admin or other used if that checkbox was selected when you set up the password. If I remember correctly you didn’t have to be logged in in the past to view the site. You just had to know the website password. I’m giving it a 3 star because how to use it is a little unclear. I THINK it works well IF you login first to the site. Of course you have to enter the site password before you can get to the wp-admin page.
Useful and easy to use
I was using htaccess to password protect my sites until I found this plugin. Htaccess can be a real pain while this plugin is simply wonderful.
A great little plugin I’ve used to password protect some staging sites. Simple, straightforward, gets the job done. 🙂
it has easy setup and various configuration.
Contributors & Developers
“Password Protected” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- 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
- Check allowed IP addresses are valid when saving.
- Only redirect to allowed domain names when logging out.
- Split logout functionality into separate function.
- Security fix: Use a more complex password hash for cookie key. Props Marcin Bury, Securitum.
- 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.
- 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.
- 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.
- Fix always allow access to robots.txt.
- Added ‘password_protected_login_redirect’ filter.
- Updated translations.
- Fix login template compatibility for WordPress 3.9
- Added ‘password_protected_theme_file’ filter to allow custom login templates.
- It’s now really easy to contribute to the translation of this plugin via our Transifex page.
- Add option to allow logged in users.
- 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.
- Language updates by wp-translations.org (Arabic, Dutch, French, Persian, Russian).
- Robots.txt is now always accessible.
- Added support for Uber Login Logo plugin.
- 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.
- 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
- 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.
- Show login error messages.
- Escape ‘redirect_to’ attribute. Props A. Alagha.
- Added a “How to log out?” FAQ.
- Only disable feeds when protection is active.
- Encrypt passwords in database.
- First Release. If you spot any bugs or issues please log them here.