In this post, I will explain how to change file names in WordPress. When it comes to images and other media, you might or might not know about the importance of relevant file names. By file name, I mean the name of a file (in most cases the file will be an image) before you upload it. It’s what you see before the extension – .jpg, .png, .gif, and so forth. This is not the same as the title you can add in the WordPress panel once uploaded. That’s another useful function, but it doesn’t carry the same weight as the actual file name. The file name is reflected in the URL of the image, whereas the title simply reflects what the image is titled on your site specifically. You can change the latter any time you want; it’s a variable. Changing the file name isn’t as natural – and WordPress doesn’t make it easy for us – but it can still be done.
I was talking about the importance of relevant file names, and that’s why you should consider changing file names in the first place – even in case you already uploaded them. File names play a role in SEO and can help with site ranking. That is, when your files have relevant, keyword-rich names. We will look at what makes a good name, and how to change names of images and files you already uploaded to WordPress.
Files – What’s in a Name?
Whether already uploaded or not, we will discuss what a good file name is all about. ‘File’ refers to any kind of media, most commonly images, but also videos, audio samples, and documents. All of them have different file extensions. I will only go in depth about names, though, because extensions and formats don’t matter here.
There are essentially two ways to name files:
1. By using keywords that describe what’s in the image. Let’s say, you’re writing a post about success, and you’re using a metaphorical picture of a sunflower in a field with a pretty sunrise. The file would be named ‘sunflower-field-sunrise.png’ to describe the picture. While this name says everything about the picture, it says nothing about the topic you’re writing about. As you might have guessed, it would help you rank for those terms – sunflower, field, sunrise… So, you’re targeting people who Google for that, and not ‘success’.
2. By using your page/post title (or something else you want to rank for, but that’s often simply your page/post title). You can also name the file according to a heading title, if you’re using those, in case your image refers to a specific part of the page/post. It really depends on what you want to rank for, and what keywords people actually use when they are looking for information like yours. Just remember that, if you’re using an image inside multiple pages/posts, it’s probably better to use a file name that is relevant in either context.
A good file name reflects what the file should rank for. You now know that page/post title and file name should go hand in hand if you want your content to be more findable. I’m guessing that’s what you want. :-)
WordPress Plugin to Change File Names Later in the Game
So, you already uploaded your files in WordPress, and now you would like to change file names? Fear not – plugin to the rescue! Without a plugin that does the job for us, we would need to make changes directly in the database. I totally get it if you find that too technical. Especially if databases are new to you, it can be daunting to really understand how they work. The plugin ‘Media Rename’ at wordpress.org/plugins/media-rename brings relief, though. Before using it, I recommend you to backup your database and files. This eliminates any risk. To install it on your own WordPress website, go to your WordPress admin panel, choose ‘Plugins’ > ‘Add New’, and type in ‘Media Rename’. Install the one that mentions ‘By ShadowsDweller’. Now, head over to ‘Media’. Click on the list view option. You will see one column ‘Filename’, and this is exactly where you want to change the file name. Check all applicable files and type your desired file name for each one. Then choose the action ‘Rename’ to change file names. Done! Easy, right? If a file you renamed is already linked to a certain page/post, you will also notice that the file name and URL are automatically updated. This is extremely convenient.
Don’t forget to give your files a title, alternative text and – if appropriate – a caption as well. You can do that in the Media tab as well: hover any file, and click ‘Edit’.
I hope you enjoyed this post! If you did, please consider sharing it across one or more social media channels.