WordPress is a very database centric Content Management System, and like most systems the SQL database can be the best way to achieve a quick solution to an otherwise long and boring repetitive task. Here’s one of those tasks. I needed remove all the old thumbnails, due to bad sizing and thumbnail improvements. However I have over 100 posts, so I’ll be damned if I’m going to manually go through the WP dashboard and do it. Here’s a quick and easy way to kill all the thumbnails quickly via SQL
DELETE FROM wp_postmeta WHERE meta_key = '_thumbnail_id'
This will remove all thumbnail references on all posts and has_post_thumbnail() will return false.
If you needed to run this on a specific set of rows, you’d need to use an AND clause at the end of the above SQL
Note: Always run SQL commands like this on a testing server/localhost installation and have backups ready!
WordPress blogs are under attack after a old friend is back causing havoc. A worm is attacking WordPress blogs which are yet to be patched with the WordPress 2.8.4 release. This release, although contains minor changes is now probably one of the most important updates you will need to update to. This update fixes the security which this worm is using to exploit WordPress blogs, the worm is quite strong and therefore should not be taken lightly. Click for the full insight on the worm.