0

In which version of wordpress was it implemented that the revisions to the posts will be saved. I need a version without that function or disable it- thanks

2
  • Perhaps you take a look here, you are looking for WP_POST_REVISIONS.
    – Charles
    Jun 10, 2020 at 0:29
  • excelent- Thank you
    – Oox
    Jun 11, 2020 at 17:12

1 Answer 1

1

It's not a good idea to run old versions of WordPress. Fortunately, you can quite easily turn off post revisions by using the wp_revisions_to_keep filter.

Add the following code snippet to a plugin, or to your active theme's functions.php file:

add_filter( 'wp_revisions_to_keep', 'wpse_368635_disable_revisions' );
function wpse_368635_disable_revisions( $revisions ) {
    // Setting the value to 0 will disable revisions.
    return 0;
}

This will disable post revisions, except for a single autosave. See Revisions for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.