PHPackages                             wpscholar/wp-post-expiration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wpscholar/wp-post-expiration

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wpscholar/wp-post-expiration
============================

A WordPress module that makes it easy to add support for post expiration to any post type.

1.1.1(8y ago)11294↓75%2[23 PRs](https://github.com/wpscholar/wp-post-expiration/pulls)GPL-2.0+CSS

Since Feb 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/wpscholar/wp-post-expiration)[ Packagist](https://packagist.org/packages/wpscholar/wp-post-expiration)[ RSS](/packages/wpscholar-wp-post-expiration/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (27)Used By (0)

Post Expiration
===============

[](#post-expiration)

A WordPress module that makes it easy to add support for post expiration to any post type.

Requirements
------------

[](#requirements)

- PHP 5.4+
- WordPress 4.5+

Installation
------------

[](#installation)

Add the module to your code base via [Composer](https://getcomposer.org/)

```
composer require wpscholar/wp-post-expiration
```

Initialization
--------------

[](#initialization)

If you are adding the code to a WordPress plugin or theme, there is no initialization step needed. However, if you are adding the code at a higher level in your WordPress project, you will need to call the initialization function on the init hook, like so:

```
add_action( 'init', 'wpscholar_post_expiration_initialize', 1000 );
```

Adding Post Type Support
------------------------

[](#adding-post-type-support)

If you are adding support to a pre-existing post type, just add this code:

```
add_post_type_support( 'post', 'expiration' );
```

Be sure to replace `post` with the name of your post type.

Or, in the `supports` argument when registering a post type, just add `'expiration'`.

Available Methods
-----------------

[](#available-methods)

The following static methods are publicly available:

- `setExpiration( $post_id, $expiration )` - Set expiration for a specific post. Expiration is a Unix timestamp.
- `removeExpiration( $post_id )` - Remove expiration for a specific post.
- `expirePost( $post_id )` - Immediately expire a specific post.
- `expirePosts()` - Expire all posts. (Limit 100 per run per post type)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~133 days

Total

3

Last Release

3161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae89dc177002c2f67341cde2d525e3f3c5b1d6aaaf07df15257a284f001c5551?d=identicon)[wpscholar](/maintainers/wpscholar)

---

Top Contributors

[![wpscholar](https://avatars.githubusercontent.com/u/890951?v=4)](https://github.com/wpscholar "wpscholar (8 commits)")

### Embed Badge

![Health badge](/badges/wpscholar-wp-post-expiration/health.svg)

```
[![Health](https://phpackages.com/badges/wpscholar-wp-post-expiration/health.svg)](https://phpackages.com/packages/wpscholar-wp-post-expiration)
```

###  Alternatives

[bumbummen99/shoppingcart

Laravel Shoppingcart

517561.6k3](/packages/bumbummen99-shoppingcart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
