PHPackages                             carlcs/craft-autoexpire - 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. carlcs/craft-autoexpire

ActiveCraft-plugin

carlcs/craft-autoexpire
=======================

Auto Expire plugin for Craft CMS

v1.2.0(9y ago)17378[1 issues](https://github.com/carlcs/craft-autoexpire/issues)PHPPHP &gt;=5.3.0

Since Feb 2Pushed 9y ago2 watchersCompare

[ Source](https://github.com/carlcs/craft-autoexpire)[ Packagist](https://packagist.org/packages/carlcs/craft-autoexpire)[ RSS](/packages/carlcs-craft-autoexpire/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (3)Used By (0)

Auto Expire plugin for Craft CMS
================================

[](#auto-expire-plugin-for-craft-cms)

This plugin allows to set an entry’s Expiry Date, Post Date or any custom date field automatically on entry save. The date value is generated from a Twig template which can be set up in the plugin settings.

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

[](#installation)

The plugin is available on Packagist and can be installed using Composer. You can also download the [latest release](https://github.com/carlcs/craft-autoexpire/releases/latest) and copy the files into craft/plugins/autoexpire/.

```
$ composer require carlcs/craft-autoexpire

```

Usage
-----

[](#usage)

Navigate to the plugin’s settings page and add a new rule to define the conditions for how dates are being set by the plugin.

- Select the section and entry type of the entries you want the rule to be applied to.
- Select the date field you want to apply this rule to.
- Enter the Twig code which is rendered and set to the date field on entry save. You can include tags that output entry properties.

Configuration
-------------

[](#configuration)

#### Expiration Date

[](#expiration-date)

Auto Expire uses the same approach to parse a Twig Template from a field as Craft’s Title Format settings field, please see [Dynamic Entry Titles](http://buildwithcraft.com/docs/sections-and-entries#dynamic-entry-titles) in the Craft Documentation for more information about the expected syntax.

When using tags to output date properties keep in mind that, by default, Twig returns dates in "Y-m-d" format without any time information (which is the same as if you had set it to 12:00 AM).

That’s why you probably want to use Twig’s `date` filter to explicitly define a format containing the time, i.e. `date('c')`.

**Examples:**

- Set to a fixed date:

    ```
    2015-05-13 13:00
    ```
- Set a date based on the entry’s Post Date:

    ```
    {{ object.postDate|date_modify('+7 days')|date('c') }}
    ```

    or using another [relative time format](http://php.net/manual/de/datetime.formats.relative.php):

    ```
    {{ object.postDate|date_modify('first day of next month 5am')|date('c') }}
    ```
- More complex example using a conditional (ternary syntax):

    ```
    {{ object.myDateTimeField ? object.myDateTimeField|date('c') : object.postDate|date_modify('+7 days')|date('c') }}
    ```

#### Allow User Changes

[](#allow-user-changes)

Check this field to allow users to overwrite the automatically set date. In this case the plugin will only set the date if the date field is left blank by the user.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~141 days

Total

2

Last Release

3607d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7516543?v=4)[carlcs](/maintainers/carlcs)[@carlcs](https://github.com/carlcs)

---

Top Contributors

[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (28 commits)")

### Embed Badge

![Health badge](/badges/carlcs-craft-autoexpire/health.svg)

```
[![Health](https://phpackages.com/badges/carlcs-craft-autoexpire/health.svg)](https://phpackages.com/packages/carlcs-craft-autoexpire)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k4](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3164.5k](/packages/starcitizentools-citizen-skin)

PHPackages © 2026

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