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. [Utility &amp; Helpers](/categories/utility)
4. /
5. carlcs/craft-autoexpire

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

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

Auto Expire plugin for Craft CMS

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

Since Feb 2Pushed 10y 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 3w 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 62% 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

3652d 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

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[mautic/core

Mautic Open Source Distribution

9.8k2.6k9](/packages/mautic-core)[roots/wp-stage-switcher

WordPress plugin that allows you to switch between different environments from the admin bar

374458.3k3](/packages/roots-wp-stage-switcher)[vinkla/wordplate

The WordPlate boilerplate

2.2k5.3k](/packages/vinkla-wordplate)[mediawiki/maps

Adds various mapping features to MediaWiki

78149.7k3](/packages/mediawiki-maps)[rainlab/blog-plugin

Blog plugin for October CMS

17158.6k](/packages/rainlab-blog-plugin)

PHPackages © 2026

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