Support » Fixing WordPress » Delete revision

  • To delete revision here is their solution:

    # DELETE a,b,c
    # FROM wp_posts a
    # LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
    # LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
    # WHERE a.post_type = ‘revision’

    I wonder if something is wrong with this request:

    DELETE FROM wp_posts WHERE post_type = “revision”;

    What is stored in postmeta?

Viewing 2 replies - 1 through 2 (of 2 total)
  • All sort of stuff are stored in post meta like all your revisions, auto saves, custom field values, and even accumulated plugin info. If you want to disable revisions and that method doesn’t work you can try the next best thing in this plugin:

    It works great.

    I have made a try with two local installation of WP, and it appears that deleting just revision posts leaves additionnal field in postmeta.

    I must conclude that the second and simpler query is bad (even if it is published as a solution by several bloggers).

    I suppose the plugin make use of the first one instead.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delete revision’ is closed to new replies.