Planning a WordPress media library naming convention
Every WordPress media library starts out neat: hero-homepage.jpg, logo.svg, product-01.webp.
A year later, someone searches for “new final banner”. Four nearly identical files come back. Nobody can tell which one is actually on the site. (One of them is probably called final-final-v2.)
A naming convention helps you find and maintain media. But it should support the workflow, not turn filenames into a second metadata system.
A useful convention makes files recognisable, consistent and safe to reuse. It cannot replace alt text, captions, attachment context or product data. Decide what information belongs in the filename and what belongs in WordPress fields before renaming a large library.
Define what the name needs to do
Ask who searches the media library and how. A content editor may need the subject, product code, campaign or version. A developer may care about a component or screen. Include only stable information that helps a person identify the asset. Avoid encoding temporary status such as “latest” or “final” unless the team has a reliable process to update it. In my experience, “final” is the least reliable word in any filename.
Keep filenames short enough to scan. Use a predictable separator, avoid spaces or special characters if your tooling handles them poorly and preserve the file extension. A simple pattern might combine content type, subject and a unique identifier, but the exact order should match the site’s catalogue and publishing needs.
Do not put customer names, email addresses, private campaign details or confidential information in filenames. A filename can appear in a URL, browser history or shared document. Use approved product identifiers where necessary and ensure they are not sensitive.
Use a source of truth for identifiers
If the site has SKUs, campaign IDs or content codes, confirm the format with the person who owns that data. Do not create a second informal code system that conflicts with the catalogue. A product image filename can include an identifier for internal search, while the product title and alt text remain written for people.
For repeated assets, decide whether the filename should identify the source image, its role or its placement. A single logo may be reused across the site; adding “homepage” to its name can make later reuse confusing. If crops or variants are separate files, name them so the relationship is clear without suggesting that one is current when it is not.
Respect public URLs and existing links
Renaming a file already used on a published site may change its URL. WordPress and plugins can update some references, but do not assume every content block, CSS rule, external link or feed will follow the change. Before bulk renaming, export or crawl existing media URLs and identify where they are used.
For a new upload, agree the filename before it is inserted into public content. For existing files, change names only when there is a maintenance reason and a plan for redirects or updated references. Check whether search engines or other sites link directly to the image file. Avoid changing hundreds of media URLs just to make them look tidier. I’d leave a messy old name alone before I’d risk breaking images across the site.
Keep editorial metadata separate
A descriptive filename can help a person recognise a file, but it is not a substitute for accurate alternative text. Alt text should describe an image’s function or information in context. Captions and titles have their own roles. Do not copy the filename into alt text automatically or stuff keywords into either field.
Use WordPress media fields consistently. Decide who writes alt text, when captions are needed and whether attachment page titles are used by the theme or plugins. The media library’s title field may be useful internally even when the filename remains short. Make sure editors understand the difference.
Plan folders, versions and duplicates
WordPress organises uploads by date by default unless the site is configured differently. If a team uses folders or a media-management plugin, confirm that the structure is compatible with backups, exports and existing URLs. Do not invent deep folder trees that duplicate the site’s content taxonomy and make assets harder to find.
Set a rule for source files, compressed web versions and design exports. Keep editable originals in the approved design storage if they are not needed in WordPress. Use a naming suffix or identifier for genuinely different image versions, not for every temporary export. Before uploading, search for duplicates and check whether an existing file is already used.
Test the convention with real work
Here’s the test I like: take a small batch of new assets and ask two editors to find the right image by filename alone. Check whether names remain clear in the media library, at the file URL and in a downloaded folder. Try a product with multiple images, an editorial illustration and a reusable brand asset. If the pattern causes confusion, simplify it before rolling it out.
Document the rule in the upload workflow and assign an owner to maintain it. Revisit it when the content model or catalogue identifiers change. A naming convention should be easy to follow without asking someone to memorise a long codebook.
When updating a file, keep a record of the new name and the pages that use it. If a previous asset must remain available for historical reasons, label it as archived in the internal system rather than leaving “old” in a public filename that may still appear in a page or search result.
Related reading
- Planning editorial approvals for a multi-author WordPress site
- Planning a WordPress content archive for a long-running blog
- Reviewing WordPress content revisions before a major update
A tidy media library starts with names people understand and a process that protects existing URLs. Pick one asset type, agree a short pattern and test it with the editors who’ll use it. Which file in your library is hardest to identify right now?