Zum Inhalt springen
Jetpack

Einzelne Produkte

Sicherheit
VaultPress Backup Scan Akismet Anti-spam
Performance
Website-Suche Boost VideoPress
Wachstum
Stats Social Newsletter SEO Blaze CRM
Verwaltung
Manage Mobile App

Produktpakete

Pro Tools für Sicherheit, Performance und Wachstum für deine WordPress-Website. Abgeschlossen Die vollständige Jetpack-Suite mit höheren Service-Limits.
Preise
Übersicht Was Jetpack AI für deine Website tut Skills WordPress-Superkräfte für deinen Agenten Dokumentation Deinen KI-Agenten verbinden und einrichten Erste Schritte ChatGPT, Claude oder einen Coding-Agenten verbinden Vergleichen Jetpack im Vergleich mit anderen WordPress-MCP-Konnektoren

Verbinde deinen KI-Agenten. Kostenlos.

Verbinde ChatGPT oder Claude und lass die KI deine Website betreiben – ohne kostenpflichtigen Tarif.

Für ChatGPT holen (wird in einem neuen Tab geöffnet) Oder nutze Claude (wird in einem neuen Tab geöffnet)
Support Anleitungen und Hilfe von unserem Team Dokumentation Anleitungen zu jeder Jetpack-Funktion Feature-Anfragen Request features and vote on ideas Blog Neuigkeiten, Produkt-Updates und Anleitungen
Über uns
Anmelden Erste Schritte
Sicherheit
VaultPress Backup Scan Akismet Anti-spam
Performance
Website-Suche Boost VideoPress
Wachstum
Stats Social Newsletter SEO Blaze CRM
Verwaltung
Manage Mobile App

Produktpakete

Pro Abgeschlossen
Preise
Übersicht Was Jetpack AI für deine Website tut Skills WordPress-Superkräfte für deinen Agenten Dokumentation Deinen KI-Agenten verbinden und einrichten Erste Schritte ChatGPT, Claude oder einen Coding-Agenten verbinden Vergleichen Jetpack im Vergleich mit anderen WordPress-MCP-Konnektoren

Verbinde deinen KI-Agenten. Kostenlos.

Verbinde ChatGPT oder Claude und lass die KI deine Website betreiben – ohne kostenpflichtigen Tarif.

Für ChatGPT holen (wird in einem neuen Tab geöffnet) Oder nutze Claude (wird in einem neuen Tab geöffnet)
Support Anleitungen und Hilfe von unserem Team Dokumentation Anleitungen zu jeder Jetpack-Funktion Feature-Anfragen Request features and vote on ideas Blog Neuigkeiten, Produkt-Updates und Anleitungen
Über uns Suchen
Anmelden Erste Schritte

Blog / Jetpack 101

How to Clean Up the WordPress Media Library: Remove Unused Images & Media

Avatar von Rob Pugh

Rob Pugh März 2, 2022 · 9 Min. Lesezeit


Auf dieser Seite

  1. Why you should clean up your WordPress Media Library
  2. What to do before you delete unused media files in WordPress
  3. How to clean up your WordPress Media Library
  4. What to do after you clean up your WordPress Media Library
  5. Remove unused images to keep WordPress running smoothly

9 Min. Lesezeit

As your WordPress website grows, you may end up accumulating hundreds, if not thousands, of images. While hosts aren’t usually stingy when it comes to storage space, it still makes sense to clean up your website. If you don’t, you might find yourself with a massive collection of unused media files that can slow things down.

Fortunately, WordPress makes it easy to both upload and delete media files. That means there’s no excuse not to tidy up your image collection from time to time. Once you do, you should see your site running more smoothly and your workflows improved.

In this guide, we’ll discuss why you may want to clean up your WordPress Media Library. We’ll then show you how to prepare for that process, two ways to do it, and some maintenance tips for when you’re finished. Let’s dive in!

Why you should clean up your WordPress Media Library

In your personal life, you may have plenty of good reasons to keep files you don’t access on a daily basis. For example, you might need to hold on to official documents or important receipts. But it can be more difficult to justify a large reserve of media files on your website.

Most hosting plans have a limit on storage, so even if you have a generous amount of space, you’re bound to run out if you’re not careful. And when it comes to websites, media files usually take up the bulk of your quota. This is especially true if you use high-resolution and non-optimized images, which take up a lot of room.

Consider how many images you use on average for pages or blog posts. Even on a modest website, it’s not uncommon to have hundreds of media files.

As you update landing pages, refresh blog posts, or add new products, old media files may no longer be needed. But if you don’t remove them from the library, they still sit there — taking up space and making it all the more difficult to find the right files. You don’t want to sift through dozens of pages of files to find that one photo you need right away. Like a tidy workspace, a well-organized media library is worth the effort for the time and frustration it might save you every single day.

WordPress media library with a variety of images

On occasion, having too many images on your server can also slow down your WordPress website. However, that’s usually only the case if you’re loading a page with a massive number of files and can easily be avoided by using a Content Delivery Network (CDN). 

More importantly, if your Media Library is packed, this can be carried over to your backups, especially if they’re not incremental. This can cause site migrations and restorations — in addition to backups — to take much longer than necessary.

What to do before you delete unused media files in WordPress

Before you start deleting files from your Media Library, we recommend that you back up your website in its entirety. That way, if you delete any files that you can’t re-upload from your computer, you can revert to that backup.

There are a lot of ways to back up WordPress. Depending on your web host, you might have access to automated backups that you can restore from your hosting control panel. But in most cases, your best bet is to use a WordPress backup plugin like Jetpack Backup.

With Jetpack Backup, every change you make to your site is saved to the cloud in real time. That means you won’t need to create manual backups before updating your site, and you’ll always have recent copies available if something goes wrong.

Alternatively, if you’re planning to delete a large number of media files from WordPress, you might want to use a staging site. When you’re confident that you didn’t delete any critical media files, you can push that site live.

How to clean up your WordPress Media Library

Cleaning up media files in WordPress is remarkably simple. There are two ways you can go about this process: through the WordPress dashboard and via File Transfer Protocol (FTP). 

1. Clean up media files in your WordPress dashboard

To get started, log in to your WordPress dashboard and go to Media → Library. When you do, the WordPress Media Library will open and you’ll be able to navigate through all of the images and videos you’ve uploaded to your site.

files in the WordPress media library

Deleting any single file within the Media Library is simple. Just click on the image or video that you want to remove and a window will pop up. The window will include a preview of the media file, relevant information, and its metadata.

individual media file with options in the Media Library

If you look at the bottom right corner of this screen, you’ll see an option labeled Delete permanently. Click on it and confirm your decision.

Although this process is simple, it can be very time-consuming if you need to delete a large number of media files. If that’s the case, you can return to the main screen of the Media Library and look for the Bulk Select button in the menu near the top of the page.

bulk select option in the Media Library

Click on Bulk Select, and choose the files you want to remove. When you’re ready, select the Delete permanently option at the top of the screen.

the option to permanently delete images in WordPress

WordPress will ask you to confirm the decision. After you do, the files will be gone. If you have multiple pages of media files, you’ll need to complete this process page by page.

2. Delete unused WordPress media files via FTP

Just as you can upload files to your media library via FTP, you can also use an FTP client to delete large numbers of media files at once. The advantage of this approach is that it can remove entire years or months of media files in a matter of seconds.

To get started, you’ll need to connect to your website via FTP. If you don’t have an FTP client, we recommend using one that enables you to preview media files, like SmartFTP or Cyberduck.

Most web hosts will provide you with a set of FTP credentials when you sign up for a plan. If you don’t have access to those credentials, you should be able to create a new FTP account through your hosting control panel.

Once you connect to your server, you’ll need to find the WordPress ‚root folder.‘ It contains all of the files and subdirectories that make up your website. Usually, it’s called something like public_html, public, www, or your website’s name.

When you locate the root folder, go ahead and open it. You’ll see a file structure that looks something like this:

files in the public_html folder of a website

Next, find your WordPress media files in the wp-content/uploads directory. Inside, you’ll see folders for every year that your website has been around. Each year will contain subdirectories for individual months.

folders within the uploads directory

If you know what media files you want to delete by name, you can select them in bulk, right-click anywhere within the client, and then choose the Delete option.

This is where an FTP client that shows previews for media files may come in handy (like ForkLift or Commander One). With this option, it will be easier to determine which files to delete, even when you can’t identify them by name.

What to do after you clean up your WordPress Media Library

After you delete all of the unused media files in your library, there are a few things we recommend you do to complete the cleanup process. Fortunately, with the right tools, they’re very straightforward tasks.

1. Disable attachment pages in WordPress

By default, WordPress creates a new page for every media file you upload to your website. They’re called ‚attachment pages‚ (or attachment posts), and in most cases there’s no reason to use them.

What’s more, if one of your images becomes popular (a lot of people are clicking on it), search engines might link to the attachment page directly. So you can end up getting clicks for a page that only includes an image or a video, and that doesn’t link to any other pages within your site.

After you remove unused images, you can end up with attachment pages that don’t have media files. That’s why we recommend disabling attachment pages entirely. This will also help keep your Media Library in check moving forward.

The easiest way to do this in WordPress is to use a Search Engine Optimization (SEO) plugin. You likely already have one installed, but if not, Yoast SEO and All In One SEO both include this feature.

If you’re using Yoast, go to SEO → Search Appearance → Media and look for the Media & attachment URLs option. Under ‚Redirect attachment URLs to the attachment itself?‘ select Yes, and Yoast will disable attachment pages for media files.

Yoast settings for media and attachment URLs

Alternatively, if you’re using All In One SEO, go to All in One SEO → Search Appearance, and select the Image SEO option from the drop-down menu at the top of the screen. On the next page, beside the Redirect Attachment URLs setting, select Attachment Parent.

attachment URL settings in All in One SEO

This option will automatically redirect users who land on attachment pages to the posts where those images can be found. If the images don’t exist anymore, the pages themselves won’t show up.

2. Check for missing images on your website

Unfortunately, when you’re cleaning up your WordPress library, you may accidentally delete some files that you didn’t intend to. You might not even notice until you’re browsing the website, and you run across a page that isn’t loading images you know should be there.

To avoid this, after you clean up your Media Library, we recommend that you check all of the main pages on your site to see if they’re missing any important images. If they are, you’ll need to re-upload those files or restore a recent site backup.

The easiest way to check large numbers of pages for missing images is to use a plugin like Broken Link Checker. This plugin can scan your site for broken links and images, so you don’t have to do so manually.

Once you install and activate this plugin, simply go to Settings → Link Checker and proceed to the Which Links to Check tab. Here, you’ll find multiple options for links and media files that the plugin can check. 

If you just want to make sure you’re not missing any images, select the HTML images option and then click on Save Changes.

settings for checking broken media links

Go to the General plugin settings tab and you’ll find an overview of any missing images the plugin was able to locate. If you see a message that says No broken links found, that means you’re not missing any images.

Now you can go back to working on updating and improving your site. In most cases, you won’t need to clean your Media Library again for at least a few months.

3. Optimize your remaining images

Images are usually some of the largest files on a WordPress site and, because there are so many, can really slow things down. This is a big deal because users hate slow sites and search engines do, too. 

Optimizing your images can go a long way without sacrificing quality. And this has the added benefit of taking up fewer server resources, which is particularly helpful on shared hosting plans.

The easiest way to do this is by using a WordPress image CDN like Jetpack. This tool automatically compresses images for fast delivery and even delivers the right file formats and sizes based on the device type a visitor is using. And all of this is done behind the scenes, without any work required on your end.

Remove unused images to keep WordPress running smoothly

If you’ve been running your website for a while, you probably have dozens of media files you’re not using anymore. That’s why occasionally cleaning up your WordPress Media Library is a wise idea. Removing unused images and files will free up storage and make your backups smaller and more manageable.

You can remove files directly from your Media Library in WordPress, or use an FTP client to delete them in large batches. Regardless of which approach you take, you’ll want to make sure to back up your site before deleting any files, and ensure that you haven’t thrown out anything essential when you’re done.

If you don’t have a backup solution in place, you’ll definitely want to check out Jetpack Backup. It saves your site in real-time, so you’ll have every single detail in case of emergency. Plus, it keeps an activity log so you can select the exact point in time to which you want to restore. 

All of this is stored off-site on WordPress‘ secure servers. So it won’t slow down your site and you can rest easy knowing your files are in good hands. 

Like Lade …
Avatar von Rob Pugh

Written by

Rob Pugh

Rob works on building tools for creators and their audiences. He's focused on building an open, calm platform that will be loved by bloggers, newsletter publishers, podcasters, and readers alike. He's worked on marketing and product for 15 years, primarily at Automattic, Mailchimp, and UPS.

Entdecke die Vorteile von Jetpack

Erfahre, wie Jetpack deine WordPress-Website schützen, beschleunigen und beim Wachstum unterstützen kann.

Tarife entdecken

Questions about this post? Ask in the support forum

Teilen


Keep reading.

More from Jetpack 101, newest first.

Alle Beiträge ansehen

Jetpack 101 Mär 31, 2026

WordPress Image SEO: 12 Techniques to Rank Higher & Load Faster

Are images helping or hurting your rankings? What can you do about it? 12 realistic ways to optimize your image strategy for more high-quality traffic.

Avatar von Jen Swisher Jen Swisher 14 Min. Lesezeit

Jetpack 101 Mär 26, 2026

WordPress Site Redirecting to Spam? Here’s How to Fix a Hacked Site

Uncover hidden malware, remove malicious code, and stop spam redirects fast — before they damage your reputation. Secure your WordPress site.

Avatar von Jen Swisher Jen Swisher 12 Min. Lesezeit

Jetpack 101 Mär 24, 2026

WordPress Form with File Upload: How to Create One in 3 Steps

How to create a secure file upload form in WordPress — fast. Add drag-and-drop uploads in just 3 simple steps. Plus, the top tool to keep…

Avatar von Jen Swisher Jen Swisher 5 Min. Lesezeit

Betreibe deine WordPress-Website KI-first.

Free to start, and AI agents are free to connect. Money back within 14 days on yearly plans.

Erste Schritte Jetpack kostenlos holen

WordPress-Plugins

  • Akismet Anti-Spam↗ (wird in einem neuen Tab geöffnet)
  • Jetpack↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Boost↗ (wird in einem neuen Tab geöffnet)
  • Jetpack CRM↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Protect↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Search↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Social↗ (wird in einem neuen Tab geöffnet)
  • Jetpack VideoPress↗ (wird in einem neuen Tab geöffnet)
  • VaultPress Backup↗ (wird in einem neuen Tab geöffnet)
  • WP Super Cache↗ (wird in einem neuen Tab geöffnet)
  • Herunterladen

KI

  • Jetpack AI
  • Skills
  • WordPress MCP

Partner

  • Partnerprogramm
  • Empfohlene Hosts
  • Für Hosts
  • Für Agenturen
  • Für Partner

Entwickler

  • Dokumentation↗ (wird in einem neuen Tab geöffnet)
  • Beta-Programm
  • Jetpack auf GitHub↗ (wird in einem neuen Tab geöffnet)

Hilfe

  • Wissensdatenbank
  • Foren↗ (wird in einem neuen Tab geöffnet)
  • Bewertungen und Erfahrungsberichte
  • Kontakt aufnehmen
  • Über Jetpack
  • Presse
Sprache auswählen Deutsch
  • English
  • Deutsch
  • Español
  • Français
  • 日本語

© 2026 Automattic Inc. Alle Rechte vorbehalten.

  • Nutzungsbedingungen↗ (wird in einem neuen Tab geöffnet)
  • Datenschutzerklärung↗ (wird in einem neuen Tab geöffnet)
  • DSGVO

Mit Sorgfalt erstellt von

Im App Store laden Bei Google Play herunterladen
Lade Kommentare …
  • Rebloggen
  • Abonnieren Abonniert
    Jetpack
    Schließe dich 53.352 anderen Abonnenten an

    Hast du ein WordPress.com-Konto? Melde dich jetzt an.

  • Jetpack
    Kurzlink kopierenBeitrag im Reader lesen
    Abonnements verwaltenRegistrierenAnmelden
    Melde diesen Inhalt
    Diese Leiste einklappen
%d