PressTigers

Change Post Revisions by using WP-Config

WordPress provides a functionality of post revisions which consequently spares the past condition of a post or page. When a change is made then it gives us the facility to go back to the past variant of that post or page in future. It will include some additional records in your Database. If you have a restricted space of Database or you don’t need pointless records, then you can disable post revisions too.

Change Auto-Save Time:

You can change the auto-save time of your post or page using WP-Config. You just have to open wp-config.php file located in the root of your project and add the following line in it:

Default auto-save time of a post or page is 60 seconds but after adding this code, it will save your post or page automatically after 300 seconds. You can change the value as you desire.

Change the number of Post-Revisions:

You can change the maximum number of post-revisions to be stored. For this, add the following line in your wp-config.php file:

Now your system will only save up-to 3 revisions of the post. You can change the value as you desire.

Disable Post-Revisions:

If you don’t want to see post revisions at all, then simply add the following line of code in your wp-config.php and your website won’t store any revision of your post:

Delete Revisions from Database:

Use the following Database line to delete all the previous revisions from your Database:

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch