Created
March 11, 2020 16:41
-
-
Save cyancey76/ff6f98bf83cd7593204fd1e0b927b264 to your computer and use it in GitHub Desktop.
#Wordpress #function - disable and remove post revisions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp post delete $(wp post list --post_type='revision' --format=ids) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wp_posts WHERE post_type = "revision"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('WP_POST_REVISIONS', false); | |
define('AUTOSAVE_INTERVAL', 300 ); // seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment