Title: Master Post Password
Author: Scott Reilly
Published: <strong>26 Samhain, 2013</strong>
Last modified: 25 Aibreán, 2025

---

Search plugins

![](https://ps.w.org/master-post-password/assets/banner-772x250.png?rev=811069)

![](https://ps.w.org/master-post-password/assets/icon-256x256.png?rev=972969)

# Master Post Password

 By [Scott Reilly](https://profiles.wordpress.org/coffee2code/)

[Download](https://downloads.wordpress.org/plugin/master-post-password.1.4.zip)

 * [Details](https://ga.wordpress.org/plugins/master-post-password/#description)
 * [Reviews](https://ga.wordpress.org/plugins/master-post-password/#reviews)
 *  [Installation](https://ga.wordpress.org/plugins/master-post-password/#installation)
 * [Development](https://ga.wordpress.org/plugins/master-post-password/#developers)

 [Support](https://wordpress.org/support/plugin/master-post-password/)

## Description

Define a master post password that works for all passworded posts, while permitting
the original post passwords to also work.

Once the master post password has been provided by a visitor for any passworded 
post on the site, it applies to unlock all other passworded posts (without needing
to provide the master post password again for each such post) until the site’s cookies
expire in the browser.

There are two means by which the master post password can be defined:

a.) As a constant, `C2C_MASTER_POST_PASSWORD`. This is typically done in wp-config.
php like so:

    ```
    define( 'C2C_MASTER_POST_PASSWORD', 'your_master_post_password' );
    ```

b.) Via the settings field labeled “Master Post Password” found on the `Settings`-
> `Reading` admin page.

If the constant is defined, it takes precedence and the settings field is _NOT_ 
displayed.

Links: [Plugin Homepage](https://coffee2code.com/wp-plugins/master-post-password/)
| [Plugin Directory Page](https://wordpress.org/plugins/master-post-password/) |
[GitHub](https://github.com/coffee2code/master-post-password/) | [Author Homepage](https://coffee2code.com)

## Screenshots

 * [[
 * A screenshot of the `Settings` -> `Reading` admin page showing the “Master Post
   Password” input field.

## Installation

 1. Install via the built-in WordPress plugin installer. Or install the plugin code
    inside the plugins directory for your site (typically `/wp-content/plugins/`).
 2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
 3. Set a master post password
     a. via the ‘Settings’ -> ‘Reading’ admin menu b. (optional;
    advanced) Set the master post password via `C2C_MASTER_POST_PASSWORD` constant.
    This also serves to prevent the admin option from being displayed.

## FAQ

### Does this work for *all* passworded posts, regardless of their explicitly set post password?

Yes.

### Does the explicitly set post password for a given post still work?

Yes. A visitor can supply either the post’s password or the master post password
to access the content.

### Will this require a password for posts that didn’t already have a post password configured?

No. It only affects posts that already have a post password.

### Does this remove or change the password for passworded posts to the master post password?

No. Any explicitly set post password remains unchanged and functional. The master
post password is saved separately from posts.

### If I have multiple password protected posts listed, do I need to provide the master post password for each one to view them all (a bit redundant since I obviously know the master post password and it applies to all of them)?

No, if you provide the master post password for one post, it’ll automatically be
applied to all passworded posts until the site’s browser cookies expire.

### What happens if I change the master post password?

Other than the obvious (the master post password has a new value), all existing 
users of the old master post password will expire when a browser attempts to view
a passworded post. The visitor will have to provide the original post password(s)
or the new master post password. If a visitor accessed a passworded post using the
post’s explicitly set post password, then they will not be affected by a master 
post password change.

### Is the master post password stored securely?

No. As is the case for post passwords in WordPress, the master post password is 
stored in the database as plaintext. That is unless the master post password is 
set by a constant, in which case it is never stored in the database and only in 
the given .php file (typically `wp-config.php`, where other site passwords are defined).

The master post password _is_ shown using a password input field, so it is not visibly
exposed to those who may be looking over your should or if you’re doing a screenshare
while navigating the admin. But you are encouraged to use the constant if you wish
to keep the password as private and secure as possible.

### Why can’t I see the setting on the “Reading Settings” admin page?

Are you logged in as an administrative user who can access the “Settings” -> “Reading”
admin page? Is the plugin installed and activated?

Assuming those are true, have you set a master post password via the `C2C_MASTER_POST_PASSWORD`
constant? If so, the admin setting will not be displayed.

### Does this plugin have unit tests?

Yes. The tests are not packaged in the release .zip file or included in plugins.
svn.wordpress.org, but can be found in the [plugin’s GitHub repository](https://github.com/coffee2code/master-post-password/).

### Is this plugin localizable?

Yes.

### Is this plugin GDPR-compliant?

Yes. This plugin does not collect, store, or disseminate any information from any
users or site visitors.

## Reviews

![](https://secure.gravatar.com/avatar/8e84d9dcefeb62a8607d1149588130f46a6b780d90d8bf665654ac928de9f470?
s=60&d=retro&r=g)

### 󠀁[Excellent and simple](https://wordpress.org/support/topic/excellent-and-simple-43/)󠁿

 [](https://profiles.wordpress.org/minilobo/) 9 Lúnasa, 2021

It does what it says and does it well. Thanks!

![](https://secure.gravatar.com/avatar/0c264a65aec73ca96e23bf19c5b305643af89b540adfa346b3f54cedb1503619?
s=60&d=retro&r=g)

### 󠀁[Simple and works well.](https://wordpress.org/support/topic/simple-and-works-well-41/)󠁿

 [Pete](https://profiles.wordpress.org/perthmetro/) 27 Eanáir, 2021

Very useful for securing all my password protected posts in one hit.

![](https://secure.gravatar.com/avatar/20192579f5617c00607ba616bc4e23a81cc7644c882e19fee9abcab00b9bb6a6?
s=60&d=retro&r=g)

### 󠀁[Simple and efficient](https://wordpress.org/support/topic/simple-and-efficient-274/)󠁿

 [](https://profiles.wordpress.org/minutepapillon/) 23 Meán an tSamhraidh, 2020

With this little plugin I could turn my WooCommerce shop into a private shop … without
the very expensive Woo password plugin. Thanks !

![](https://secure.gravatar.com/avatar/532445e3030e140008471729805f811be6198abb59c6a62e10fbb20af9f54225?
s=60&d=retro&r=g)

### 󠀁[Works really well](https://wordpress.org/support/topic/works-really-well-89/)󠁿

 [scentedtreeju](https://profiles.wordpress.org/scentedtreeju/) 20 Aibreán, 2017

I had problems with massive-protected-posts with different passwords. But this plugin
saved me. Thank you for wonderful plugin.

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/master-post-password/reviews/)

## Contributors & Developers

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

Contributors

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

“Master Post Password” has been translated into 1 locale. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/master-post-password/contributors)
for their contributions.

[Translate “Master Post Password” into your language.](https://translate.wordpress.org/projects/wp-plugins/master-post-password)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/master-post-password/),
check out the [SVN repository](https://plugins.svn.wordpress.org/master-post-password/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/master-post-password/)
by [RSS](https://plugins.trac.wordpress.org/log/master-post-password/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.4 (2025-04-23)

 * New: Hide password via password input field, but allow its display to be toggled
 * Change: Add translation context for label of setting field
 * Change: Discontinue unnecessary explicit loading of textdomain
 * Change: Specify sanitization callback for registered setting
 * Change: Ignore unnecessary PHPCS complaint
 * Change: Note compatibility through WP 6.8+
 * Change: Note compatibility through PHP 8.3+
 * Unit tests:
    - Change: Explicitly define return type for overridden methods
    - Change: Explicitly define class variable to prevent PHP deprecation notice
 * New: Add some potential TODO items

#### 1.3.8 (2025-01-12)

 * Change: Prevent translations from containing unintended markup
 * Change: Note compatibility through WP 6.7+
 * Change: Update copyright date (2025)
 * New: Add `.gitignore` file
 * Change: Remove development and testing-related files from release packaging
 * Change: Tweak formatting in `README.md`
 * Unit tests:
    - Hardening: Prevent direct web access to `bootstrap.php`
    - Allow tests to run against current versions of WordPress
    - New: Add `composer.json` for PHPUnit Polyfill dependency
    - Change: In bootstrap, store path to plugin directory in a constant
    - Change: Prevent PHP warnings due to missing core-related generated files
 * Change: Add more potential TODO items and reformat some existing entries

#### 1.3.7 (2023-08-05)

 * Change: Note compatibility through WP 6.3+
 * Change: Update copyright date (2023)

_Full changelog is available in [CHANGELOG.md](https://github.com/coffee2code/master-post-password/blob/master/CHANGELOG.md)._

## Meta

 *  Version **1.4**
 *  Last updated **12 m(h)í ago**
 *  Active installations **50+**
 *  WordPress version ** 4.7 or higher **
 *  Tested up to **6.8.5**
 *  Languages
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/master-post-password/) and
   [English (US)](https://wordpress.org/plugins/master-post-password/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/master-post-password)
 * Tags
 * [password](https://ga.wordpress.org/plugins/tags/password/)[post](https://ga.wordpress.org/plugins/tags/post/)
   [post password](https://ga.wordpress.org/plugins/tags/post-password/)[privacy](https://ga.wordpress.org/plugins/tags/privacy/)
 *  [Advanced View](https://ga.wordpress.org/plugins/master-post-password/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/master-post-password/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/master-post-password/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/master-post-password/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/master-post-password/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/master-post-password/reviews/?filter=1)

[Add my review](https://wordpress.org/support/plugin/master-post-password/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/master-post-password/reviews/)

## Contributors

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/master-post-password/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ARCFJ9TX3522)