How Do I Expire Posts in WordPress Automatically?

How Do I Expire Posts in WordPress Automatically? WordPress does not include automatic post expiration by default. However, the Password Protect WordPress Pro (PPWP) plugin gives you four methods to automatically delete, hide, or expire posts by date, usage limit, cookie duration, or schedule.

That means you can control exactly when and how your content becomes inaccessible, without manually unpublishing posts.

⚙️ What You Need Before You Start

Install both PPWP Lite and PPWP Pro on your WordPress site. Open any post or page in the WordPress editor.

Before a post can expire, it must be password protected. Click Protect under the post title. PPWP automatically generates a password. The post is now protected and ready for expiration rules.

🔢 Method 1: Expire Posts by Usage Limit

Best for: Limited downloads, one-time access, or exclusive content.

  1. Open Manage Passwords under the post.
  2. In the Usage Limit column, set the number of allowed uses.

Once the limit is reached, the password automatically expires. The post becomes inaccessible. In other words, you can sell or share content with a built-in access cap — no manual intervention needed.

📅 Method 2: Schedule Post Expiration by Date or Time

Best for: Flash sales, limited-time promotions, or event registrations.

  1. Open the Password Protection Popup for the post.
  2. In the Password Expiry column, select an expiration date and time.

The password automatically expires at the scheduled moment. The post disappears from your site at that exact time. That means you can set up a promotion in advance and let it expire on its own.

🍪 Method 3: Control User Access Duration with Cookie Expiration

Best for: Membership sites, online courses, or subscriber-only content.

A common question is: Can I control how long users stay logged in after entering a password? Yes, you can.

  1. Go to Password Protect WordPress → Settings → Cookies.
  2. Set the cookie expiration time.

After the cookie expires, users must re-enter the password to access the content. Here’s how it works: the cookie tracks how long a user has been authenticated. Once it expires, access is revoked automatically.

⏱️ Method 4: Expire Partial Content with On/Off Scheduling

Best for: Limited-time announcements, discount codes, or promotional sections inside longer articles.

This method applies to specific sections within a post — not the entire post. You can show or hide individual paragraphs, images, or blocks automatically.

Use the PPWP shortcode with on and off attributes:

  • Set on for when content appears.
  • Set off for when it disappears.
  • Use this format: year-month-day hour-minute-second.

Here is an example of how the shortcode looks in practice:

[ppwp passwords='upgrade2026' on='2026-02-01 00:00:00' off='2026-03-31 23:59:59']
<b>LIMITED TIME: Upgrade to VIP All-Access Pass</b>
Unlock the full potential of your conference experience! Click here to upgrade your ticket now.
[/ppwp]

In this example, the content appears on February 1, 2026 and disappears automatically on March 31, 2026 at 23:59. That means you can embed a discount code or promotion inside a post and have it expire without editing the post manually.

🔗 Bonus: Share Password-Free Access Links with Expiration

PPWP also allows you to generate Quick Access Links that bypass the password form entirely. Users click the link and access content directly without entering a password.

These links support the same expiration rules: usage limits or date and time expiration. This is ideal for email newsletters or client sharing where you want a frictionless experience with built-in expiration control.

✅ Summary: The Best Way to Expire Posts in WordPress Automatically

To expire posts in WordPress automatically, install Password Protect WordPress Pro, protect your content, and apply one of four expiration rules:

  • Usage Limit — expires after a set number of accesses
  • Date and Time — expires at a scheduled moment
  • Cookie Duration — controls how long users stay authenticated
  • Scheduled Sections — shows or hides specific content blocks automatically

Each method works independently or in combination, depending on your content strategy.

▶️ Watch the Full Tutorial

See all four expiration methods in action in the video below: