Forums

What plugin are people using to delete post revisions? (2 posts)

  1. slobizman
    Member
    Posted 1 year ago #

    I have used the Delete Revisions plugin successfully in the past, but read some messages recently that made me think twice before using it again until I know for sure it is still working with the latest release of WP.

    So, I like to do what others here use to get rid of post revisions. If you are not aware of the problem, they can increase the size of your posts table by many times, and are unnecessary. Deleting them and then optimizing your daatbase will improve performance.

  2. songdogtech
    Member
    Posted 1 year ago #

    You can do it yourself with phpmyadmin. Run this SQL query in phpmyadmin to delete revisions. Change the table prefix if you changed that when you first installed wordpress:

    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'

    Add near the top of wp-config.php to stop revisions:

    define ('WP_POST_REVISIONS', FALSE);

    Or select the number of revisions to keep:

    define('WP_POST_REVISIONS', 3);

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags