Automatic cleanup of temp items

In Sitefinity CMS, there are four cycles of a lifecycle item – Master, Temp, Live, and Deleted. When an item is being edited, a Temp version of this item is created by copying the Master version. These Temp items are stored in the database and, if left unchecked in large numbers, can slow down the performance of your website. Therefore, an automatic cleanup of unused Temp files is enabled by default and scheduled for midnight, every Sunday. This process should be scheduled to run at times when your website is under low load.

To schedule the process, perform the following:

  1. In Sitefinity CMS backend, navigate to Administration » Settings » Advanced.
  2. In the treeview on the left, expand System » Lifecycle and click Temp items cleanup.
  3. In field Maximum temp item age, enter the number of days for which unused Temp items are stored in the database before being deleted by the automatic cleanup task.
    For example, enter 30 to keep Temp items for a month before they are deleted.
  4. In field Automatic temp items cleanup cron specification, enter the time and the day when the cleanup task will be executed using a Cron expression.
    For example, if you enter 0 13 * * 1, the task is performed every Monday at 1 pm.
    The default value is 0 0 * * 0, which means the task is performed at midnight every Sunday.
  5. Click Save Changes.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?