Title: Posts not automatically expiring
Last modified: July 13, 2017

---

# Posts not automatically expiring

 *  [Alex Knight](https://wordpress.org/support/users/alexknight/)
 * (@alexknight)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/posts-not-automatically-expiring/)
 * I installed the plugin and configured posts to automatically expire after 1 year
   + 2 weeks, upon which they’re automatically moved to a different category.
 * After configuring this, I expected old posts to be automatically moved, but this
   never happened.
 * I checked with WebFaction, my web host, and they had this to say:
 * That particular cron job wouldn’t work for two reasons:
 * – there is no cron.php file at the specified path, see:
 * [root@web528 ~]# ll /home/user/webapps/wordpress/iwp/cron.php
    ls: cannot access/
   home/user/webapps/wordpress/iwp/cron.php: No such file or directory
 * – if you want to call a PHP script through cron, you need to make a note of the
   correct path and add it to your crontab as follows:
 * 20,40 * * * * /usr/local/bin/php -q /the/correct/path/to/cron.php
 * (where you should replace “/the/correct/path/to/cron.php” with the actual path
   to your cron.php file)
 * However, I’ve taken a quick look at the description of the WordPress plugin you
   are using (at [https://wordpress.org/plugins/post-expirator/](https://wordpress.org/plugins/post-expirator/))
   and I noticed the following:
 * “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).”
 * This would mean that the plugin relies on the built-in WordPress cron process
   and does not actually expect you to add the task to the crontab on your server.
   
   This kind of automation should be handled by WordPress itself and there should
   be no need for you to manually set up the cron job.
 * Note: In post expirator diagnostics it does say WP Cron is working okay.
    -  This topic was modified 8 years, 11 months ago by [Alex Knight](https://wordpress.org/support/users/alexknight/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Aaron Axelsen](https://wordpress.org/support/users/axelseaa/)
 * (@axelseaa)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/posts-not-automatically-expiring/#post-9317828)
 * The default expiration setting will only work on new posts or posts that are 
   edited. You can’t just change the setting and expect it to retroactively work
   on all past posts – it doesn’t work that way.
 * As for the Cron, the Post Expirator plugin relies on the built in WordPress WP-
   Cron process. The check in the plugin simply checks to see if that appears to
   be loading.
 * If you make a new post, and set an expiration option, is that working correctly?
 *  [xrundel1](https://wordpress.org/support/users/xrundel1/)
 * (@xrundel1)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/posts-not-automatically-expiring/#post-9370523)
 * Aaron Axelsen, there is a problem with “new posts” – I have posts that created
   via RSS and as new post created ALL other post’s expiration date/time plugin 
   reset to the latest post expiration date. Therefore no old posts expired ever.
    -  This reply was modified 8 years, 10 months ago by [xrundel1](https://wordpress.org/support/users/xrundel1/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Posts not automatically expiring’ is closed to new replies.

 * ![](https://ps.w.org/post-expirator/assets/icon-256x256.png?rev=3569472)
 * [Schedule Post Changes With PublishPress Future: Unpublish, Delete, Change Status, Trash, Change Categories](https://wordpress.org/plugins/post-expirator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-expirator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-expirator/)
 * [Active Topics](https://wordpress.org/support/plugin/post-expirator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-expirator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-expirator/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [xrundel1](https://wordpress.org/support/users/xrundel1/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/posts-not-automatically-expiring/#post-9370523)
 * Status: not resolved