Return to Snippet

Revision: 24777
at March 10, 2010 21:17 by jessibird


Initial Code
DELETE a,b,c
FROM wp_posts a
WHERE a.post_type = 'revision'
LEFT JOIN wp_term_relationships b
ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id);

Initial URL
http://www.wprecipes.com/wordpress-tip-get-rid-of-unused-post-revisions

Initial Description
Just run the following query on your WordPress database, and all revisions (As well as meta associated with it) will be deleted from your database.

Initial Title
Get rid of unused post revisions

Initial Tags
wordpress

Initial Language
MySQL