Advanced Media Rename Manager
Rename existing media files in your library with full control. Update SEO-unfriendly camera names, bulk rename product images, and let Switchboard automatically update all references throughout your site.
Use Cases
- Rename “DSC_0001.jpg” to “summer-vacation-beach-sunset.jpg” for better SEO
- Bulk rename hundreds of product images with patterns like “product-{id}-{counter}.jpg”
- Clean up imported content with consistent, descriptive filenames
How It Works
- Select one or more files in the media library
- Enter a new name or use pattern variables
- Switchboard renames the file on disk
- All references in posts, pages, and meta are updated automatically
- Optional redirects prevent broken links from external sources
Where to Find It
Single File Rename
- Go to Media → Library
- Click any image to edit
- Find the “Rename File” panel in the sidebar
- Enter a new name and click Rename File
Bulk Rename
- Go to Media → Library (list view)
- Select multiple files with checkboxes
- Choose “Rename Files” from Bulk Actions dropdown
- Click Apply to open the bulk rename modal
Settings
Configure in Switchboard → Media → Advanced Media Rename Manager.
All settings are global and affect every rename operation — both single file renames and bulk operations.
| Setting | Effect | Applied To |
|---|---|---|
| Default Renaming Pattern | Pre-fills the pattern field in bulk rename modal | Bulk modal default |
| Case Transformation | Converts filename to lowercase/uppercase/titlecase | Every rename |
| Maximum Filename Length | Truncates filename if it exceeds this limit | Every rename |
| Excluded File Types | Blocks or skips specified extensions | Every rename |
| Add Unique ID Suffix | Appends 3-character random ID (e.g., -a3f) | Every rename |
| Create Automatic Redirects | Creates 301 redirect from old URL to new URL | Every rename |
| Preserve Accented Characters | Keeps é, ñ, ü instead of converting to e, n, u | Every rename |
Default Renaming Pattern
Set the default pattern for bulk operations. This pre-fills the pattern field when you open the bulk rename modal.
Default: {title}
Case Transformation
Automatically converts all filenames to the selected case.
| Option | Result |
|---|---|
| Lowercase | summer-vacation.jpg |
| Uppercase | SUMMER-VACATION.jpg |
| Title Case | Summer Vacation.jpg |
| No Change | Keeps original casing |
Maximum Filename Length
Truncates filenames that exceed this limit. Default: 50 characters (excluding extension).
Excluded File Types
Comma-separated list of extensions to exclude from renaming. Example: pdf,zip,doc
Behavior:
- Single rename: Returns an error “This file type is excluded from renaming”
- Bulk rename: Silently skips excluded files and continues with others
This is useful for protecting certain file types from renaming, such as legal documents or archived files.
Add Unique ID Suffix
When enabled, appends a 3-character random ID to every renamed file to prevent filename conflicts:
summer-vacation-x7k.jpgCreate Automatic Redirects
When enabled, creates 301 redirects from old URLs to new URLs after each rename. Requires the Redirection plugin to be installed.
Preserve Accented Characters
Keep characters like é, ñ, ü in filenames instead of converting them to ASCII equivalents (e, n, u).
Pattern Variables
Use these variables in rename patterns:
| Variable | Description | Example Output |
|---|---|---|
{title} | Media title | beach-sunset |
{post-title} | Attached post’s title | my-blog-post |
{id} | Attachment ID | 1234 |
{date} | Upload date | 2024-11-21 |
{counter} | Sequential number | 001, 002, 003 |
Pattern Examples
| Pattern | Result |
|---|---|
{title} | summer-vacation.jpg |
product-{id}-{counter} | product-123-001.jpg |
{date}-{title} | 2024-11-21-beach-photo.jpg |
{post-title}-image | my-blog-post-image.jpg |
Single File Rename
The rename panel in the attachment edit screen shows:
- New Filename — Enter your desired name
- Current filename — Shows what it’s currently named
- Options:
- Update media title (checkbox)
- Scan for references first (checkbox)
- Rename File button
- Undo Last Rename button (when available)
Scanning References
Enable “Scan for references first” to see where the image is used before renaming:
- Posts containing the image
- Post meta fields referencing the file
- Options (widgets, theme settings)
This helps you understand the impact of the rename.
Bulk Rename
The bulk rename modal provides:
Pattern Field
Enter a pattern using variables. All selected files are renamed using this pattern.
Prefix and Suffix
Add text before or after the pattern result:
| Prefix | Pattern | Suffix | Result |
|---|---|---|---|
product- | {title} | -thumb | product-beach-sunset-thumb.jpg |
Options
- Update media titles — Match titles to new filenames
- Add category name as prefix — Prepends the media category
Progress Tracking
Bulk rename shows:
- Progress bar
- File counter (45 / 100)
- Current file being processed
- Final success/failure summary
Undo Capability
Made a mistake? Undo within 24 hours:
- Edit the renamed attachment
- Click “Undo Last Rename” in the rename panel
- Confirm the action
- Original filename is restored
Undo data expires after 24 hours. References are also reverted during undo.
What Gets Updated
When you rename a file, Switchboard updates:
| Location | What’s Updated |
|---|---|
| Post content | Image URLs and wp-image-* classes |
| Post meta | Custom field values containing the filename |
| Options | Widget content and theme settings |
| Attachment metadata | All thumbnail references |
Automatic Redirects
When enabled and the Redirection plugin is installed:
- Old URL → New URL redirect is created
- External links continue working
- Search engine rankings are preserved
- 301 (permanent) redirect status
Without Redirection plugin, no redirects are created, but internal references are still updated.
Best Practices
Backup before bulk operations. While undo is available for 24 hours, a full backup provides extra safety for large rename operations.
SEO-Friendly Names
Good filenames are:
- Descriptive (
red-running-shoes.jpgnotIMG_4521.jpg) - Hyphen-separated (
beach-sunsetnotbeachsunset) - Lowercase (avoid case sensitivity issues)
- Relevant to content (helps image search rankings)
Consistent Patterns
For e-commerce or portfolios, use consistent patterns:
- Products:
product-name-angle.jpg - Blog:
post-slug-featured.jpg - Portfolio:
project-name-01.jpg
FAQ
Will this break my existing links?
Internal links are updated automatically. External links (from other sites) will break unless you enable automatic redirects with the Redirection plugin.Does this affect thumbnails?
Yes. All thumbnail sizes are regenerated with the new filename base. Old thumbnails are deleted.Can I rename the same file multiple times?
Yes, but only the most recent rename can be undone. Previous names aren’t tracked for multiple undos.What if two files would have the same name?
The module automatically adds a number suffix (-1, -2, etc.) when conflicts occur. If unique ID is enabled, that also prevents conflicts.Does this work with non-images?
Yes. You can rename any media file type. Some extensions (like PHP) are blocked for security.How many files can I bulk rename at once?
Up to 200 files per operation. For larger libraries, run multiple batches.Why did my rename fail?
Common causes:
- File doesn’t exist on disk
- File permissions prevent renaming
- Filename contains invalid characters
- File type is excluded in settings (shows “This file type is excluded from renaming” error)
What happens to excluded files in bulk rename?
Excluded file types are silently skipped during bulk operations. The remaining files are renamed normally. Check your Excluded File Types setting if some files aren’t being renamed.Are ACF/custom field images updated?
Post meta values are updated via search-and-replace on filenames. Complex serialized data may need manual verification.Get access to all 147 modules with a single license