Post revisions is a nice WordPress feature which tracks the revisions made in a post and helps you revert to an earlier version of the post, should you need to. This feature comes in really handy when you have accidentally made changes that needs to be reversed. However, there are a few reasons why you may want to turn off post revisions in WordPress and delete existing ones from WordPress database.
Why turn off post revisions in WordPress?
While post revisions is a handy feature, it will increase the size of your WordPress database significantly as you keep adding content to your blog. When you edit or compose a post in WordPress, you make several edits and WordPress keeps storing these revisions, should you need them later.
Honestly, I never needed post revisions since I use a text editor to compose the content. But when I started inspecting revisions on another blog where I used WordPress editor to compose posts, I found that each post had at least more than 5-6 revisions. That blog had more than 3000 posts which means the database was clogged with unnecessary revisions which were not required in the first place.
Please note that post revisions will not slow down your website or will not cause a lag in MYSQL queries. It is completely a myth that the higher the number of revisions, the slower your site is. WordPress is smart enough to load your website in a way that revisions do not affect the loading time of your website and neither the queries are dependant on how many revisions a post has. So if you are worrying about the loading time and user experience of your blog for post revisions, there is nothing to be concerned of on that front.
How to turn off post revisions in WordPress?
This is simple.
Edit the wp-config.php file and add the following line
, false );
After editing the file, please upload it back on the same directory and overwrite it. That’s all you need to do to turn post revisions off.
How to delete existing post revisions from WordPress database?
There are different ways to delete existing revisions from WordPress database. You can use phpmyadmin to delete post revisions, you can run MYSQL queries to delete post revisions made between a specific date range.
But the easiest way to delete old post revisions in WordPress is to use the Better Delete revision WordPress Plugin. You can use this plugin to remove all post revisions in one go or individually remove old post revisions for specific posts or pages.
Do you have a specific question with respect to WordPress post revisions? Please let me know in the comments and I will be happy to help.