Disable WordPress Auto-save and Post Revision Control

/ Published in: PHP
Save to your folder(s)

Add the following code in theme's functions.php to disable auto-save and post revision completely.

Copy this code and paste it in your HTML
  1. define('WP_POST_REVISIONS', false);
  3. function disable_autosave() {
  4. wp_deregister_script('autosave');
  5. }
  7. add_action( 'wp_print_scripts', 'disable_autosave' );

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.