---
title: How to Rename Media Files on Upload in WordPress
description: Rename WordPress media files on upload with a filename structure built from site URL, post title and filename. Setup, rules and Pro features.
url: "https://wpfactory.com/docs/intro-how-to-use-rename-media-files-on-upload-plugin/"
updated: "2026-09-27"
category: How to
---

# How to Rename Media Files on Upload in WordPress

To rename media files on upload in WordPress, install [Rename Media Files on Upload: WordPress Image SEO](https://wpfactory.com/item/file-renaming-on-upload-wordpress-plugin/). It renames every new upload from a filename structure, by default your site URL, the post title and the original filename. Settings are at **WPFactory > File Renaming**, in the General Settings, Rules and Advanced tabs.

## What it does

Files named `IMG_2043.jpg` tell search engines nothing about the image. Rename Media Files replaces the uploaded name with one built from rules such as `{siteurl}`, `{posttitle}` and `{filename}`, cleans out accents and special characters, and applies the same naming to everyone who uploads. It is a WordPress plugin and does not need WooCommerce.

## Install and activate

- **Free:** go to **Plugins > Add New**, search for **Rename Media Files: Improve Your WordPress SEO**, click **Install Now**, then **Activate**.
- **Pro:** download **Rename Media Files: Improve Your WordPress SEO Pro** from your [WPFactory](https://wpfactory.com/) account, upload it at **Plugins > Add New > Upload Plugin** and activate it.

![Uploading the Rename Media Files plugin to WordPress](https://wpfactory.com/wp-content/uploads/Always-first-step-1024x724.png)

See [installing the File Renaming on Upload plugin](https://wpfactory.com/docs/file-renaming-installation/) for more detail.

## First setup

**Enable plugin** is on by default, so new uploads are renamed as soon as the plugin is active. To check and adjust the naming:

1. Go to **WPFactory > File Renaming** and open the **General Settings** tab.
2. Confirm **Enable plugin** is checked.
3. Review **Filename structure**. The default is `{siteurl}{posttitle}{filename}`, with `-` as the **Character(s) used to separate rules** and a **Max length** of 200. To keep only the cleaned original name, change it to `{filename}`.
4. Click **Save Changes**.
5. Upload an image from inside a post or page (so `{posttitle}` has a value) and check the new filename in the Media Library.

![Rename Media Files settings location under the WPFactory menu](https://wpfactory.com/wp-content/uploads/Step2.-file-1024x495.png)

![Filename structure options in Rename Media Files](https://wpfactory.com/wp-content/uploads/msedge_J1mXQjWj9p-1024x495.png)

For every token and its options, see the [filename structure placeholders reference](https://wpfactory.com/docs/filename-structure-placeholders-reference/) and [configuring the filename structure](https://wpfactory.com/docs/filename-structure-configuration/).

## Main features

### Rules for building the name (Rules tab)

**Filename**, **Datetime**, **Post title** and **Site URL** are free. The Filename rule also converts characters, removes non-ASCII characters and can truncate the name. **Post title** falls back to the original filename when the post has no title (**Use filename on empty title**, on by default). Pro adds **Custom string**, **Post Slug**, **Post ID**, **Upload date**, **User ID**, **User Role**, **Username** and **Product SKU**. See [understanding file renaming rules](https://wpfactory.com/docs/file-renaming-rule-guide/).

![Filename conversion rules in Rename Media Files](https://wpfactory.com/wp-content/uploads/Step4.-file-1024x495.png)

![Dynamic filename component rules in Rename Media Files](https://wpfactory.com/wp-content/uploads/step42.-file-1024x495.png)

![User and product rule tokens in Rename Media Files](https://wpfactory.com/wp-content/uploads/Step43.-file-1024x495.png)

### Permalinks and the Gutenberg title fix (Free)

**Update permalink** (default: off) sets the attachment permalink from the filename structure. **Gutenberg title fix** (default: off) fixes the empty title on uploads from the block editor.

### Automatic ALT text and media titles (Pro)

**Alt attribute** can stay as it is (default) or be set from the original filename or from the filename structure. **Media title** can stay as it is (default) or follow the filename structure. Both can update on new uploads and when the file is renamed, with an option to replace the separator with spaces. See [how to automatically generate image ALT text and titles](https://wpfactory.com/docs/automatically-generate-image-alt-text-and-titles/).

![Alt attribute and media title options in Rename Media Files](https://wpfactory.com/wp-content/uploads/step-33.-file-1024x499.png)

### Rename existing files and keep links working (Pro)

**Change filename manually**, **Update media reference** (updates links in post content when a file is renamed), **Update on post saving**, **Update media on post update** and **Schedule Filename Update** handle files that are already in your library. See [how to bulk rename existing media files](https://wpfactory.com/docs/bulk-rename-existing-media-files/) and [monitoring background processes](https://wpfactory.com/docs/background-process-monitoring/).

![Media reference update options in Rename Media Files](https://wpfactory.com/wp-content/uploads/step32.-file-1024x495.png)

### Custom field and taxonomy rules (Pro)

Use a post's custom field value or taxonomy terms in the name with **Custom field rule** and **Taxonomy rule**. See [how to rename files by custom field or taxonomy](https://wpfactory.com/docs/rename-files-by-custom-field-or-taxonomy/).

### Limit who and what is renamed (Pro)

**Allowed user roles** and **Allowed post types** restrict renaming to chosen roles or to files attached to chosen post types. See [how to restrict file renaming by user role or post type](https://wpfactory.com/docs/restrict-file-renaming-by-user-role-or-post-type/).

![Scheduling and user role options in Rename Media Files](https://wpfactory.com/wp-content/uploads/step3-4-.file_-1024x495.png)

### Exceptions (Advanced tab)

**Ignore files with no extension**, **Ignore file extensions** (default `tmp,log`) and **Ignore filenames** are free and on by default; **Ignore filenames by Tag** is Pro. See [advanced options for file renaming](https://wpfactory.com/docs/advanced-file-renaming/).

![Advanced renaming exception options in Rename Media Files](https://wpfactory.com/wp-content/uploads/Step5.-file-1024x495.png)

### Compatibility (Pro)

The **Compatibility** tab has options for BuddyBoss, Gravity Forms and WPForms uploads. See [compatibility settings](https://wpfactory.com/docs/compatibility-settings/).

![Compatibility options in Rename Media Files](https://wpfactory.com/wp-content/uploads/Step6.-file-1024x495.png)

## Free vs Pro

| Feature | Free | Pro |
| --- | --- | --- |
| Rename on upload with Filename structure, separator and max length | Yes | Yes |
| Rules: Filename, Datetime, Post title, Site URL | Yes | Yes |
| Rules: Custom string, Post Slug, Post ID, Upload date, User ID, User Role, Username, Product SKU | No | Yes |
| Update permalink, Gutenberg title fix | Yes | Yes |
| Alt attribute and Media title automation | No | Yes |
| Change filename manually, Update media reference, Update on post saving, Update media on post update | No | Yes |
| Schedule Filename Update and Background Process tab | No | Yes |
| Custom field rule, Taxonomy rule | No | Yes |
| Allowed user roles, Allowed post types | No | Yes |
| Ignore files with no extension, Ignore file extensions, Ignore filenames | Yes | Yes |
| Ignore filenames by Tag | No | Yes |
| Compatibility tab (BuddyBoss, Gravity Forms, WPForms) | No | Yes |

See [Rename Media Files: Free vs Pro](https://wpfactory.com/docs/pro-vs-free-rename/) for more.

## FAQ

### Does it rename files already in my Media Library?

The free version renames new uploads only. Renaming existing files (manually, on post save, in bulk or on a schedule) is Pro. See [how to bulk rename existing media files](https://wpfactory.com/docs/bulk-rename-existing-media-files/).

### Why did my file get a blank or odd name?

When you upload outside a post, `{posttitle}` has no post to read. With **Use filename on empty title** on (default), the original filename is used instead. See [blank filename when the post title is empty](https://wpfactory.com/docs/media-blank-filename-post-title-empty/).

### How do I keep just the original filename, cleaned up?

Set **Filename structure** to `{filename}`. The Filename rule still converts special characters and removes non-ASCII characters.

### Can I stop some files from being renamed?

Yes. On the **Advanced** tab, list extensions in **Ignore file extensions** (comma separated, no dots) or exact names in **Ignore filenames**.

### My settings do not seem to save. What should I check?

See [renaming rules not saved after updating settings](https://wpfactory.com/docs/renaming-rules-not-saved-after-updating-settings/).

### Get more control

Renaming on upload with the core rules is free. [Rename Media Files on Upload: WordPress Image SEO](https://wpfactory.com/item/file-renaming-on-upload-wordpress-plugin/) Pro adds automatic ALT text and titles, renaming of existing media, extra rules such as Product SKU, and custom field and taxonomy rules. [See what Pro unlocks](https://wpfactory.com/item/file-renaming-on-upload-wordpress-plugin/).

Need a hand? Our team answers every ticket on the [Rename Media Files support forum](https://wpfactory.com/support/item/file-renaming-on-upload-wordpress-plugin/).

Related articles

- [Rename Media Files on Upload: Advanced Troubleshooting](https://wpfactory.com/docs/troubleshooting-rename/)
- [Rename Media Files on Upload: Specific Issues](https://wpfactory.com/docs/specific-issues-rename/)
- [Rename Media Files on Upload: General Settings](https://wpfactory.com/docs/general-settings/)
- [Rename Media Files Slows Down Admin / Triggers Slow Queries](https://wpfactory.com/docs/rename-media-slow-admin/)
- [Advanced Options in the File Renaming on Upload Plugin](https://wpfactory.com/docs/advanced-renaming-options/)
