Linux 软件免费装
Banner图

Media Library Cleaner

开发者 ts1wl
更新时间 2026年11月2日 20:08
PHP版本: 6.0 及以上
WordPress版本: 7.1
版权: GPLv3
版权网址: 版权信息

标签

media library clean uploads unused images media cleaner delete unused media

下载

1.0.5 1.0.7 1.0.10 1.0.9 1.0.11 1.0.6 1.0.8 2.0.0 2.0.1

详情介绍:

Media Library Cleaner scans your WordPress media library and identifies which files are actually in use and which are safe to delete, so you can clean up your uploads folder with confidence. Version 2.0 is a ground-up rebuild from the original release, with a new scanning architecture and admin interface. How The Scanning Engine Works Unlike lightweight scanners that only check the post_content column, Media Library Cleaner performs a deep inspection across your entire WordPress architecture. When a scan is initiated, every attachment in the media library is checked against: Batched Processing Architecture To handle enterprise-scale WordPress installations, the scanning engine uses batched processing. Instead of loading the entire database into memory, the plugin queries and processes content in strict batches. This architecture prevents PHP memory exhaustion and server timeout errors - and has been thoroughly stress-tested on environments containing over 60,000 posts. A live four-phase progress bar tracks the execution in real-time, displaying counts for:
  1. Initialisation
  2. Post scanning
  3. Metadata scanning
  4. Results loading
Results Dashboard Once the scan completes, results are loaded into a split-view dashboard separating Unused Files from Used Files. Deletion Mechanics & Safety Protocols Media Library Cleaner treats data destruction with the utmost caution. A prominent backup warning is displayed before any scan or deletion sequence can be initiated. Persistent Logging & Environment Data

安装:

  1. Upload the unused-media-scanner folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress Plugins screen.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Navigate to Tools > Media Library Cleaner in the WordPress admin menu.
  4. Review the Environment Info tab and perform a full site backup.
  5. Configure your Draft and Revision scan options, then click Run Scan.

常见问题:

Will this plugin cause PHP memory errors on large sites?

No. Media Library Cleaner utilizes a batched scanning architecture that processes database queries in chunks. This prevents the server from loading massive datasets into memory simultaneously, preventing timeout errors. It has been tested against databases with 60,000+ posts.

Does it support modern Layout & Design plugins?

Yes. The metadata scanner explicitly checks complex data arrays generated by Layout & Design builders such as Elementor and Beaver Builder, ensuring assets embedded within builder modules are correctly identified as "in use".

Are deleted files recoverable?

By default, WordPress permanently removes media files when deleted. Media Library Cleaner respects this core behaviour. However, if you have defined define( 'MEDIA_TRASH', true ); in your wp-config.php file, deleted files will be moved to the Media Library Trash rather than being permanently destroyed.

Why do some files fail to delete?

The plugin enforces strict WordPress capability checks on a per-item basis. If your user role lacks the required permissions to delete a specific attachment, or if the server directory lacks the necessary write permissions, the deletion will be refused. The exact reason for the failure is recorded in the persistent session log.

What information is stored in the persistent session log?

The log records the timestamp of the deletion run, the ID of the user who executed it, the total number of files targeted, and a granular breakdown of which specific files succeeded or failed (including the failure reason).

更新日志:

2.0.1 2.0.0 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1