soderlind / vmfa-rules-engine
Rule-based automatic folder assignment for media uploads
Fund package maintenance!
paypal.me/PerSoderlind
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 2
Type:wordpress-plugin
pkg:composer/soderlind/vmfa-rules-engine
Requires
- php: >=8.3
- yahnis-elsts/plugin-update-checker: ^5.6
Requires (Dev)
- brain/monkey: ^2.6
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- mockery/mockery: ^1.6
- phpcompatibility/php-compatibility: ^9.0
- phpunit/phpunit: ^11.0
- wp-coding-standards/wpcs: ^3.0
- dev-main
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- 0.4.1
- 0.4.0
- 0.3.3
- 0.3.2
- 0.3.0
- dev-protect/rule-folder
- dev-add/folders
- dev-dependabot/npm_and_yarn/lodash-4.17.23
- dev-upload/events
- dev-dependabot/npm_and_yarn/lodash-es-4.17.23
- dev-chage/icons
- dev-scan/more
- dev-scan/rule
- dev-requires/plugin
- dev-feature/settings-tab
- dev-exif/regexp
This package is auto-updated.
Last update: 2026-01-23 08:12:33 UTC
README
Rule-based automatic folder assignment for media uploads. Add-on plugin for Virtual Media Folders.
vmfa-rules-engine.mp4
Description
Turn "Default folder for uploads" into a powerful rule system. Automatically assign media to folders based on:
- Filename patterns — Match filenames using regular expressions (e.g.,
^IMG_,^DSC,screenshot.*) - MIME type — Sort by file type (images, videos, PDFs, etc.)
- Image dimensions — Organize by resolution (HD, 4K, thumbnails)
- File size — Separate large files from small ones
- EXIF camera model — Group photos by device (iPhone, Canon, etc.)
- EXIF date taken — Organize by capture date
- Upload author — Assign based on who uploaded the file
- IPTC keywords — Match embedded metadata keywords
Features
- Multiple rules with priority — Create as many rules as needed, drag to reorder
- Stop after first match — Control whether to continue evaluating rules
- AND logic — All conditions in a rule must match
- Automatic on upload — New uploads are processed instantly
- Scan existing media — Apply rules to your existing library with preview
- WP-CLI compatible — Rules apply to imports via
wp media import - Modern React UI — Consistent with WordPress admin design
Requirements
- WordPress 6.8+
- PHP 8.3+
- Virtual Media Folders plugin (parent plugin)
Installation
- Download
vmfa-rules-engine.zip - Upload via
Plugins → Add New → Upload Plugin - Activate via
WordPress Admin → Plugins
Usage
- Go to Media → Rules Engine in the WordPress admin
- Click Add Rule to create your first rule
- Configure conditions and select a target folder
- Enable the rule and save
- New uploads will automatically be assigned to folders based on your rules
Scanning Existing Media
- Click Scan Existing Media to preview what changes would be made
- Review the preview and select items to process
- Click Apply Changes to assign folders
Development
See docs/DEVELOPMENT.md.
License
GPL-2.0-or-later. See LICENSE.
Copyright 2026 Per Soderlind