Sometimes you want to clear up old posts and media on your blog to save space or because content is no longer relevant. This can be confusing.
Deleting posts does not save any file space at all. Text in posts and pages is kept in the database and not the file space your blog is allocated. To save space you need to delete media.
You can delete media from the media library, in that case the media. images, audio, video and documents will no longer show up in the posts they were added to.
There are three approaches that might help:
- Identifying posts that are no longer relevant and deleting the media uploaded to that post before deleting the post.
- Identifying media that is large and no longer needed and deleting the associated post as well.
- Deleting older posts and media
1. Identifying Posts
Edit the post.
- Click the Add Media Button.
- In the media page filter for Uploaded to This Post.
- Select an item and in the Attachment Details panel that appears on the right click Delete Permanently.
- Repeat until all the media is gone.
- Close the Add Media screen and in the post editor Move the Post to the Trash.
2. Identifying Media
In the dashboard go to the Media Library.
- Find media you want to delete. You might like to filter by Type or Date. Video will tend to take up the most space.
- Click on the media item you are going to delete.
- On the side panel there will be a link to the post the media is uploaded to, you can follow that link to see the post.
- There you can delete it or go through the process above to delete all media associated with it as well.
You can also identify media that is not attached to a post. These may be worth reviewing as WordPress does not think they are used on your site and should be able to be deleted safely. Personally I double check by searching for the media with the blog search facility too.
3 Deleting by date
You can sort your posts by date and bulk delete them from the posts page, as discussed above this will not save any space. But you can also filter Media in the library by date and bulk delete that.