Unique Media File Folders
Change the default WordPress upload folder structure to a randomly generated one
by Johannes Siipola · github.com/creunafi/unique-media-file-folders · website
★ 8stars
80release downloads
≈10active sites
145composer installs
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/creunafi/unique-media-file-folders/releases/download/v3.0.1/unique-media-file-folders.zipAlso on Packagist as joppuyo/unique-media-file-folders:
composer require joppuyo/unique-media-file-foldersFrom the readme
Unique Media File Folders
Change the default WordPress upload folder structure to a randomly generated one. Each image and its thumbnails will be given an unique folder with a randomly generated name.
Why?
Because WordPress default media file paths are not very good. You either get year-month folders which may look funny if you are re-using content and is reminiscent of WordPress' blogging engine roots. The other option is to put all files into one folder which does not scale when you start to have a lot of files.
Too many files in a folder can lead to performance issues on filesystems like EXT4. If all your files are in the same folder, you’ll also run into file name conflicts.
How it works
Instead of the following file paths:
The plugin will generate the following paths:
How to install
1. Download latest version from the Releases tab
2. Unzip the plugin into your wp-content/plugins directory
3. Activate Unique Media File Folders from your Plugins page
Customizing folder depth
By default, folder depth is 1 so every file will be given its own folder. Customize folder depth using umfffolderdepth filter. For example:
Will yield the following folder structure:
How are
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v3.0.1 | May 17, 2022 | unique-media-file-folders.zip | 26 |
| v3.0.0 | May 17, 2022 | unique-media-file-folders.zip | 7 |
| v2.0.0 | Feb 13, 2019 | unique-media-file-folders.zip | 21 |
| v1.1.2 | Feb 2, 2019 | unique-media-file-folders.zip | 10 |
| v1.1.1 | Feb 2, 2019 | unique-media-file-folders.zip | 7 |
| v1.0.4 | Feb 1, 2019 | unique-media-file-folders.zip | 9 |
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.