A well-known WordPress myth is that multiple post revisions can slow down your WordPress site. Well, this can be true to some extent. Post revisions can impact your WordPress site depending on your blogs, frequency of use, and the type of revisions made.
What Is The Post Revisions in WordPress?
Post revisions is a WordPress auto-save option that gives you the ability to go back a step to undo your current changes in any post or page that has been made, in other meaning it creates versions for your post to let you choose the correct one if there is something wrong happened.
Is The Post Revisions Important?
WordPress is software that is written decently. However, it is not strong enough to handle many revisions (database requests). In most cases, it’s not important and we recommended disabling it to save database space and optimize the overall site’s speed.
In fact, when you render the frontend or make changes to MySQL queries, you will see a drastic change in speed. Above all, post revisions can occupy lots of space in your database. This is why revisions must be handled and stored correctly.
You should remember that disabling post revisions in WordPress will not delete existing content.
How to Disable Post Revisions in WordPress Using wp-config File?
When you disable post revisions in WordPress, you will have the competency to save lots of space and critical data. The modification has to the done in your “wp-config.php” file. This is an important configuration file that controls the overall behavior of your WordPress sites.
So, how would you disable post revisions in WordPress? The next easy steps will help you achieve this goal:
- Login to Your cPanel.
- Navigate to Files Section.
- Click on File Manager Icon.
- Right Click on “wp-config.php” and Choose Edit.
- Add The Following Code at the end of “wp-config.php”.
As suggested by the syntax, the foremost status will prevent post revisions from being made on your WordPress site. This is a hard-coded value that is by default set to “true“.
How to Increase The Time Interval Between Autosave sessions?
The default time interval between two autosave sessions is 60 seconds, if you would like to increase it to keep the revisions feature and optimize the database speed at the same time. Add the following code at the end of the “wp-config.php” file to change the rate at which revisions are saved. (where 300 represents the duration in seconds)
How to Delete Old Revisions Manually in The Database?
As we cleared previously, disabling post revisions will not delete existing posts or pages. The current revisions will remain intact and untouched. If you wish to get rid of these files, you must delete them manually in the database.
- Login to Your cPanel.
- Navigate to Databses Section.
- Click on phpMyAdmin Icon.
- Click on Your Website’s Database Name.
- Click SQL Button.
- Add The Following SQL Code then Click Go Button.
DELETE FROM wp_posts WHERE post_type = "revision";
How to Delete Old Revisions Using a WordPress Plugin?
If you are not familiar with database queries and modification and always like to be on the safe side. Luckily, WordPress has many customized plugins to delete post revisions. One such plugin would be “Bulk Delete“.
Bulk Delete is a famous WordPress plugin that allows you to delete posts, pages, and metadata in bulk using many filters. After installation of the plugin, the delete process is easy using the plugin interface.
Best Free Plugins to Manage The WordPress Post Revisions