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 today

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 67% 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

3561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b799d3f4b8fec6923cf1dd10f9352107aee71447058158828a589d5488b71a9?d=identicon)[carlcs](/maintainers/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

[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[worksolutions/bitrix-reduce-migrations

Bitrix module for migrations

8615.6k](/packages/worksolutions-bitrix-reduce-migrations)[tinymighty/wiki-seo

A simple MediaWiki extension to give you control over the HTML title and meta tags via a tag or parser function.

174.2k](/packages/tinymighty-wiki-seo)

PHPackages © 2026

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