Delete unused media

From TNG_Wiki
Jump to navigation Jump to search

Occasionally it happens on my site that suddenly I have tons of new media with no thumbnail and linked to nobody.

To get rid of these I run the following query.

Copy and paste the text between the lines into the MySQL section of your MySQL admin, IMPORTANT: Make a backup before you try anything and use this at your own risk!

DELETE FROM `tng_media` WHERE thumbpath = "" or thumbpath is NULL