Post Expiration Date

Description

This is a lightweight plugin designed to make WordPress posts expire at a set time. This was done in the simplest, most expedient manner possible so conflicts should be minimal.

How it works: You can set an expiration date (aka an expiry) for a post by selecting the date and time. This uses local time, not GMT, UTC, etc. Picking a date/time is optional. When the expiration date/time have been passed the post will be moved from Published status to Draft status.

Screenshots

  • /assets/screenshot-1.png

Installation

  1. Upload plugin-name.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

FAQ

What date-time format is the expiration date stored in?

February 2, 2019 1:01 AM will be stored as “2019-02-02T01:01” in your postmeta table.

Why does the date/time look like that?

We opted to use the ISO 8601 standard for date and time format for storage. This can be manipulated if you’d like to view it in other ways, as we do in the “Exp. Date” column of the Posts page.

My date-time entry text box is blank! What do I do?

This is because your browser does not yet support input type=”datetime-local”. If this happens to you please use the above time format or use Chrome. Subsequent verions of this plugin will fix this issue for universal native timedate selector support. If you are seeing this you are likely on v1.0.0 and should upgrade to a newer version.

Reviews

Very useful, but…

This plugin is in its result absolutely that what I was looking for.

Unfortunately a lot of persons are supposed to use this backend and there is neither mentioned the necessary time format nor the browser with which it will work with better.

Please be so kind and add at the postsettings directly the information about the required time format and, if I am allowed to state a wish, so take as expire time – if not mentioned – 00:00 as default settings.

Thank you in advance!
Petra

Great plugin working for CPT

Great, works for CPT, and you can select which CPT will expire (tested with WP 4.9.8)
I only experimented an error when browsing a post just after its expiration date was set in the past (so that it expired).
Uncaught Error: Cannot use object of type WP_Post as array in /wp-content/plugins/wp-post-expires/wp-post-expires.php:287

Just rewrite condition : if($del_post->post_status == ‘trash’){
to : if( $del_post AND ($del_post->post_status == ‘trash’)) { //

Does exactly what it says

This plugin does just what it says. You can make a published post automatically expire after setting an expiration time, but it’ll go to Drafts so you still have the post for your records. Good for when you’re posting about time-sensitive information that won’t be relevant after a while.

expires my posts

Does what is says on the label: expires my posts when their time is up.

Would be nice for pages as well! (hint hint)

Read all 5 reviews

Contributors & Developers

“Post Expiration Date” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Post Expiration Date” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

=1.0.0=

  • Released!