A very simple WordPress plugin that searches through files in a specified wp-content/uploads folder and adds them to the Media Library if they do not already exist.
- Allows the user to select a top-level directory inside
wp-content/uploads. - Scans the selected directory recursively, including any subdirectories.
- Creates a temporary JSON cache containing the files found during the initial scan.
- Processes the cached files in batches of 10 to reduce the likelihood of server timeouts during Media Library processing.
- Adds files that are not already present in the Media Library.
- Checks for both the original file and its WordPress-generated
-scaledversion before creating a new attachment. - Displays live progress and logging output while syncing.
- Skips files that are already in the Media Library.
- Skips WordPress-generated image sizes such as
-300x300or-1280x968. - Skips WordPress-generated
-scaledfiles. - Images added to the Media Library will generate the additional image sizes defined by WordPress, the active theme, or installed plugins.
The plugin works with file types supported by WordPress attachments.
Examples include:
- Images (
jpg,jpeg,png,gif,webp) - Documents (
pdf,doc,docx) - Other media files that WordPress allows in the Media Library
- The plugin does not modify or move files in the uploads directory.
- The initial directory scan creates a JSON cache in the plugin's
cachedirectory for batch processing. - Media Library processing is performed in batches of 10 files.
- Existing Media Library attachments are skipped.
- WordPress-generated image sizes and
-scaledversions are skipped to prevent duplicate attachments. - It is recommended to create a backup before running a large sync.
- This plugin is intended for administrative use and requires appropriate WordPress administrator permissions.
This is not an actively supported plugin. Use at your own risk.