GoDaddy Help

Delete media in WordPress

Over time, it's easy for WordPress media libraries to become cluttered with images, videos, and other files that you no longer need. Deleting this unused media periodically keeps your library organized, minimizes your web hosting storage usage, and can give your site a speed boost by eliminating unnecessary files. Here’s how to permanently remove unused media from your WordPress site.

Select the media removal steps that meet your specific needs.

Delete individual media in the WordPress Dashboard

  1. Sign in to WordPress.
  2. From the WordPress Dashboard and on the left-hand menu under Media, select Library.
  3. Select the media you want to delete.
  4. From the Attachment details screen, select Delete permanently.
    ALT TEXT
  5. Read the pop-up message warning about permanently deleting the item from your site, and then, select OK. You have successfully deleted the media you selected!
    ALT TEXT

Back to top

Delete bulk media in the WordPress Dashboard

  1. Sign in to WordPress.
  2. From the WordPress Dashboard and on the left-hand menu under Media, select Library.
  3. Select Bulk select, and then select all the media you want to delete.
    ALT TEXT
  4. Select Delete permanently.
    ALT TEXT
  5. Read the pop-up message warning about permanently deleting the item from your site, and then, select OK. You have successfully deleted the media you selected!
    ALT TEXT

Back to top

Delete media with the Managed WordPress File Manager

  1. Go to your GoDaddy product page.
  2. On your My Products page, select Managed WordPress to expand the list of your sites.
  3. For the site you want to access, select Manage.
  4. In the upper-left corner of the page, select Settings.
  5. Under Tools and next to File Browser, select Open.
    Select Open
  6. Select the folder your media is stored in.
    Note: In a WordPress site, the media files are stored within the wp-content/uploads/ folder. The media is further distributed into folders based on when you uploaded the media files. As an example, if you upload media in January of 2025, the folder will be wp-content/uploads/2025/01.
  7. Select the media you want to delete, and then select Delete.
    ALT TEXT
  8. A confirmation screen will pop up with information about what you're deleting, select Delete. You have successfully deleted the media you selected!
    ALT TEXT

Back to top

Delete media with SFTP

Required: You'll need a standard file transfer protocol (FTP) app to connect and manage content for your site. There are many third-party FTP apps available; we recommend FileZilla.
Note: These steps assume you're using the FileZilla FTP app. If you're using a different app you'll want to use the instructions provided by the app developer to access SFTP.
  1. Sign in to your site with an FTP client (If you don't know your SFTP info, you can follow these instructions to view your hostname and username and change your password).
  2. In the Remote site area of FileZilla, select the folder your media is stored in.
    Note: In a WordPress site, the media files are stored within the wp-content/uploads/ folder. The media is further distributed into folders based on when you uploaded the media files. As an example, if you upload media in January of 2025, the folder will be wp-content/uploads/2025/01.
  3. Select the media you want to delete, right-click on your selection, and select Delete.
    ALT TEXT
  4. Read the pop-up message warning about deleting the media from the server, and then select Yes. You have successfully deleted the media you selected!

Back to top

Delete media with SSH

Warning: Using SSH to manage your content for a WordPress site requires advanced knowledge. Be sure to create a new backup before following these steps.
Required: You'll need the following to complete these steps:
  1. Connect to your site with an SSH app. (Find out how to Connect to my Managed WordPress server with SSH)
  2. Change the directory to the folder you want to delete media from.
    Note: In a WordPress site, the media files are stored within the wp-content/uploads/ folder. The media is further distributed into folders based on when you uploaded the media files. As an example, if you upload media in January of 2025, the folder will be wp-content/uploads/2025/01.
    Example:
    cd html/wp-content/uploads/2025/01
  3. Use the rm command to remove your media. Example:
    rm example-image-01.jpg
    ALT TEXT
    Note: You can view detailed information about these Bash commands on their man page. As an example for the rm command, you can type man rm into the command line to see the man page for rm.

If you need detailed methods for locating large files and directories, read our article on how to find areas of disk usage with SSH.

Back to top

More info

Share this article