Two WordPress Plugins That Enable Anonymous Previews Of Draft Posts

Have you ever run into a situation where you need someone to preview a post but don’t want to give them access to your site? Despite the WordPress plugin directory containing over 31K plugins, there are few that offer this type of functionality. WordPress doesn’t have this ability out of the box but there are two plugins that make this task extremely easy.

Public Post Preview

The first is called Public Post Preview by Dominik Schilling. Once installed, you’ll see a new Enable Public Preview checkbox added to the Publish metabox. When selected, a link is generated that you can copy and paste to the individual you’d like to preview a post. The link generates the same preview you would see when hitting the Preview button in the WordPress post editor.

New Public Preview Option
New Public Preview Option

Public Post Preview makes use of the built-in nonce functionality of WordPress to expire links. By default, links are active for 48 hours. While there are no user facing options to configure the expiration time, you can use the ppp_nonce_life filter to extend or decrease the time. For example:

add_filter( 'ppp_nonce_life', 'my_nonce_life' );
function my_nonce_life() {
    return 60 * 60 * 24 * 5; // 5 days

The example code would expire the links after five days.


WP-DraftsForFriends developed by Lester ‘GaMerZ’ Chan requires a little more effort on the part of the user to share drafts. After installing, you’ll find the options located under Posts – Drafts For Friends. Users need to select a post that is in draft status and then set the expiration time for the preview link.

Options To Set The Expiration Time and Manage Drafts
Options To Set The Expiration Time and Manage Drafts

Once a draft is added, you’ll see the generated link within the Currently Shared Drafts section. There are options beneath the URL to either delete the draft or extend the time the link is available.

Public Post Previews Wins Me Over

While WP-DraftsForFriends provides an interface to manage links and drafts, I prefer the simplicity of Public Post Preview. I like that the URL is generated and accessible from within the Post Writing screen. It feels and looks like a natural part of the writing process.

WP-DraftsForFriends gets a nod for allowing each URL to have a specific time limit such as days, hours, minutes, or even seconds. Both plugins get a nod for supporting the various custom post status’ that are part of the Edit Flow plugin.

Which plugin do you prefer or do you use a different technique to accomplish the same goal?


7 responses to “Two WordPress Plugins That Enable Anonymous Previews Of Draft Posts”


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: