Skip to content

Nalci/simple-media-file-renamer

Repository files navigation

Simple Media File Renamer

This plugin allows you to rename media files in the WordPress Media Library. It adds a simple input field to the media edit screen where you can enter a new file name.

Features

  • Universal compatibility: Works with any media file type (images, documents, videos, etc.)
  • Direct renaming: Rename files directly from the attachment edit screen
  • Automatic thumbnail regeneration: All thumbnail sizes are regenerated with the new filename
  • Database synchronization: All database entries are updated automatically
  • Scaled image support: Handles WordPress 5.3+ scaled images correctly (Learn more)
  • Conflict prevention: Generates unique filenames if the desired name already exists
  • GUID updates: Updates the GUID to match the new filename.
  • Clean database: No additional database tables or settings created
  • Character sanitization:
    • German umlauts (ß, ä, ö, ü) are converted (ä → ae, ö → oe, etc.)
    • Invalid characters are replaced with dashes (-)
    • Filenames are converted to lowercase
  • File extension preservation: The original file extension is preserved during renaming

Important Notes

⚠️ Content updates: This plugin only renames the physical files and updates database references. If you've used the filename in post content, you'll need to update those manually or use a plugin like Better Search Replace.

⚠️ Individual files only: Bulk renaming is not supported. The plugin is designed for renaming individual files through the media edit screen.

Installation

  1. Upload the plugin files to /wp-content/plugins/simple-media-file-renamer/ or install via the WordPress admin panel
    • To install via the admin panel, go to Plugins > Upload Plugin and upload the ZIP file of this plugin.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Go to any media file's edit screen to start renaming

Support My Work

If this plugin helps you, I'd be grateful for a small donation 🙏

Buy me a coffee on Ko-Fi

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages