If uploads get a blank filename because the post title is empty, turn on Use filename on empty title for the Post title rule on the Rules tab at WPFactory > File Renaming. It is on by default in Rename Media Files: Improve Your WordPress SEO and falls back to the original filename. Adding {filename} to your structure also helps.
Symptom #
- New uploads produce a blank or default (unnamed) filename.
- The media file appears in the library but its URL is missing or invalid.
Cause #
When the filename structure uses the {posttitle} token but the upload has no post title (for example, a direct Media Library upload, an auto-draft, or a post with an empty title), there is nothing for that token to resolve to, so the generated name can be empty.
Fix steps #
- On the Rules tab under WPFactory > File Renaming, keep the Post title rule’s Use filename on empty title sub-option (
use_filename_on_empty_title) turned on. It is on by default and was added in version 1.4.1. With it enabled, the plugin falls back to the original filename whenever the post title is empty. - Alternatively, avoid relying on
{posttitle}alone. Include{filename}or a date token in yourfilename_structureso every upload produces a valid name. - Save your settings, then upload a test file directly through the Media Library (not attached to any post) to confirm the naming is correct.
- If you import media through an external tool, make sure your rules are compatible with that workflow.
Need a hand? Our team answers every ticket on the Rename Media Files support forum.
