WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Blicki - Can I Empty wp_post_revisions Table in Database? (5 posts)

  1. imagiscapeca
    Member
    Posted 6 years ago #

    My revisions database/table is huge - 5 times the size of my posts table. If I empty it, will that affect the current posts?

    I couldn't find an answer in forums or documentation or anywhere, so I did a test, which answers my own question, and hopefully yours too:

    Using phpMyAdmin (accessed via my host's cPanel):

    1. I deleted one post's revisions, and the post remained intact as expected.

    2. I emptied the wp_post_revisions table - no problems resulted.

    3. I didn't need to empty wp_post_revision_ids - it wasn't a large file, but I didn't need a record of how many revisions I had made to posts, so I emptied it too - no problems resulted.

    In Conclusion:

    Yes.

  2. mystifier
    Member
    Posted 5 years ago #

    I wish!! In the current 2.6, there is no wp_post_revisions table; revisions and simply included in wp_posts and not so easy to get rid of.

    My table has grown massively with unwanted large posts that are unconditionally added. I am seriously contemplating reverting to 2.5.

  3. mystifier
    Member
    Posted 5 years ago #

    Simplest way now is to run SQL:

    Delete from wp_posts where post_type='revision';

  4. aouni-tahech
    Member
    Posted 5 years ago #

    Simplest way to disable the post revisions feature is to add the following code to your wp-config.php file:
    define('WP_POST_REVISIONS', false);

  5. flick
    Member
    Posted 5 years ago #

    Thanks for allthe solutions! :) Definitely going to be implementing this on my site(s)

Topic Closed

This topic has been closed to new replies.

About this Topic