Release v2.4.1
Bug fix — recommended for everyone using the file renaming module
The SEO-Friendly Upload File Renaming module was hooked to WordPress's global sanitize_file_name filter. That filter is not upload-specific: WordPress core, themes, and plugins run it over every string they treat as a file name, including generated CSS caches and temp files. The module therefore rewrote names it had no business touching:
| passed in | returned before the fix |
|---|---|
plugin_cache-layout-2728.css |
plugin-cache-layout-2728.css |
style_dynamic_theme.css |
style-dynamic-theme.css |
製品-カタログ.css |
css |
Any code that writes a cache file under its real name and then reads it back through sanitize_file_name() (or the reverse) silently missed. On a reported site this surfaced as the entire site header — logo and main menu included — rendering nothing at all, on every page, with no PHP error to point at the cause.
The fix
Renaming now runs on wp_handle_upload_prefilter and wp_handle_sideload_prefilter, so only files that are genuinely being uploaded or sideloaded are touched. Nothing else changes:
- The renaming rules are identical (accents transliterated, spaces and underscores to hyphens, non-ASCII stripped, lowercased)
- The date prefix option behaves the same
- The standalone-plugin conflict detection is unchanged
- Existing media files are still never renamed
If you turned the file renaming module off to work around a theme rendering incorrectly, it is safe to turn it back on after updating.
Verified
On a live WordPress 7.0 / PHP 8.2 install: sanitize_file_name() now passes cache-style names with underscores and non-Latin names through untouched, while Café Menü 2024.jpg still becomes cafe-menu-2024.jpg on both the upload and sideload paths, My Photo_01.PNG becomes my-photo-01.png, and the date prefix still yields 2026-08-06-cafe-menu-2024.jpg. PHP 7.4 and 8.2 lint clean; Plugin Check reports no code-level issues.
The same fix ships in the standalone Smart File Renamer 1.2.2, which shares this module's logic.
Full Changelog: v2.4.0...v2.4.1