Adds an expiry date and time to posts, pages, or custom post types after which the post becomes expired.
Adds an expiry date and time to posts, pages, or custom post types in which the post becomes a draft.
electric-studio-auto-post-expire
folder to the /wp-content/plugins/
directoryThe plugin uses WordPress’s built-in cron functionality. Every set time it will check whether there’s anything to expire. Previously it checked on pageload, which was resource-intensive on high-traffic websites. You can check when it’s going to run next on the top of this page.
As soon as you hit the “Save Changes” button. If it’s at 2am, then 2am, and then x interval you set.
If you want to reset the time (say, you want to run it every day at 4am), you need to set the frequence to something else, and then back to daily at 4am. Future release of the plugin may have a “run first at” option, but not just yet.
Click on the input field (color will change red if you move your mouse over it) and Save Changes
That depends on the traffic your site is getting, and the granularity you want to achieve.
If you need to expire a piece of content at 15:34, then I suggest setting 15 minutes and clicking Save Changes at any of these times past the hour: 4, 19, 34, 49 minutes.
If you have a very high-traffic site with a lot of content, then I suggest running it daily at the wee hours of the morning (or when you have the least ammount of traffic. Check your analytics).
It will run a complete loop of every post type, so it might take a while, and eat up server memory and CPU cycles for a bit, which means for a short time your site will be slower.
That’s just cron and WordPress being silly. Refresh should solve that problem, but basically, WordPress thinks the next schedule is still in the past. It will get there, don’t worry.
That’s all I can think of right now. If you have any other questions, post them here, or the plugins WordPress plugin page. Use latter for bugs, and this one for general questions / feature requests though.
Yes you can since version 1.2
Yes, since version 1.3.5, I have included the shorted code of [expirydate format=”d-m-Y”] or for those that would like to build it into their template, you can use es_ape_exp_date( $format )
. ($format is optional, and is the same as the PHP date formats (see http://uk.php.net/manual/en/function.date.php))
es_time_left()
within the loop. It will give you a human readable time difference in a variable, so you’ll need to use echo
on that. Uses human_time_diff()
, and accounts for the frequency of the cron job.