Media File Renamer

For cleaner & SEO friendly filenames

Do you run a popular website about WordPress, photography, or do you have another way to talk about my plugin? I can share a free license against some promotion of my plugins. As you might know, I don’t do any marketing, I prefer to focus on quality and support 🙂 If you are interested, contact me

It automatically renames your media filenames depending on their titles. When files are renamed, the references to it are also updated (posts, pages, custom types and their metadata).

Media File Renamer

A new column in the Media Manager will display to you the new ideal filename and a button will allow you to rename it straight away. You can lock and unlock the renaming automatic process through little icons.

File Renamer Little Icons


By default, this is done automatically depending on the title of your media. If you have the Pro version, this can be done also based on the title of the post (page or any other custom type) the media is attached to.

File Renaming Mode

There is also a little dashboard called File Renamer in Media that will help you rename all your files at once.

Media File Renamer - Dashboard

File renaming is a dangerous process. Before renaming everything automatically, rename one or two files first and check if all the references to them are still correct on your website.

Pro version

The Pro users are given a few more features like manual renaming, renaming depending on the post the media is attached to, logging of SQL queries and a few more options. With the Pro, a good process is to actually let the plugin do the renaming automatically (like in the free version) and to do manual renaming for the files that require fine tuning.

Media File Renamer - Edit Media

References update

WordPress has so many themes and plugins that this renaming process can’t unfortunately cover all the cases, especially if other plugins are using unconventional ways. If references aren’t updated properly, please write a nice post (not an angry one) in the support threads 🙂 I will try my best to cover more and more special cases.

Custom renaming

Do you need to create your own naming rules? Every language and website is different and some of us need that. You just add some code in your functions.php, or you can modify the mfrh_custom.php file shipped with the plugin. It works like this:

add_filter( 'mfrh_new_filename', array( $this, 'filter_filename' ), 10, 3 );

function filter_filename( $new, $old, $post ) {
  return "renamed-" . $new;

$new is the new filename proposed by Media File Renamer, $old is the old one, $post is the attachment. With this, you can do virtually anything. This example is simple, it just agreed with the new filename decided by the plugin but added “renamed-” in front of it. The filename that is returned must contain the extension. If the “Numbered Files” option is enabled, a count might be added.

If you want me to create a filter for you, you can hire me here.

I recommend you to use WPEngine or SiteGround. They are both excellent hosting services and work perfectly with all my plugins.