Dec 12 2007

Suicide Plugin for Wordpress: Mass clearance of Database

Published by admin at 3:00 am under Political Blogging, Tech Tips

I had reason to clear out the database on the Scottish Political News aggregator last night, as a blogger requested to be removed from the site - and that all previous aggregated posts from their blog be deleted.

Since the aggregator had been reading some full posts in error, so it was a reasonable request, but if you have attempted to clear out old posts, you will know that it usually comes down to one by one deletion - and is a prime pain in the backside that can take hours.

I chose to delete everything and start again, as the site needed reconfiguring to aggregate only excerpts from blog posts.

How to do a Wordpress Spring Clean

I used a plugin to help me.

20061211-wp-suicide-plugin-screenshot

The Wordpress Suicide Plugin

I used a Wordpress plugin called “Wordpress Suicide“, which works directly on the database. On this occasion I deleted 2650 posts in 5 seconds:

This was a fun one to write. What if you wanted to start over again? Just wipe the slate clean and start blogging without any baggage. Well, that’s actually hard to do unless you’re comfortable using the mysql client on the command line (or phpMyAdmin).

So I whipped up a little plugin that does just that, and no more. Install it, activate it, and you’re just a single click away from blogging salvation (or is it purgatory?). In other words, this plugin gives you the power to delete all your blog posts from the database in one fell swoop. You can also use it to delete categories, comments, links, and custom fields, as well as users and blog settings.

But take precautions

It is a very powerful plugin, but disastrous if used by mistake.

To avoid any risk of this whatsoever, after using the plugin I deactivated it in Wordpress then deleted the plugin’s files from the disk. If I need to use it again I will reinstall the plugin from scratch.

Of course, all readers of this blog have their databases backed up properly.

[tags], , [/tags]

One Response to “Suicide Plugin for Wordpress: Mass clearance of Database”

  1. Suicide by Wordpress | The Wardman Wireon 12 Dec 2007 at 7:28 am

    [...] You have heard of Death by Chocolate - try Suicide by Wordpress over at Poliblog Perspective. [...]

Trackback URI | Comments RSS

Leave a Reply