The Data Cleanup Tools help administrators keep PressPrimer Assignment data healthy as it accumulates across terms and semesters. Four cleanup tools find different types of stale or orphaned data, and an optional scheduled cleanup keeps things tidy on autopilot.
Every cleanup operation supports dry-run mode, which previews what would be deleted without actually deleting anything. Dry runs are encouraged for the first few times you try out cleanup tools on your site.
Accessing the Tools
Navigate to Assignments > Settings and select the Data Cleanup tab.
The Data Cleanup tab is only visible to administrators.
The Four Cleanup Tools
Orphan Finder
Orphan data accumulates over time as assignments and submissions are deleted, or as students abandon drafts.
Orphan Files (Storage Scanner)
Walks the /wp-content/uploads/ppa-submissions/ directory and flags files that exist on disk but are not referenced in the database. These are typically left over from interrupted uploads where the submission wasn’t finalized..
Predecessor Submissions
Finds earlier resubmission attempts that were never graded. Specifically, a submission is flagged as a predecessor when all three are true:
- Its status is draft or submitted (never graded)
- A later submission attempt exists for the same student on the same assignment
- That later attempt has been graded or returned
This is common on assignments that allow resubmissions; once a student’s later attempt is graded, their earlier attempts are typically just clutter.
Old Attachments Cleanup
Deletes submission attachments older than a configurable threshold (default: 365 days). Use this when you need to manage storage on sites with a lot of file-based assignments.
Only the on-disk file and its file row are deleted. The submission record, grade, and feedback remain untouched.
Running a Manual Cleanup
- On the Data Cleanup tab, scroll to the Manual Run section.
- Check the boxes for the cleanup tools you want to run.
- Leave Dry Run enabled if you want to preview without deleting (this is the default).
- Click Preview Cleanup to see candidates without making changes, or click Run Cleanup Now to delete immediately.
- Review the results.
If you ran a dry run and the results look right, uncheck Dry Run and click Run Cleanup Now to execute for real.
Scheduled Cleanup
For sites that need ongoing maintenance, scheduled cleanup runs the tools you’ve enabled on a recurring schedule via WP-Cron. It’s off by default — you have to opt in.

Enabling Scheduled Cleanup
- Scroll to the Scheduled Cleanup section on the Data Cleanup tab.
- Toggle Enable Scheduled Cleanup.
- Choose a frequency: Daily, Weekly, or Monthly. Weekly is the default.
- Check the boxes for the tools you want included in each scheduled run.
- Decide whether to leave Dry Run enabled for early cycles (recommended) or disable it for live deletion.
- Save your changes.
Recommended Workflow
A safe rollout for scheduled cleanup:
- Run a manual dry run with all four tools selected. Review the output.
- Run individual tools manually (still in dry-run mode) until you’re comfortable with what each one will delete.
- Disable dry run and run one tool at a time for real, starting with the lowest-risk (orphan submission files).
- Once manual cleanup has been working without surprises, enable scheduled cleanup with weekly frequency and dry-run mode left on. Review the logs.
- After a few weeks of clean dry-run logs, disable dry-run mode on the schedule.
