How to Auto Expire Posts in WordPress

Written by Jean Galea
Written by Jean Galea

Last updated on 9 Nov 2013

If you want not only to schedule the publish date of a post or custom post type in WordPress, but also the expiration date, there are a few plugins that can help you out. These plugins will enable the setting of a time span for posts.

WP Mayor is supported by its audience. If you purchase through a link on our site, we may earn a commission. Here’s why you can trust us.

Table Of Contents

Table of Contents

Before We Get Started

We found a fully managed WordPress host with fantastic speed, security, and support that has performed consistently for many of our sites.

WP Engine’s longevity and reputation speak for themselves. They offer a hosting platform that allows you to build, test, and deploy faster, along with built-in performance optimizations, backups, and much more.

Try it today and save $100+ in your first year.

With that said, let’s get started…

Introduction

If you want not only to schedule the publish date of a post or custom post type in WordPress, but also the expiration date, there are a few plugins that can help you out. These plugins will enable the setting of a time span for posts.

Post Expirator

The Post Expirator plugin allows the user to set expiration dates for both posts and pages. There is a configuration option page in the plugins area that will allow you to seperataly control whether or not posts/pages are either deleted or changed to draft status. Additionally you can also choose to have the post categories change at expiration time. If you choose to change the post category, the default action of changing the status will be ignored.

The plugin hooks into the wp cron processes and runs every minute by default, but can be configured to use any cron schedule (hourly, twicedaily, daily, etc).

The expiration date can be displayed within the actual post by using the [postexpirator] tag. The format attribute will override the plugin default display format. See the PHP Date Function for valid date/time format options.

Download Post Expirator

Posts Auto Expire Control

The Post Auto Expire Control is a plugin for admin of multi-authors site/blog to control the posts expiration based on the user role and post type.

Plugin Features:

  • Define post expiration rules based on user roles and post type.
  • Define action that will be taken when the post has expired.
  • Sent notification to post’s author before the post is about to expire.
  • Configure the subject and content of the notification email.
  • Define when the notification mail should be sent.
  • Admin able to change the expiry date for a single post.

Download Posts Auto Expire Control

If you enjoyed this post, make sure to subscribe to WP Mayor’s RSS feed.

<span style="font-weight: 400">Written by: </span>Jean Galea
Written by: Jean Galea

Jean Galea is an investor, entrepreneur, and blogger.

He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast.

His personal blog can be found at jeangalea.com.

BionicWP

Quick Links

Did you find this article helpful?

Share Your Discovery

4 Responses

  1. You can also try that plugin I released some time ago.

    It allows you to expire the WordPress tags on a specific date:
    https://wordpress.org/plugins/expire-tags/

    The thing is that you don’t delete posts when the time comes, it just desassociate it from a tag.

    Also, any rating, feedback or review would be greatly appreaciated 🙂

  2. Do you know of any plugin / code whereby the urls of expired posts can automatically 301 redirect to a given page?

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more tips and tools.
Join 5000+ designers, developers, and site builders who follow us to receive the best guides, tools, and services for their website builds every week.

Hey, design enthusiasts...

Elevate your website designs with our free transformative guide on the 60-30-10 rule.

Discover how this simple, yet powerful, principle can make your designs infinitely better!

By downloading this guide, you are opting in to our email list. We don’t send spam. You may unsubscribe any time.

What's missing?