The Atropos WordPress Plugin
[08-Jun-09 Updated to note 2.7.1 compatibility.]
The Atropos plugin lets you set an expiration date for your posts. This is done in a new Advanced Options section of the post edit page.

Just pick your month and put in the date and year and your post will automatically be deleted at the end of that day. Note that the expired posts are DELETED. Be sure that you want to do this. I disavow any responsibility if you delete your entire blog because you weren’t being careful.
This plugin is an updating of my Expiration Date plugin to give it a better interface and a new name (for reasons to be documented in another post at some point). If you’ve been using Expiration Date, you should upgrade to this one. And if you do, it will even offer to import your old expiration dates for you:

Caveat
This plugin uses WordPress’s cron feature. This allows you to set a time for things to happen, such as deleting a post. All well and good, except that it doesn’t actually happen until someone looks at a page AFTER that time. And then it takes a few seconds to actually happen. The net result for this plugin is that expired posts will still be there for the first page view of the deletion day and possibly several more if there is a lot of traffic around midnight. The post will be deleted, but not precisely at midnight. Such is WordPress’s cron.
Atropos?
Atropos was the name of one of the three fates in Greek mythology. The fates were the executors of destiny, with each of them serving a specific purpose. Clotho spun the thread of life. Lechesis measured it to match with each person’s life span. And Atropos cut the threads, thus ending each life.
If you are interested in the fates (or furies or kindly ones or eumenides), Amazon offers plenty of books on Greek mythology. An especially nice treatment of them is in Neil Gaiman’s Sandman books. While they are not prominent characters for most of the story, they play a critical and climactic role, especially in Volume IX, The Kindly Ones.
The name was suggested by Christopher Johnson in a thread on ABestWeb. Christopher was also an invaluable beta test for the Expiration Date plugin that preceded this one. Any bugs in this must have crept in after his testing and all entirely my bad.





I just noticed that 2.7 broke this. Sorry. I’ll try to fix it shortly.
Is there a way to make the expired post archive. Or do you know of something similar
Okay, so does it or doesn’t it work with Wordpress 2.7? Also, how much strain is this going to put on the server with the cron jobs? How often is the cron set to run?
On my install, it seems to work fine. Other people have reported it not working. I do not know what is causing the problem. Honestly, the plugin just isn’t that complicated.
In any case, the cron jobs only run once a day (on the first page view after midnight), so there really isn’t any significant server load at all.
[...] od dodataka koji Vam u tome može pomoći je Post Expirator, a drugi Atropos. Ovi dodaci se integrišu u panel za unos članaka, a korišćenje je vrlo intuitivno. Atropos će [...]
Hi John,
I think you should incorporate Fahrul’s changes into your plugin to allow for changing the post’s status on expiry date.
http://fahrul.co.cc/3/wordpress-atropos-plugin-edited
Some people might just want to keep the post, but not have it published.
Hope you consider merging his changes.
Cheers!
Awesome Plugin. I tweaked it to move it to a certain category instead of deleting the post.
But i wanted to know, is there a way to show the Number of Posts that expire in the next X days? Would be superhappy to know.
Cheers from Germany, Ben
I have a form on the front end of my website, users can use to post. How could I put the input there instead of on the backend?
Hmmm… tricky… you’d have to make your form handling code set the custom field _atropos_expiration_date for the given post. The value should be the expiration date in yyyy/mm/dd format. Good luck. I’d love to see the result.
I was wondering how I might still use the Custom Field to set the expiration with this new version of the plugin?
I really really really need to still use the Custom Field rather than the new method.
Thanks,
Paul
It should still work if you are doing it programmatically, although the custom field now called _atropos_expiration_date. The problem with just editing the field directly in the interface is that custom fields that start with underscores do not show up in the edit screen. What are you trying to do?
THANKS for the info! I’m using TDO Mini forms and I need to allow the user to manually set the expiration date of their post.
WOW! somehow I missed the above individuals post. Sorry to waste your time. Great plugin though, it works perfect!
…or even a copy of the old plug-in would be great too, if its compatible with WP 2.6.5
I’m using WP 2.6.5. I added custom field with the following:
Key = _atropos_expiration_date
Value = 2009/10/01
but the post has not deleted itself yet.
Am I doing something wrong? Or is the information being entered in improperly?
With the plugin installed and activated, that should work. I’ll see if I can reproduce the problem here… I admin I didn’t actually try setting the fields manually.
I do have the plugin installed and activated but setting it manually by custom field still isn’t working. Were you able to re-create the problem?
Testing tonight… didn’t get it set up in time last night. That said, everything looks fine when I check the database.
Is wp_cron still running on your site? Atropos uses wp_cron to do its work.
I have no idea how to tell if wp_cron is running? Any ideas?
I did a little more playing and here’s what I can verify so far:
using phpMyAdmin I can say that there were no _atropos_expiration_date entries anywhere. So I created a new post and instead of using custom fields to enter in the expiration date, I used the Expiration Date box to manually enter in the values and then checked the database again and it worked.
So the problem at this point appears to be, when setting it by custom field, nothing is happening or getting stored in wp_postmeta.
With regard to my wp_cron running or not. I checked my raw access error log and I have a number of these entries:
69.65.3.168 – - [03/Oct/2009:23:18:04 -0500] “GET /wp-cron.php?check=5a4a88d738bd64fab3bcbbbeacfca6f4 HTTP/1.0″ 200 – “-” “-”
Not sure what’s going on though?
Any chance I could just get the old plugin file from you? I would like to just give it a shot for my purposes and see if it fixes the weird issues I seem to be having.
Thanks for your help thus far.
Sure. I’ll send to it you shortly. I’m sorry you’ve been having these problems. Perhaps in the future I should provide a function for setting or clearing an expiration date so it can be used programmatically without the headaches you’ve encountered.
[...] Hostscope.com : Lets you set an expiration date on any post! [...]
I changed the plugin a bit to fit our function, which someone else mentioned above. I think this will work now so that after a post expires, it will change it from one category to another.
In this case, I am changing the term_taxonomy_id to 4 only if the post has expired and it is currently 3. ‘upcoming guests’ to ‘previous guests’
$wpdb->query(“UPDATE {$wpdb->term_relationships} SET term_taxonomy_id = ‘4′ WHERE object_id = $a AND term_taxonomy_id = ‘3′”);
I’m waiting for it to run tonight to see if it works, any ideas how I could do this a little smoother?
I just brougt up 2.8.6 and the date expired only shows that the post only expires at the end of xxxxx (month).
What is the change I have to make to get it to list a day/month/year format if at all possible.
Thanks,
John