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
- Delete bulk media in the WordPress Dashboard
- Delete media with the Managed WordPress File Manager
- Delete media with SFTP
- Delete media with SSH
Delete individual media in the WordPress Dashboard
- Sign in to WordPress.
- From the WordPress Dashboard and on the left-hand menu under Media, select Library.
- Select the media you want to delete.
- From the Attachment details screen, select Delete permanently.
- 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!
Delete bulk media in the WordPress Dashboard
- Sign in to WordPress.
- From the WordPress Dashboard and on the left-hand menu under Media, select Library.
- Select Bulk select, and then select all the media you want to delete.
- Select Delete permanently.
- 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!
Delete media with the Managed WordPress File Manager
- Go to your GoDaddy product page.
- On your My Products page, select Managed WordPress to expand the list of your sites.
- For the site you want to access, select Manage.
- In the upper-left corner of the page, select Settings.
- Under Tools and next to File Browser, select Open.
- 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 bewp-content/uploads/2025/01
. - Select the media you want to delete, and then select Delete.
- A confirmation screen will pop up with information about what you're deleting, select Delete. You have successfully deleted the media you selected!
Delete media with SFTP
- 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).
- 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 bewp-content/uploads/2025/01
. - Select the media you want to delete, right-click on your selection, and select Delete.
- 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!
Delete media with SSH
- An SSH app: we suggest PuTTY for Windows, or Terminal for macOS.
- Your SFTP hostname, username and password.
- Connect to your site with an SSH app. (Find out how to Connect to my Managed WordPress server with SSH)
- Change the directory to the folder you want to delete media from.
Note: In a WordPress site, the media files are stored within theExample:
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 bewp-content/uploads/2025/01
.cd html/wp-content/uploads/2025/01
- Use the
rm
command to remove your media. Example:rm example-image-01.jpg
Note: You can view detailed information about these Bash commands on their man page. As an example for therm
command, you can typeman rm
into the command line to see the man page forrm
.
If you need detailed methods for locating large files and directories, read our article on how to find areas of disk usage with SSH.