Deleting media files

  • Unknown's avatar

    I fear I have unused images in my media library.
    Before I delete a media file, can I find out whether and where it is used on my site?

    WP.com: Yes
    Jetpack: No
    Correct account: Yes

    The blog I need help with is: (visible only to moderators and staff)

  • Unknown's avatar

    You can filter for images that are unattached to posts. Although note that images used in sidebars that you may wish to keep may be included.

  • Unknown's avatar

    I fear I have unused images in my media library.

    Beyond the sidebar, header, etc., let me just add that Unattached doesn’t mean it isn’t in use somewhere on your site. Depending on the age of your site and how and where you uploaded an image, there was a time when images didn’t “attach” themselves correctly to a post or page.

    Once you delete an image, it’s permanently gone, so download your Media Library as a backup file before you delete anything. https://wordpress.com/support/export-your-media-library/

    My 2¢/Having said that, unless you are really pressed (haha) for space in your Media Library, it would be better to leave your Media Library alone. If you do need more space, consider upgrading to a higher plan to add more space or starting a new site if possible./My 2¢

  • Unknown's avatar

    Question: If a user downloads their Media Library as described in the link (resulting in a .tar file), is there also a method by which that file can then be uploaded into the Media Library of a subsequent or different WordPress (either .com or or .org) account or installation?

    It seems to me that there should be (what can be exported should be able to be imported as well.)

  • Unknown's avatar

    @thecybisarchive I just lost my original reply so will try to recreate it here.

    The Media Library export file is a backup file only.

    If you are moving your site to a different hosting service or even to a different address within WordPress.com (like from mysite.wordpress.com to mysite2.wordpress.com) you’ll want to export your entire site’s content. When the site is imported to its new home, the uploaded XML file should then transfer the Media to the new site. BUT, your WordPress.com website needs to be Public and online for that to happen. I.E. don’t delete your existing COM site until it all transfers.

    There’s more information in these support guides

    https://wordpress.com/support/export/

    https://wordpress.com/support/import/import-a-sites-content/

    https://wordpress.com/support/export-an-entire-website-with-a-plugin/

    Only attached media files will transfer.

  • Unknown's avatar

    *@justjennifer, I was only curious because I went through a whole export/switch thing the other day during the Classic Editor debacle and the Export/XML function did NOT include the Media Library. It was completely empty. The new (well, cancelled afterward but speaking about at that time) host said that “There are a number of limitations in the system that WordPress.com offers when migrating sites away from their service that can cause this.” (meaning the totally empty Media Library) I did was not aware of the .tar export function at the time, but think it’s odd that the suggestion to DL it from WP.com and then upload it to the new host was never mentioned.

    It’s a moot point because I ultimately decided to remain here at least until my almost-3-years-paid are finished, but the Media Library .tar file thing is good information to have in case I decide to relocate my site after that. Or if WP.com ever removes access to the Classic Editor for Personal accounts. I’d rather kill my site completely than ever have to use that hellish Block Editor, and after almost 10 years here that’s saying a lot!

  • Unknown's avatar

    @thecybisarchive If you’s take some time to read the support guides I pointed to you’d learn that the imported XML file has pointers to the Media Library files and transfers those files to the new site during import. That is why your COM site needs to be Public and online while you import the XML file to your new host. If you have more questions, please read those support guides and if necessary, open a new forum thread. Thanks.

    And apologies to @farehamvannestwin as we’ve taken this thread in a different direction.

    There is a fairly excruciating way to attempt to see where your images are being used, but it is a real slog if you have hundreds of images and I hesitate to mention it.

    Every media file has its own address which you can copy from the Media Library and then paste into the search bar on the Posts or Pages dashboards. Here, too, you might miss Headers or images in sidebars so YMMV.

    The better solution, if you are pressed for space and are able to do so, is upgrading from a free site to the annual Personal plan or create a new site.

    Cheers.

  • Hi @farehamvannestwin,

    You can manage your media files that you have previously uploaded to your site. All the files you’ve uploaded are listed in the media library with the most recent uploads first. You can view your media in a simple visual grid or as a list with columns. To switch between these views, use the icon located at the top-right corner of the Media Library screen. In the list view, you can see the pages or posts images were uploaded to. Here you can view the pages or post on which the file is being used. The files that haven’t been used anywhere will indicate that they are unattached. 

    Step 1: Login to your WordPress dashboard and navigate to Media > Library

    Hope this helps!

    Thank you

  • Hi  @farehamvannestwin,

    I just lost my original reply. I’ll continue here.

    You can manage your media files that you have previously uploaded to your site. All the files you’ve uploaded are listed in the media library with the most recent uploads first. You can view your media in a simple visual grid or as a list with columns. To switch between these views, use the icon located at the top-right corner of the Media Library screen. In the list view, you can see the pages or posts images were uploaded to. Here you can view the pages or post on which the file is being used. The files that haven’t been used anywhere will indicate that they are unattached. 

    Step 1: Login to your WordPress dashboard and navigate to Media > Library

    Step 2: Click on the View icon located at the top-right corner of the Media Library screen.

    Step 3: Select Classic view from the dropdown.

    Step 4: Above the media items, you’ll see a dropdown labeled All media items. Click on this dropdown and select Unattached and then click the Filter button to display all media files that are not attached to any posts or pages.

    Hope this helps!

    Thank you

  • Unknown's avatar

    @dikshasingh3005 as already stated at https://wordpress.com/forums/topic/deleting-media-files-5/#post-4069494 by @justjennifer, selecting Unattached media isn’t reliable depending on the age of your site. “Unattached doesn’t mean it isn’t in use somewhere on your site. Depending on the age of your site and how and where you uploaded an image, there was a time when images didn’t “attach” themselves correctly to a post or page.”

  • Unknown's avatar

    @justjennifer, no need to be snarky. I did read the guides even before posting here. My site has always been Public, it has never been set to Private even for a moment of the many years that I’ve been here. And it has always been either a Premium or a Personal site, never a free one.

    FYI, I have almost 6000 images on my site and so the manual-upload situation is exactly why I was upset about the export issue that I encountered.

    Have a nice day.

  • Unknown's avatar

    @thecybisarchive thank you for reading first. It certainly wasn’t my intention to be snarky. Sorry if it sounded that way.

    And if your images are Attached to their relative posts and pages, they should have transferred to your new site as a part of the XML file upload. If they didn’t, that would certainly be a reason to contact support or open a new thread just for that.

  • The topic ‘Deleting media files’ is closed to new replies.