Title: deleting revisions
Last modified: June 4, 2018

---

# deleting revisions

 *  Resolved [znwd](https://wordpress.org/support/users/znwd/)
 * (@znwd)
 * [8 years ago](https://wordpress.org/support/topic/deleting-revisions/)
 * I am looking to use the plugin to display tables from a large and complex directory
   database. The data will be re-written every day and my understanding is that 
   all revisions are kept. Is there an option to overwrite the existing data so 
   that the website does not end up storing more than one copy of this data?
 * The plugin is brilliant and I hope that I can solve this problem so that I can
   use it on the website.
 * Best wishes
 * Zoe
    PS the plugin is used in a restricted area of the website so I cannot provide
   a useful link for you to look at

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/deleting-revisions/#post-10361414)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * To turn off WordPress revisions, you can use a WordPress constant, see [https://codex.wordpress.org/Revisions](https://codex.wordpress.org/Revisions)
 * Regards,
    Tobias
 *  Thread Starter [znwd](https://wordpress.org/support/users/znwd/)
 * (@znwd)
 * [8 years ago](https://wordpress.org/support/topic/deleting-revisions/#post-10364794)
 * Hi Tobias
 * Thank you for the reply. I have looked at the link. Unfortunately the solution
   above will turn off revisions for the entire website which is probably not a 
   good thing.
 * However it does mention on that page a way to control revisions “per post” ([https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_revisions_to_keep](https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_revisions_to_keep)).
 * This appears to be a developer option so I wondered if you could implement the
   filter in tablepress so that you can chose the number of revisions of table(s)
   to keep?
 * Many thanks
 * Zoe
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/deleting-revisions/#post-10364828)
 * Hi Zoe,
 * you can actually do that yourself 🙂
 * Just add this to your theme’s “functions.php” file to limit the number of revisions
   for TablePress tables to 3:
 *     ```
       add_filter( 'wp_revisions_to_keep', 'tablepress_limit_number_of_revisions', 10, 2 );
       function tablepress_limit_number_of_revisions( $num, $post ) {
           if( 'tablepress_table' === $post->post_type ) {
       	$num = 3;
           }
           return $num;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [znwd](https://wordpress.org/support/users/znwd/)
 * (@znwd)
 * [8 years ago](https://wordpress.org/support/topic/deleting-revisions/#post-10364850)
 * thank you 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/deleting-revisions/#post-10364861)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘deleting revisions’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/deleting-revisions/#post-10364861)
 * Status: resolved