Apply Posts/Pages Expiration Date in WordPress

When using WordPress posts, there are many possibilities that you want to add post or page expiration date into your certain WordPress posts or pages. In this tutorial, you will learn how you can apply posts/pages expiration date in WordPress.

First download the Post Expirator plugin from WordPress plugins repository. This plugin is very handy to use. It allows to set expiration dates for posts and pages. You can also choose to have the post categories change at expiration time via plugin options page. It utilizes wp cron functions and triggers every minute by default, but you can change the schedule time according to your needs.

After activating the plugin and going to the plugin’s options page, you will find screen like below:

post expirator 1 post expirator 2

Date Format is the place where you will specify the date format.
Time Format option allows you to set time format.
Default Date/Time Duration: Set the default expiration date to be used when creating new posts and pages. Defaults to none.
Default Expiration Category: Set’s the default expiration category for the post.
Show in post footer? This will enable or disable displaying the post expiration date in the post footer.
Footer Contents: Enter the text you would like to appear at the bottom of every post that will expire. The following placeholders will be replaced with the post expiration date in the following format:

EXPIRATIONFULL -> Thursday June 27th, 2013 6:50pm
EXPIRATIONDATE -> Thursday June 27th, 2013

After the configuration on the plugin’s options panel. Go to the post or page where you want to set expiry date. On the post or page, you will find the section like below:

post expirator 3

After click on “Enable Post Expiration“, you can edit the expiration details. “How to expire” drop down allows you to specify, after post or page expiration what will be the status of the post. The drop down has options: Draft, Delete, Private, Category: Replace, Category: Add and Category Remove.

After the entire setup, update the post or page. In the post or page detail page, you will find the text like below:

post expirator 4

If you any question, comment below.


Duan Lingxin

Duan Lingxin

Content crafter and chief editor at Scratching Info. Also regular contributor on other major online tech platforms. Security Specialist by day and a writer by night, he does his best to instill his knowledge about tech while delivering inspiring and life changing resources through his writing,

More Posts - Website

8 thoughts on “Apply Posts/Pages Expiration Date in WordPress”

  1. Hello,

    i use this plugin local on my PC and it works great but it does not work on the host server. Do you know why?

    Thanks in advance

    • The problem is because of WordPress Cron. Open your wp-config.php file and
      search the code “define(‘DISABLE_WP_CRON’, true);”. If you find it to be true, then set it to false like
      define(‘DISABLE_WP_CRON’, false);

      Second Way:

      There is an option in the plugin settings. If you click on “Post Expirator” under the settings menu, you should see it. Just enable the debugging. It will work fine.

  2. Hello,

    thanks so much for replying. I have had a look at my wp-config.php but the code “define(‘DISABLE_WP_CRON’, true);” is not there.


Leave a Comment