WordPress Post Expirator Plugin Released

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 separately control whether or not
posts/pages are either deleted or changed to draft status.

The plugin hooks into the wp-cron process and runs every hour.  It was designed and developed to work with WordPress MU, however it will not work in the mu-plugins folder due to how the plugin activation is setup to register the cron hooks.

It can be downloaded from the WordPress Plugin Directory – http://wordpress.org/extend/plugins/post-expirator/

Let me know if anyone encounters any issues and I hope you enjoy it!

This entry was posted in WP Post Expirator. Bookmark the permalink.

20 Responses to WordPress Post Expirator Plugin Released

  1. roccia says:

    Hi Aaron, i’m using this plugin but there be some problems.

    I’ve installed it correctly on my 2.5 wp, but when i set an expiration date in a post and i save and close, the expiration date is not saved neither in custom fields (what is the key?) neither in the plugin box.

    Any advice?

  2. Aaron says:

    The key name is “expiration-date”. I would recommend upgrading to WP 2.6 and trying it there.

  3. Cindy says:

    Aaron,
    I was very excited hen I found your plugin.

    But I have an issue I was hoping you could help me with.

    I downloaded the zip file from wordpress. I unzipped it. I uploaded the post-expirator.php file to the plugins folder via ftp.

    I logged into my admin area and navigated to the plugins screen to activate the plugin.

    And there is no plugin. There is nothing to activate. Is there something I did not do correctly?

    Can you please tell me how to get your plugin visible so I can activate it?

    I am using a self hosted WordPress 2.5

    Thank you for your assistance.

  4. Aaron says:

    That is very strange that it is not showing up. I have tested it with both wp 2.6 and wpmu 2.6 and it appears to work fine. I don’t think there is anything in the code that would prevent it from working in WP 2.5. I would suggest either upgrading to 2.6 or setting up a test install to see if it works for you there.

  5. Henry says:

    This is a great plugin, and it appears to work as advertised. That being said, the expirator does not work in the fashion I would like it to. Here’s the deal:
    I have pages that I want removed at a certain time. I queue these pages up ahead of time using the WP build-in “publish at a future time” feature. When the pages are publish with the WP cron, the expiration data is lost. It sure would be nice if you could harden Expirator enough that the WP cron can’t remove the expiration data.

    Thanks!
    Henry

  6. Urban says:

    hi Aaron,
    I was very excited too when I found your plugin.
    I planned to use post expirator with tdomf form on my WP, but i don’t know much about scripting.
    would you suggest me?
    Thanks,

  7. Morten says:

    Hi,
    I can’t get the plugin to work on WPMU 2.6.2. (I’ve installed it in the plugins folder, not the mu-plugins folder.)

    It puts the key in the wp_1_postmeta db table all right, but nothing happens when reaching the time for the post to expire.

    Does it require any special rights on folders on the server or something like that? Hope you can give me a hint. Thanks.

  8. Aaron says:

    It uses the wp-cron process. So, sometimes it may require you to reload the page twice after the expiration date before you see that it’s actually gone. I have not tested this on 2.6.2, but it was working fine with the 2.6 trunk

  9. Rem says:

    Can you test this on 2.6.2? It doesn’t seem to be deleting the expired posts.

  10. getelement says:

    thnx for sharing this great plugin ! found a small typo which prevents safari from the ability to select any of the fields either the whole box is being disabled or enabled r. 122 states labael vs label.

  11. Aaron Axelsen says:

    fixed! thanks!

  12. Aaron Axelsen says:

    Works for me on 2.6.3

  13. Jilly says:

    Aaron – a beautiful plug-in – thank you!

    Really well thought thru with the visibility in the admin panel etc.

    However what I would like is for it to be ‘automated’ i.e. I would like for every post (but never pages) to automatically have an expiration date set 30 days from publish date; removing the ‘front end’ piece in “write post” and just having this as a back end function.

    I’ve researched a lot of different ‘expire’ plug-ins and this is definitely the best IMO, so I’m wondering if you could do that mod for me – I am happy to pay you for the coding time/effort.

    Thanks in advance, look forward to hearing from you!

  14. I use WP 2.6 and the plug-in apparently works fine, but posts aren’t delete at expiration date. Where I’m wrong?
    The plug-in is in the folder wordpress/wp-content/plugins.
    Thanks!

  15. Steven says:

    Would it be tough to get this to send an email out one week before a post expires?

    I would probably need to setup another cron job to check the entries, but how does the database entry read. In the MySQL database it reads expiration-date and then 1229529600. How does that break down for December 17, 2008 @ 11

    I’m trying to figure out how to check for the week before expiration.

    Thanks,

  16. Aaron Axelsen says:

    The one thing to remember that when you load the blog after a post is set to expire, you may not see it on the first load of the page. This happens because the wp-cron will split off into a separate process to run the queries to change the status of the post. If the blog page loads before the wp-cron process is complete, it may take another reload of the page to work correctly.

  17. Aaron Axelsen says:

    This should not be that hard, and would also be a great feature to add to the plugin. The value stored in the DB is the unix timestamp value. So, there could just be a cron process to subtract 604880 (the amount of seconds in a week) and then that would get you the correct value. If interested, I can look into added this to the source of the plugin.

  18. Casey Young says:

    I have page which consists of a listing of post permalinks which point to various posts.

    Each post has an expiration date.

    I would like to be able to sort the posts on that list by the expiration date, as this makes the most sense. Sorting by date entered or ID doesn’t make sense in this case. (It’s a list of shows to be played by a band.)

    Is it possible to sort by expiration date?

    Thank you for a great plugin!

  19. casey says:

    Hey Aaron,

    Is there any way to pull the expiration date to display it in a post or reference it? I need to sort by the expiration date (it’s a listing of shows).

    Thanks!

  20. Aaron Axelsen says:

    Casey,

    The next release (1.11) will have the ability to reference the date within the post body. Hope that helps!

Leave a Reply

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