WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Want to have a Post Revision plugin (4 posts)

  1. Sup3R_B0Y
    Member
    Posted 2 years ago #

    I want to make a simple plugin to stop post revisions (via wp-config file and/or set how many days to retain revisions.) Also need a function to delete post revisions from MySQL database.

    Can anyone help with this?

  2. egado
    Member
    Posted 2 years ago #

    open wp-config.php

    example for max 5 revisions

    define('WP_POST_REVISIONS', 5);

    or disable revisions

    define('WP_POST_REVISIONS', false );

    --------

    delete revision (SQL command not in wp-config.php)

    DELETE FROM wp_posts WHERE post_type = "revision";

    or use this plugin for deleting old revisions:
    http://wordpress.org/extend/plugins/better-delete-revision/

  3. esmi
    Forum Moderator
    Posted 2 years ago #

  4. Sup3R_B0Y
    Member
    Posted 2 years ago #

    Thanks to both of you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.