Learn about : How to disable post revision feature in wordpress so that database size can be reduced and website speed increases .
Hello Quantum Friends ,
WordPress has many features , one of them is Post Revision , but like evey goodness has some weaknesses post revision has too . In wordpress we can improve our post by modifying it any number of times but problem is that every time we modify it , wordpress can save it as a separate copies of modified post and display the latest . Hence this is not good for that users who has limited database space .
Hence they think that how to disable post revision so that our database size can be reduced and also increases the speed of website .
My friends here is the procedure for : How to disable post revision :
1. Firstly you have to download wp-config.php file on your computer from wordpress root directory from your server .
2. Now open the wp-config.php and add the following code and save .
define(‘WP_POST_Revision ‘ , false);
After that you have to upload this new file ( wp-config.php ) to server in wordpress root directory (From where you have already downloaded it ) .
Now you can see that this code will disable all your future revision to be saved .
Note : You should always remembered that this code will not delete your past revision , it applicable for future , that means in future there is no post revision .
If you want to delete your Old Post Revisions this task will be completed through your database :
Hence You have to visit PHPmyadmin and run the following SQL QUERY :
DELETE From WP_Posts
Where post_type = “Revision” ;
The above Query will delete all your previously saved post Revision from your database and hence your database size will be reduced & website speed increases .
Hello Friends , If you want to Limit your Post Revisions you can do it :
At first you have to decide how many post revisions do you want in your database , for example ; Suppose you think that your database should have three post revisions then you have to add the following code to wp-config.php file and save it .
define( ‘WP_POST_REVISIONS’, 3 );
After that you should upload this new file (wp-config.php) to server in wordpress root directory .