Why after a file is programmatically deleted, is there still a reference in the media library?
When you upload a file to Media Library, some data (mainly metadata like title, description, and so on) is stored in database. So if you delete file using unlink, you don’t delete any rows from DB – so the attachment will be still visible in Media Library. If you want to delete attachment from ML, … Read more