Healthy filenames
The plugin uses the hooks “wp_handle_upload_prefilter” and “wp_handle_sideload_prefilter” and modifies the filename to remove all special characters. FEATURES – Remove accents – Remove special characters – Change the filename to lowercase – Convert non-Latin characters to Latin ones (requires the PH
About this tool.
The plugin uses the hooks “wp_handle_upload_prefilter” and “wp_handle_sideload_prefilter” and modifies the filename to remove all special characters.
FEATURES – Remove accents – Remove special characters – Change the filename to lowercase – Convert non-Latin characters to Latin ones (requires the PHP “intl” extension) – Optionally replace underscores with hyphens – Count the uploads that had to be cleaned and the ones that were already clean
Examples : – filename : rick & morty.png > rick-morty.png – filename : finaL fantasy / (Copié) (Copié).jpg > final-fantasy-copie-copie.jpg – filename : Привет.jpg > privet.jpg
The settings and the counters are in “Settings > Healthy filenames”.
Screenshots & previews.
Getting started.
- 01Upload the plugin files to the /wp-content/plugins/healthy-filenames directory, or install the plugin through the WordPress plugins screen directly.
- 02Activate the plugin through the ‘Plugins’ screen in WordPress
- 03Optionally adjust the cleaning in “Settings > Healthy filenames”
Frequently asked questions.
Are the files already in the media library renamed?
No. Only the files uploaded while the plugin is active are cleaned.
Which uploads are cleaned?
Every file that goes through the WordPress upload functions: media library, editor, REST API, imports from a URL.
Is the file extension changed?
No. The extension is left to WordPress, which validates it and converts it to lowercase.
What happens to non-Latin characters?
They are converted to Latin characters when the PHP “intl” extension is available: “Привет.jpg” becomes “privet.jpg”. Without it, or when the setting is unchecked, they are removed.