Renaming files can be a difficult task with WordPress. Luckily, Media File Renamer makes it super easy! With this plugin, you can rename files automatically and/or manually one by one or in bulk.
Before using the bulk actions, try renaming media items one-at-a-time. Once you’re comfortable with how the plugin works, then you should consider using the bulk actions.
Modifying files is a dangerous process. You should always have a backup ready before doing using this plugin (BlogVault is recommended).
Rename your files in WordPress
There are two main methods to rename your files (which you can use simultaneously) and on top of this, you can use a few tricks (lock/unlock) and options.
Method 1: Auto-Rename
There are three main ways to trigger the renaming process of your files automatically.
Changing the Title
In the Edit Media screen, if you change the title and hit Update, the file will be also renamed. You can also manually the media in the Filename box.
Clicking the “Auto” Button
When viewing your Media Libary in list mode, there is a “Renamer” column added to the screen. In the text field, you will see the current filename and by hovering your mouse over the “Auto” button, you will see the new file name. Clicking the “Auto” button will rename the file.
The Renamer Dashboard
This is the best place to manage the renaming of your media.. On the dashboard you can rename one by one, in bulk, and perform a bunch of other actions. You will also be able to easily see which files still need to be renamed. We will dig into this a bit later.
Methods for Auto-Rename
The Free version allows you to rename your files depending on the Media Title. The Pro version of the plugin adds more choices.
Attached Post Title
If you attached your Media entries to a particular post (page, product, or any other post type), you can have them renamed based on the title of that post. This feature is commonly used by users of WooCommerce who like to have their products named after the product’s title.
Alternative Text
Having descriptive Alternative Text on an image is a very popular way to optimize your site for the Search Engines. Media File Renamer can further your SEO efforts by using the Alt Text for the filename of the newly uploaded media. This option is one of our most popular options for those striving for high search engine ranking performance.
Anonymize with MD5
Use this option if you would like to keep your files as anonymous as possible, or with a unique-looking filename that doesn’t mean anything but look clean.
Method 2: Manual Rename
Once enabled, the input field containing the filename will be editable everywhere: in the Media Library, in the Media Edit screen, and in the Dashboard. You will have full control over the filenames.
Lock (and Unlock)
When a Media entry is “locked”, it will no longer be able to be renamed, and will not be part of any bulk actions. When you are done editing a Media entry, you can lock it to prevent further changes. Media File Renamer’s logic will lock it for you automatically when it’s logical to do so.
You can click on the lock at any time. It will either lock the entry, or unlock it. An entry will be locked automatically if you rename it manually, or if you undo its renaming. In the dashboard, you can bulk lock/unlock any number of your entries at once.
With this feature in mind, a recommended workflow is to do most of your work in the Pending section of the Dashboard. If a file needs renaming, either do it automatically or manually from there. If it doesn’t need renaming, you can simply lock it from that screen. Zero entries is the Pending section? You did it! For now 🙂
Optimize the Renaming Process
Bulk Actions
Bulk actions (analyze, rename, undo, lock and unlock) are performed from the Renamer Dashboard. There are two kinds of bulk actions: actions for selected entries, and actions for all entries.
Note: If you rename (or undo) in bulk all your entries, only the unlocked ones will be affected.
Auto-Attach
If you are renaming your files based on the titles of your posts (pages, products, etc), you might be very interested in this feature. You might also interested in this if you simply want to automatically attach your images to your posts.
By clicking on Auto Attach, the plugin will go through every unattached image and try to find where it is used. It analyzes the content of your posts, the featured image, etc, but it might not work if you are using a gallery system or a page builder.
Advanced Usage
Customization
If you need to customize or trigger the renaming, you can. There are many filters and actions you can use. Have a look at the Questions & Issues.
WP-CLI
The Pro version supports WP-CLI. The commands are self-explanatory. Here are a few examples.
To rename the Media entry #50:
wp media-file-renamer rename_auto 50
To rename many Media entries in one call:
wp media-file-renamer rename_auto 50 51 52 53
To rename the Media entry #50 to a specific filename:
wp media-file-renamer rename_manual 50 my-filename
To unlock all (see the Lock and Unlock section above) the Media entries:
wp media-file-renamer unlock_all
To rename all the Media entries (which aren’t locked):
wp media-file-renamer rename_all
Partners & Addons
Real Physical Media
With Real Physical Media, beyond the filenames, you can also rewrite the paths of your files. The plugin creates descriptive path names for your uploads that will lead you to a better ranking in image search engines like Google Images. It automatically creates the optimized path names based on the folder structure in your WordPress media library that you create with Real Media Library, and uses Media File Renamer in order to perform the modifications.