Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5727

Limit the number of Post revisions


    • Icon: Task Task
    • Resolution: Merged
    • Icon: Should have Should have
    • 2.113.0
    • None
    • 2
    • Admin Panel, Performance, Posts, Technical Debt
    • Sprint #204, Sprint #218
    • phobos

      Currently we are keeping all post revisions from auto-save for ever. I experimented on a test instance with GPI prod data.

      1. Exported the DB and checked its size: 226M
      2. Delete all revisions except the ones save in the last week
      3. Exported DB again and checked its size: 134M

      The command I run in the experiment:
      wp db query < revisions.sql

      and the query:
      DELETE FROM wp_posts WHERE post_type = 'revision' AND post_modified < NOW() - INTERVAL 1 WEEK;

      So besides limiting revisions we can do a clean up.

      Relevant Documentation

            dtovbein Dan Tovbein
            nroussos Nikos Roussos
            Sagar Deshmukh Sagar Deshmukh
            0 Vote for this issue
            1 Start watching this issue