=== IT Empower Media Audit ===
Contributors: itempowersolutions
Donate link: https://www.it-empower.com/
Tags: media, cleanup, backup, uploads, woocommerce
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WordPress site with a huge uploads folder of unused old files: find them, back them up, then delete safely.

== Description ==

A common case: a WordPress site whose **uploads folder** (`wp-content/uploads`) has grown for years. Old images, PDFs and unused attachments stay on disk even though they no longer appear on pages, posts or the shop. The Media Library looks full; the live site no longer uses those files.

**IT Empower Media Audit** finds that unused media, explains why each file was classified, creates a **validated backup**, then deletes safely — with restore.

The plugin does not compete on how many files it can delete. It competes on making WordPress media cleanup **safe, explainable and recoverable**.

= English =

Typical situation: redesigns, old products, unused page-builder images and leftover files inflate `uploads` while the public site has moved on. Disk fills up; backups get slower; nobody knows which files are still referenced.

Scan the Media Library, review unused vs used vs protected files, back up the exact selection, **validate that backup** (file count, size, SHA-256), then delete in batches. Restore stays available while the recovery point exists.

**No validated backup = no deletion.** That rule is enforced in the code, not only shown as a warning.

What version 1.0 scans: posts, pages, custom post types, featured images, post meta, options, widgets, Customizer / theme mods, Gutenberg, Elementor, WooCommerce, JSON and PHP serialized values, HTTP/HTTPS, relative and CDN upload URLs.

The plugin never adds a “powered by” credit on your public website.

**Website:** [https://www.it-empower.com/](https://www.it-empower.com/)
**Support:** [contact@it-empower.com](mailto:contact@it-empower.com)

= Français =

Cas fréquent : un site WordPress dont le **dossier uploads** (`wp-content/uploads`) a grossi pendant des années. Anciennes images, PDF et pièces jointes restent sur le disque alors qu’ils n’apparaissent plus sur les pages, les articles ou la boutique. La médiathèque est pleine ; le site public ne s’en sert plus.

Refontes, anciens produits, images de page builder et fichiers oubliés gonflent `uploads` alors que le site a changé. L’espace disque part, les sauvegardes ralentissent, personne ne sait ce qui est encore réellement utilisé.

Trouvez ces médias inutilisés, lisez pourquoi chaque fichier a été classé, créez une sauvegarde de la sélection exacte, **validez cette sauvegarde** (nombre de fichiers, taille, SHA-256), puis supprimez par lots. La restauration reste possible tant que le point de récupération existe.

**Pas de sauvegarde validée = pas de suppression.** Cette règle est appliquée dans le code, pas seulement affichée.

Scan 1.0 : articles, pages, CPT, images à la une, postmeta, options, widgets, Customizer, Gutenberg, Elementor, WooCommerce, JSON et valeurs PHP sérialisées, URL HTTP/HTTPS, relatives et CDN.

Aucun lien « powered by » n’est ajouté sur le site public.

**Site :** [https://www.it-empower.com/](https://www.it-empower.com/)
**Support :** [contact@it-empower.com](mailto:contact@it-empower.com)

= Cleanup workflow =

1. Dry-run scan (no files are modified)
2. Review unused / possibly used / protected candidates
3. Select unused files only
4. Pre-flight (permissions, disk space, backup directory)
5. Backup of the exact selection
6. Backup validation (count, size, checksums)
7. Final reference re-check
8. Batch deletion with verification
9. Restore from the recovery point when needed

= What this plugin will not do in 1.0 =

* Automatically delete orphan files on the filesystem
* Scan every page builder (Divi, WPBakery, Bricks are planned)
* Put a credit link on your public website

== Installation ==

1. Upload the `it-empower-media-audit` folder to `/wp-content/plugins/`.
2. Activate **IT Empower Media Audit**.
3. Open **IT Empower Audit** in the WordPress admin menu.
4. Run a dry-run scan, review unused files, then create a backup before any deletion.

== Frequently Asked Questions ==

= Will this plugin add a link on my public site? =

No. Author links appear only on the plugin’s admin screens, the plugin header and this readme.

= Can I disable the backup? =

No. A validated backup is mandatory before deletion.

= What if the backup fails? =

Deletion stays blocked. No files are removed.

= My uploads folder is huge but those files are not on the site =

That is the usual case. After redesigns, removed products or unused builder images, old files stay in `wp-content/uploads` even though pages no longer reference them. The plugin classifies unused vs used vs protected before any cleanup.

= Does “unused” mean the file is safe to delete? =

Not automatically. Dynamic references in PHP, JavaScript or unsupported plugins cannot be fully proven. Protected and possibly used files cannot be selected.

= How can I contact the author? =

IT Empower Solutions — website [https://www.it-empower.com/](https://www.it-empower.com/) — email [contact@it-empower.com](mailto:contact@it-empower.com)

= Comment contacter l’auteur ? =

IT Empower Solutions — site [https://www.it-empower.com/](https://www.it-empower.com/) — e-mail [contact@it-empower.com](mailto:contact@it-empower.com)

== Changelog ==

= 1.1.0 =
* Scan recap with reclaimable disk space and file sizes by status.
* Image thumbnails and lightbox preview on the results screen.
* Clearer results table, filters and backup action bar.

= 1.0.5 =
* Review links point to the full WordPress.org reviews page.

= 1.0.4 =
* Distinct directory name: IT Empower Media Audit.
* Prefixed identifiers, uploads paths via wp_get_upload_dir(), translations via translate.wordpress.org.

= 1.0.3 =
* Extension filter on unused files.
* French / English UI from the WordPress user language (English fallback).
* Clearer admin workflow. WordPress.org review links stay hidden until the plugin is published.

= 1.0.2 =
* Safer delete re-check (numeric IDs in page content no longer block unused files).
* Delete leftover image sizes and hide removed files from the current scan.

= 1.0.1 =
* Scan classification fixes (options and attachment meta false positives).

= 1.0.0 =
* Initial release: scan, explainable results, mandatory validated backup, batch delete, restore and audit log.

== Upgrade Notice ==

= 1.1.0 =
Adds reclaimable-space KPIs and image preview on scan results.

= 1.0.5 =
Review links now open the full reviews page.

= 1.0.4 =
Renamed to IT Empower Media Audit. Existing scan data is migrated automatically.

= 1.0.3 =
First public package. Always review unused candidates before cleanup.
