This is the web log of Tim Bennett, web designer. He also runs Texelate, offering the best web design Leeds, Yorkshire has to offer

SQL to delete all post revisions in WordPress

Thursday, April 16th, 2009 at 5:15 am

If you want to trim down your WordPress database here’s a MySQL query you can use to do so.

DELETE FROM wp_posts WHERE post_type = ‘revision’

If it doesn’t work, check your table name.

Leave a Reply

You must be logged in to post a comment. If you don't have an account register one now.

Do you need a website or web-related service?
I run an award-winning web design studio.