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

  1. Select one or more files in the media library
  2. Enter a new name or use pattern variables
  3. Switchboard renames the file on disk
  4. All references in posts, pages, and meta are updated automatically
  5. Optional redirects prevent broken links from external sources

Where to Find It

Single File Rename

  1. Go to Media → Library
  2. Click any image to edit
  3. Find the “Rename File” panel in the sidebar
  4. Enter a new name and click Rename File

Bulk Rename

  1. Go to Media → Library (list view)
  2. Select multiple files with checkboxes
  3. Choose “Rename Files” from Bulk Actions dropdown
  4. 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.

SettingEffectApplied To
Default Renaming PatternPre-fills the pattern field in bulk rename modalBulk modal default
Case TransformationConverts filename to lowercase/uppercase/titlecaseEvery rename
Maximum Filename LengthTruncates filename if it exceeds this limitEvery rename
Excluded File TypesBlocks or skips specified extensionsEvery rename
Add Unique ID SuffixAppends 3-character random ID (e.g., -a3f)Every rename
Create Automatic RedirectsCreates 301 redirect from old URL to new URLEvery rename
Preserve Accented CharactersKeeps é, ñ, ü instead of converting to e, n, uEvery 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.

OptionResult
Lowercasesummer-vacation.jpg
UppercaseSUMMER-VACATION.jpg
Title CaseSummer Vacation.jpg
No ChangeKeeps 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.jpg

Create 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:

VariableDescriptionExample Output
{title}Media titlebeach-sunset
{post-title}Attached post’s titlemy-blog-post
{id}Attachment ID1234
{date}Upload date2024-11-21
{counter}Sequential number001, 002, 003

Pattern Examples

PatternResult
{title}summer-vacation.jpg
product-{id}-{counter}product-123-001.jpg
{date}-{title}2024-11-21-beach-photo.jpg
{post-title}-imagemy-blog-post-image.jpg

Single File Rename

The rename panel in the attachment edit screen shows:

  1. New Filename — Enter your desired name
  2. Current filename — Shows what it’s currently named
  3. Options:
    • Update media title (checkbox)
    • Scan for references first (checkbox)
  4. Rename File button
  5. 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:

PrefixPatternSuffixResult
product-{title}-thumbproduct-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:

  1. Edit the renamed attachment
  2. Click “Undo Last Rename” in the rename panel
  3. Confirm the action
  4. 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:

LocationWhat’s Updated
Post contentImage URLs and wp-image-* classes
Post metaCustom field values containing the filename
OptionsWidget content and theme settings
Attachment metadataAll thumbnail references

Automatic Redirects

When enabled and the Redirection plugin is installed:

  1. Old URL → New URL redirect is created
  2. External links continue working
  3. Search engine rankings are preserved
  4. 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.jpg not IMG_4521.jpg)
  • Hyphen-separated (beach-sunset not beachsunset)
  • 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.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro