Safely scan a Plesk-managed server for web-exposed and non-web-exposed WordPress backup archives, with options to quarantine or permanently delete them. Includes space usage estimation before and after operations, customizable scanning paths, and production-grade safeguards.
- Comprehensive Plugin Coverage — Detects backup files from popular and niche WordPress backup/migration plugins:
- UpdraftPlus
- All-in-One WP Migration (
.wpress
) - Duplicator (
.zip
,.daf
) - WPvivid
- BackWPup
- BackupBuddy (
.backupbuddy
,.solidbackup
) - WP Staging
- XCloner
- Total Upkeep
- WP-DBManager
- Backup Migration
- All In One Security
- Shipper
- Generic Risky File Detection — Finds
.zip
,.tar
,.tgz
,.bz2
,.xz
,.wpress
,.daf
,.backupbuddy
,.solidbackup
,.sql
,.bak
,.dump
, and more. - Non-Web Path Scanning — Scan common and custom backup storage locations outside web roots.
- Custom Paths — Add extra directories to scan via
--extra-nonweb-path
. - Dry-Run by Default — No changes without explicit approval.
- Quarantine Mode — Moves files to a secure, restorable location with a manifest.
- Permanent Delete Mode — Requires per-file DELETE token confirmation.
- Space Usage Estimation — Displays estimated and actual free space before/after.
- Structured Reporting — JSON and CSV output for compliance/audit.
- Python 3.10.12+
- Linux with Plesk installed
- Standard library only (no extra dependencies)
curl -O https://raw.githubusercontent.com/securiace-dev/plesk-wp-backup-sweeper/main/plesk_wp_backup_sweeper.py
chmod +x plesk_wp_backup_sweeper.py
python3 plesk_wp_backup_sweeper.py --dry-run --verbose
python3 plesk_wp_backup_sweeper.py --dry-run --include-non-web
python3 plesk_wp_backup_sweeper.py --dry-run --include-non-web --include-plesk-dumps
python3 plesk_wp_backup_sweeper.py --dry-run --extra-nonweb-path /mnt/legacy --extra-nonweb-path /data/archives
sudo python3 plesk_wp_backup_sweeper.py --yes --age-days 7 --min-size 2M
sudo python3 plesk_wp_backup_sweeper.py --yes --age-days 14 --min-size 5M --include-non-web
sudo python3 plesk_wp_backup_sweeper.py --yes --extra-nonweb-path /srv/backups --age-days 30 --min-size 1M
sudo python3 plesk_wp_backup_sweeper.py --permanent --age-days 30 --min-size 10M
sudo python3 plesk_wp_backup_sweeper.py --permanent --age-days 60 --min-size 50M --include-non-web
sudo python3 plesk_wp_backup_sweeper.py --permanent --extra-nonweb-path /tmp/old --age-days 90 --min-size 100M
sudo python3 plesk_wp_backup_sweeper.py --yes --report-json /root/reports/backups.json --report-csv /root/reports/backups.csv
sudo python3 plesk_wp_backup_sweeper.py --restore /var/backup-quarantine/<timestamp>/manifest.json
python3 plesk_wp_backup_sweeper.py --dry-run --verbose | grep "SPACE"
sudo python3 plesk_wp_backup_sweeper.py --yes --include-plesk-dumps --age-days 15 --min-size 20M
- Always start with a dry-run.
- Quarantine first; only delete permanently after verification.
- Permanent delete requires DELETE token entry per file.
- Space usage estimates help prevent storage overflow risks.
MIT License — see LICENSE