Docs Automation & Cron Expired Coupon Cleanup

Expired Coupon Cleanup

Automatically remove expired coupons to keep your site fresh.

4 views Updated 2 weeks ago

Expired Coupon Cleanup

Why Cleanup Matters

Expired coupons frustrate visitors and hurt your SEO. CreateCouponWebsite automatically removes expired deals to keep your site trustworthy and fresh.

How It Works

The cleanup scheduler runs daily (configurable) and:

  • Identifies coupons past their expiration date
  • Moves them to a "Recently Expired" archive (optional)
  • Deletes them permanently after the archive period
  • Updates store coupon counts
  • Regenerates affected sitemaps

Configuration

In Admin -> Automation -> Cleanup:

  • Cleanup Frequency — Daily, twice daily, or hourly
  • Archive Period — Keep expired coupons for X days before permanent deletion (default: 7 days)
  • Notify Admin — Send email when cleanup runs

Manual Cleanup

Run cleanup immediately:

php artisan coupons:cleanup

php artisan coupons:cleanup --force

Set the archive period to 0 if you want expired coupons removed immediately with no grace period.

Was this article helpful?