WordPress Plugin: Global Post Password

Latest version: 1.5.2– Released 12/06/2019
  • Minor code quality tweaks. No new features.

Description

If you publish many password protected posts (or even if you don’t), you may end up using the same password for each one. With this plugin you can define a global password from your ‘Settings -> Global Post Password’ menu, and switch password protection on or off from the writing screen with just one click. Whenever you change the global password, all password protected posts are automatically updated with the new password.

Now whenever you write or edit a post or page you’ll be able to switch password protection on or off with one click, instead of having to manually type in a password each time. You can change the global password whenever you like from the ‘Settings -> Global Post Password’ menu.

Note that this plugin does not automatically enable password protection on every post. It allows you to use a global password for every post that you choose to password protect.

Please note that this plugin is no longer actively maintained. The global post password setting does not work with the block-based editor in WordPress and it’s unlikely that I’ll add support for it unless someone else volunteers to develop it. It does work with the “Classic” editor and with versions of WordPress prior to 5.0.

Installation

  • Unzip the ZIP file and drop the folder straight into your wp-content/plugins/ directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.
  • Visit the ‘Settings -> Global Post Password’ menu in WordPress and set a global post password.

Now whenever you write or edit a post or page you’ll be able to switch password protection on or off with one click, instead of having to manually type in a password for each post. You can change the password whenever you like.

More Information

Please see the plugin’s page on the WordPress Plugin Directory for more information, including FAQs.

Download

ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment below!

78 thoughts on “WordPress Plugin: Global Post Password

  1. Nice, been setting the PW manually on private blog every time, this helps out a lot! Thanks!!!!!

  2. A short question: are password protected post shown on the main web page or do you have to know the url?

  3. Hello

    This seems like the perfect plugin for me.
    Thanks for making it! :)

  4. Whenever i try to click on links in all the post (which say “To download this design, go to it’s password protected download page and log in”), 404 error is displayed.

    And normally, for the first time a user should see a page where he can enter a global post password, to access all global-post-password protected pages. After entering that password, he should be able to browse all protected pages, until his session expires. I’ve used the “Global-Post-Password” plugin for setting this up. Sir i use wordpress 2.5.1 and cannot change as i use a plugin which works on 2.5.1. please i need help

    Thxs.

  5. Works great, but I have it installed on a page, not a post, and I have comments enabled – but no comment box appears on that page now. Ideas?

  6. Hm… No – really odd. I guess I’ll have to look at the code.

  7. Mike: Off the top of my head, I think if you look at page.php in your template, you might need to add the comment code from single.php to get comments to show up.

  8. We have some problems with people being denied access intermittently when using this plugin with WordPress 2.5.1. The clients being denied access are all running Internet Explorer 7. The page they are trying to access is a Page, not a Post. I don’t know if this issue is related to this plugin or is a problem with WordPress in general.

  9. I’d give my right arm for a password manager that would allow for multiple passwords… either multiple passwords for a individual posts, or just multiple global passwords.

  10. Hello John,

    I’m looking for a plugin that will allow for multiple passwords too. Is that plugin sitting on your computer available for download? Thanks.

  11. This is a great plugin. It would be great in the future to look at a multiple password option for say categories. For example, I have a couple of different passwords based on categories. eg Category ‘Inner Circle’ which certain people can access and category ‘Family’ that uses a different password that only family can access.

    Just thought it was worth putting out there.
    StevieD

  12. Hi:

    Could you let us know if you will be updating this plugin in the future or whether this is it. I love it, but notice its only really compatible up to 2.5. I’m using 2.6.2 at the moment and although it appears to be working, every time I post a post I get an error message.

    Something went wrong – -32300 : transport error – HTTP status code was not 200

    This only started after I installed the plugin. I’m just trying to work out if I should look for an alternative.
    Kind Regards

  13. StevieD: The plugin is compatible with WordPress 2.6 – I just haven’t updated the readme file to say so. I’m not sure what your problem is, I’ve never heard of that before.

    Does the error goes away if you deactivate the plugin?

  14. Hello,

    Thanks for the plugin. I will be using it on a page where the content needs to be restricted due to the inclusion of telephone numbers.

    I have recently had some visitors mention they are able to access this page without being prompted for a password. I would have thought that the browser was storing it in this case, but are there any other issues with repeat login you know of?

    Regards,

    Andrew

  15. Andrew, as far as I’m aware there are no known problems with WordPress post password system. The only way you can view a password-protected post is to have previously entered the password and have the cookie stored in your browser.

    There’s no built-in way to “log out” of password-protected posts once you’ve entered the password (although there are plugins to do this), so there is the possibility that they’ve entered the password in the past and the browser still has the password cookie stored.

    Another point to note is that once you’ve entered the password for one post, you’ll be able to view every post that shares the same password – in the case where you’re using Global Post Password it’ll mean every post on your blog is viewable once you’ve entered the password on one post.

  16. Hey y’all Saturday night. We are looking for a solution to a puzzle requiring us to have individual passwords AND a global password for a group of posts on a WP site. We have already sold the product and assigned the clients the passwords – then later discovered that you can only have one password per post. Our solution would be either a second password per post, or a combination global + individual password per post. Anyone got an idea? We go to press pretty soon and would love to have this worked out…the workarounds are all klunky…thank you…Eric Francis / publisher / Planet Waves, Inc.

  17. AWESOME PLUGIN!
    I need some guidance… I can’t see how/where to apply the password to my pages. I see it in posts. I would like to apply it to my pages dropdown (meaning each page under pages… if that makes sense) or to my bio page. My goal is to have the whole blog password protected… (or not necessary for the links and contact). If anyone can help me I would appreciate it!

  18. Wendy:

    Applying the password for pages is the same as for posts – on the page writing screen click ‘edit’ next to the visibility section above the Publish button, and from there you can switch password protection on.

    If you’re using a WordPress version less than 2.7 then it will work slightly differently but you can still password protect pages.

    John

  19. Wendy:

    I’ve just realised that it sounds like you’re applying the password from the quick edit area. While this can be done with posts I’ve just checked it with pages and for some reason it doesn’t work. I’ll look into it at some point. For now you’ll have to use the above method.

    Thanks for the positive feedback by the way, much appreciated!

    John

  20. Great plugin! One point of interest… You mention that:

    There’s no built-in way to “log out” of password-protected posts once you’ve entered the password (although there are plugins to do this), so there is the possibility that they’ve entered the password in the past and the browser still has the password cookie stored.

    I’ve checked and checked the WP Plugins/Extend section and can’t find a password protected page/post logout plugin. Can you give an idea of what plugin allows logging out? My site now reads me as logged in (presumably for 10 weeks), so I can’t see what the pre-login state is for my site development. Even if it’s something as easy as adding a logout link, I’d be happy to manually add the code to my template if you can give me an idea what the URL should be.

    Thanks for any assistance!

  21. Looks like some code on this WP trac ticket may be useful in creating a logout link, specifically “pluggable.php”…

    http://core.trac.wordpress.org/ticket/2055

    I tried just inserting the code, but it’s based on an older WP version so doesn’t work with 2.7.1. Maybe stronger coders than I can have better luck, or provide some tips.

  22. Frank: Thanks for your feedback. I could have sworn that there was at least one plugin which provided functions for logging out of password protected posts. I must have been imagining things!

    I’ll see about adding log out functionality to Global Post Password in the next few days.

  23. Hi John: Did the WP trac ticket I provided on 3/16 help? Project was on hold for a few weeks, but the customer is ramping it back up. So I’d like to provide them a logout/cookie clear solution if you can help me here. Thanks in advance for your help, and for the awesome plugin!

  24. Great plugin! One point of interest… You mention that:

    There’s no built-in way to “log out” of password-protected posts once you’ve entered the password (although there are plugins to do this), so there is the possibility that they’ve entered the password in the past and the browser still has the password cookie stored.

    I’ve checked and checked the WP Plugins/Extend section and can’t find a password protected page/post logout plugin. Can you give an idea of what plugin allows logging out? My site now reads me as logged in (presumably for 10 weeks), so I can’t see what the pre-login state is for my site development. Even if it’s something as easy as adding a logout link, I’d be happy to manually add the code to my template if you can give me an idea what the URL should be.

    Thanks for any assistance!

  25. Kadın: You’re right, there isn’t actually a plugin available to log out of password protected posts. I wrongly thought that there was. I’m working on a plugin to do exactly this thought and hope to release it when I get some spare time.

    Meanwhile, if you clear your cookies for the domain you’re working on, you will be logged out of password protected posts.

    John.

  26. Yay John!! I’ll be sure to try it out and let you know how it works on my WP install. Thanks again!

  27. Thanks for this great plugin. I wonder if there is any possibility to work with overlapping passwords? The reason is that I want to change the password every month. To avoid problems, there should be a period in which both, the old and the new password, work.

    Thilo

  28. Thilo: Neat idea. I’m planning on updating this plugin soon so that it supports multiple multiple passwords (meaning visitors can enter any one of the passwords in order to access all your protected posts).

    This will allow for things such as giving a certain group of people one password which can be revoked at a later date, while giving another group of people a different password which can be revoked at a different time or kept permanently etc etc.

    In your case, it will mean you can run one password for a while, then run two passwords concurrently for as long as you like, then revoke the original one, thus giving you your overlap period.

    Expect to see this update within the next two weeks or so.

  29. Hi great plugin! And the update sounds cool too.

    However, is there a way to make this plugin (or the update) work for private pages/posts? I have a site with members that can see private pages etc but want to tie down some content (1 or more pages/posts) with an extra password for priviledged members only. this plugin looks right except it doenst work for private pages.

    Any ideas?
    Many thanks in advance!

  30. Gyro: It’s not possible to password protect a private post (or page). The reason is the way posts are stored in the database. A post has a ‘status’ and this can be one of either ‘published’, ‘private’, ‘protected’, ‘draft’, etc. A post can’t be ‘protected’ and ‘private’ at the same time.

  31. Version 1.3 is out which introduces unlimited multiple global post passwords for those that want them. See the Settings->Privacy menu after upgrading for details.

    Note that WordPress 2.7 or later is now required for this plugin to work.

  32. Hi,

    I’d like to edit this message:

    “This post in password protected. To view it please enter your password below:”

    But I can’t find it in any of the phps. Can you tell me where to find?

    Thanks,
    Simeon

  33. Hello John,

    Do you know of a WordPress plugin that allows me to password-protect my posts for multiple users? In this scenario, one user would have a password to give them access to certain posts, while another user has a different password to see a different set of posts. Is this even possible?

    Thanks!

    /Bob

    1. Bob: I’m sure there are plugins out there that accomplish this by using the user roles system in WordPress (so your users would have to be registered users) but I don’t know of one off hand.

  34. Hi, will you be implemeting something to password protect categories? I am looking for this and have found hundereds of people wanting the same thing, if you could do this, it woul dbe great!

    Oh and great plugin by the way. Its great for doing what I want the long way haha.

    Category passwords would be soooo mcu easier.

    Brett

  35. Would you be able to make this into a standalone plugin? Would be very good ;) and useful to many.

    Brett

  36. Brett: I’ll add it to my to-do list but I’m afraid it’ll go right at the bottom and may never reach the top as I have to prioritise work that pays the rent. When I get some free time I’ll certainly think about looking into it.

  37. Hi John,

    Thank you very much for your Global Post Password plugin. I have been searching for one like this that actually works and first time too. So easy to setup that even a relative newbie like me could do it!

    I had originally set up my blog with html pages based on wp-templates but now I think I will migrate these pages into my blog and protect the posts with your plugin.

    Thanks again, Morgan

  38. Thank for the nice PlugIn! But – if I define a passord with more than 20 characters, it doesn´t work!

    Maybe this information is useful for further versions.

    Regards from germany.

  39. Kevin, the maximum length for a post password in WordPress is 20 characters. Nothing much my plugin can do about that I’m afraid! Glad you find the plugin useful.

  40. It’s working with 2.9.1 but if i click on “fast edit” in post section, it’s not working (plugin enabled) ! when plugins is distabled, everytginh is working fine

  41. Hi John,

    I need to localize the msg on password protected post and the “Protected: Title of Post” line, but I’m not able to find the right file.

    Can you help me about this?

    Thanks for your work.

  42. Let me know how much that would cost separately would you please and I’ll see if we can contribute towards to “encourage” you :-)

  43. Version 1.4 is out.

    This update adds full compatibility with Quick Edit, and adds a new feature that allows you to (optionally) append a global post password to your feed URL or post permalinks to automatically show the content of the posts. Passwords are specified using a pass parameter, eg. example.com/feed/?pass=mypassword.

    There are two new checkboxes on the Settings -> Privacy menu for enabling this functionality.

    The first option enables global post passwords to be included in the permalink URL. You have to manually append the password, the password isn’t automatically added to permalinks (obviously, as this would negate having a password). Once the permalink is visited with a password in it, you’re redirected back to the permalink URL without the password appended.

    The second option enables global post passwords to be included in the feed URL. If a correct password is included, then the content of all password protected posts in the feed are shown, rather than the standard “This post is password protected” message.

    If you enable both options, then permalinks in the feed _will_ automatically include the post password, so users can click through and read each post without having to manually enter the password on the blog.

  44. Was just looking for this the other day. Perfect. You made my life much easier. Thank you.

  45. Hy!
    Thank you for all you have done for wordpress users.
    I have a question about Global Password portect:
    How can I change the language from front-page post, “Protected:” from the post title and “There is no excerpt because this is a protected post.” Where shoul I edit ?
    Thanks a lot and sorry for my bad english.

  46. I almost passed on this plug-in because the title and description suggests it only works for POSTS. I needed something that worked for PAGES, and am pleased to discover it does.

    Thanks for the great little plug in. Consider revising it’s name & description.

  47. Cichlid:
    Glad you find it useful :)

    Alex:
    Currently the only way to translate the “Protected:” text is to install a language file for WordPress. You can’t currently change the “There is no excerpt because this is a protected post” text (although this might appear in a future version of my plugin) but the Better Protected Pages plugin sort of allows you to change it by using the Read More feature of WordPress. Give it a try.

    Roman:
    Correct, this does work with pages too. I’ll improve the description.

  48. Hello again.
    I have installed the plugin , i inserted the <!--more--> tag, but nothing happens.
    The plugin doesn`t work, where i`m wrong?
    thanks a lot.

  49. Hi Alex, you’ll need to ask Tim (the guy who built the Better Protected Pages plugin) about that to find out what the problem is. Try posting a comment on his blog.

  50. Cool plugin. It should come with WordPress. You can waste too much time inserting the same password.

  51. Hi John,

    there is a posibility to parse the words and replace them:

    function title_remove_protected_private( $title ) {
    //for the english version of WP
    //http://digwp.com/2010/02/remove-private-or-protected-from-post-titles/
    $title = str_replace( ‘Private:’, ”, $title );
    $title = str_replace( ‘Protected: ‘, ”, $title );

    //for the German version of WP
    //http://forum.wordpress-deutschland.org/konfiguration/42500-geschuetzt-ausblenden.html
    //$title = str_replace( ‘Privat:’, ”, $title );
    //$title = str_replace( ‘Geschützt: ‘, ”, $title );

    return $title;
    }
    add_filter(‘the_title’, ‘title_remove_protected_private’);

    Greetz,
    B.

  52. Hey guys, is the plugin down right now? I seem to be having suddne issues with it tonight, though it’s been fine for months prior.

  53. I am not if it is related.
    I gave password to a friend to view a page on my site. he used the password at his work.
    Now every he visit the page using the same browser he is not asked for password any more.
    He can not clear the tempfiles as the admin has disabled OPTIONS button on the browser.
    Is there anyway to put time limit on the password so it expires after say 1 hour or have a logout button the page?
    thanks

  54. I Love this idea. I just wonder how the new member get this password to use?

  55. I am using the plugin and i think its clever. I wanted to ask if there is a way that the plugin can assign a user ID, maybe a global one, so WordPress could assign the class and I can use it in css.

    reason i ask is this. i use a static page for my home page where a user must enter their password to access the posts. i use navigation (next/previous) links on my posts and the problem i am having is i need to be able to hide these navigation links except when a user is logged in using the global password.

    so, my first thought was to add the following code to css:

    div.navigation-top {display:none;}
    body.logged-in div.navigation-top {display: block;}

    but then i realized that “body.logged-in” is reserved for users that actually log in to wordpress, and i am not requiring them to do so

    do you know of anyway to make this work?

    thank you in advance

  56. Jack: I’ve just updated the plugin. It now adds a class of ‘has-post-password’ to the body classes when the visitor has entered the correct password.

    Hope this helps.

    John

  57. This plugin was last updated on 10th November 2011 and works well up to version 3.2 of WordPress. It’s not been tested with 3.3 but more than likely works.

    From today I’ll no longer be maintaining the plugin as I’ve not used it myself in over a year. If anyone wishes to take over the plugin, feel free to email me.

Comments are closed.