WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to temporarily disable revisions.... I have noticed that wp_update_post is very slow and creates revisions I don't need. The fix could be to disable revisions before issuing wp_update_post and re-enable the feature once done....

share|improve this question
up vote 1 down vote accepted

To keep posts updated, I am working with WordPress 4.4 and to enable/disable post revisions programmatically use:

remove_action( 'post_updated', 'wp_save_post_revision' );
$post_id = wp_update_post( $arg );
add_action( 'post_updated', 'wp_save_post_revision' );
share|improve this answer

Seems this will do the job:

remove_action('pre_post_update', 'wp_save_post_revision');// stop revisions


add_action('pre_post_update', 'wp_save_post_revision');//  enable revisions again
share|improve this answer

Easiest way is to set WP_POST_REVISIONS contant to false, additional information about post revision management

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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