Issue
How can I remove Page Revisions in WordPress?
My goal is to reduce the database size.
I am using the code below, but page revisions are still enabled.
define ('WP_PAGE_Revisions', false);
Solution
Another use case is If you’re like most people, you’ll want to have a couple of post revisions for each post you add to your blog – just err on the safe side. The best way to accomplish this is to set a hard limit on the # of post revisions that are saved to the wordpress DB. You can try adding the following code (1 line) to your wp-config.php
define( ‘WP_POST_REVISIONS’, 3 );
What this line of code will accomplish is that it will save the 3 most recent post revisions instead all of the revisions and it will automatically delete as newer revisions occur.
Of course feel free to replace (3) with your ideal number of post revisions you would like to keep
Answered By - Dimitar Coklev Димитар Чоклев Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.