By default, posts and pages in wordpress save previous versions when updates are saved.
This can be helpful if you need to refer to a previous version, but also creates additional overhead on your WordPress installation by storing additional records in the database for each update.
The steps below detail how to configure WordPress to limit the revisions. The process requires access to the WordPress files on the web server, specifically wp-config.php.
- Using FTP or your websites cPanel access, open the wp-config.php file in the root of your WordPress installation
- At the top of the file, below the <?php add the following code
- And save the changes.
- In this example we’ve configured 3 revisions, this will create four entries in the database – one for the published post and three revisions.
- If you have an existing post with more than 3 revisions the next time the post is updated the additional revisions will be removed from the database.