How to Clean Up Your WordPress Media Library

Jellybean, the OG Nexus mascot: Clean Up Your Media Library

In September 2026 a crawl test left about 13,000 unused images in our own Media Library. Clearing that backlog took the uploads folder on og-nexus.com from 5.9 GB down to 2.2 GB, and it was slow, careful work. OG Media Cleaner, made by OG Nexus, is how we stop it building up again. It finds forgotten files and clears them out safely.

We run it on og-nexus.com, so this guide uses our own library as the example, mess included. The numbers below come from our live site on 27 November 2026.

What our own library looks like

Our Media Library holds 1,433 items. Of those, 1,408 are images. The uploads folder on the server takes up 695 MB.

That is a lot of pictures for one site, and at the time it ran in five languages. It is exactly the kind of library where forgotten files pile up without anyone noticing. Ours did.

How files go unused

A library gets messy for ordinary reasons:

You upload three versions of the same photo and use one.

You test an image and never use it.

You delete a page but forget the picture that belonged to it.

You replace a product photo and the old one stays behind.

Each file is small. Together they make the library slow to search, and they add weight to every backup.

The ways it can scan

OG Media Cleaner checks your content for references to each file. A reference is anything that tells WordPress "this page uses this picture". It offers several kinds of scan:

Media Library scan. Finds library items that no content seems to use.

Filesystem scan (Pro). Checks the physical uploads folder against the Media Library. It finds files on the server that the library does not even list.

Live Site Scan (Pro, coming soon). Reads the online version of your pages, which can catch images a builder adds.

Identical files. Looks for files with the same content in your uploads folder, even under different names.

What it found on og-nexus.com

Our last published scan was an identical-files scan on 14 November 2026. It lists 6 identical files, still waiting for our review. None are marked as ignored. Separately, Media Cleaner's own trash holds 6 thumbnail files that an earlier scan found were no longer needed.

Six is a small number for a library of 1,433 items. Compare that with the 13,000 we had to clear in September. That is our whole argument for scanning often: clutter is easy while it is small, and a real job once it is not.

It knows what it can read

A cleaner is only as good as its knowledge of your site. On og-nexus.com, OG Media Cleaner detects three systems it fully supports: WooCommerce, Elementor and OG Gallery. It reads product galleries, Elementor layouts, blocks, widgets and shortcodes.

It is also honest about its blind spots. It cannot see media that is:

Used only in PHP code, a theme template or an unsupported custom field.

Built in JavaScript, or added by an outside service.

Used on another site of a multisite, or on a staging copy sharing the same uploads.

So if your theme hard-codes a logo, the scan may list that logo as unused. Check results like that by hand before you act.

Trash first, delete later

The plugin never erases anything by itself. It gives you a list to review. When you clean, files go to Media Cleaner's own trash first. You can recover them from there if a page breaks.

Only when you empty that trash are files deleted for good. Anything you are unsure about can be marked as ignored, so it stops coming back in future scans.

A safe cleanup routine

1

Make a full backup of your WordPress files and database. Keep it off the website.

2

Run a scan with OG Media Cleaner.

3

Review each result. Keep anything a page, product, form, theme or plugin might use.

4

Mark doubtful files as ignored.

5

Move only clearly unwanted files to the trash.

6

Open your important pages, galleries and products. Check every picture still appears.

7

Empty the trash only once you are happy.

A tip from the WordPress side: the Media Library screen documentation explains the Unattached filter. It is a quick first look before a full scan. But unattached does not mean unused, which is why the deeper scan matters.

A few safety rules

Do not clean up during a busy sales period unless you have tested the process. Check featured images and shop products after a cleanup. If you are unsure about a file, keep it. A little extra storage is better than a broken page.

For technical users

The Pro version supports WP-CLI, so you can run scans over SSH. Media Cleaner can also be driven by an AI assistant through the MCP server in OG AI Core, once you enable MCP in its settings. The assistant is told which builders are supported and what the scan cannot see. Deleted files still go to the trash, and a permanent deletion always needs your explicit confirmation.

Who it is for

Busy websites with many old images and documents.

Online shops with products that have been removed or replaced.

Sites built with page builders, where media sits in many design areas.

Owners who want a review step before anything is deleted.

Getting it

See the OG Media Cleaner product page. For the same job on database rows, read our OG Database Cleaner guide. Or browse the whole range on the OG Plugins page.