Safely Deleting WordPress Post Revisions

Safely Delete WordPress Post RevisionsIn a previous post on optimizing WordPress, I suggested configuring WordPress so that revisions are not saved, and to delete old revisions to make the wp_posts table smaller and faster to query, but I didn’t mention how to do it. That’s because there is a little more to deleting old revisions than many posts on the web, and some plugins designed to delete revisions, would have you believe.

Several months ago, in his WordPress.org post “Deleting Post Revisions: do NOT use the a,b,c JOIN code you see everywhere,” kitchin, and the discussion that follows, provides an excellent description of the problems one may encounter when attempting to clean out old post revisions.  As you will find if you read that post, there is an easy way to safely remove old post revisions. You can even optimize your database tables while you’re at it. Continue reading “Safely Deleting WordPress Post Revisions”