Disable WordPress Post Revisions To Optimize Speed? You would be doing worried about the number of Post Revisions in your WordPress blog. Revisions are stored in your blog for genuine purpose – to let you easily find, compare, and rollback to a version. However, some users might find the sheer number of revisions stored in your database as a headache – especially if the database space is limited or the site is already struggling with slow database queries.
Additionally, keeping the blog database clean and trim makes it more manageable and portable should you need to backup or migrate to a different server.
Here’s how you can disable the number of revisions stored for a post. Additionally, I will show you how to extend the auto-save interval.
Find the wp-config.php in the root directory of your WordPress installation:
Open the file in your favorite text editor and add the two lines of code:
<p><strong>Define ('AUTOSAVE_INTERVAL', 600); // auto save every 600 seconds - shivamrajput.com</strong></p> <p><strong>Define ('WP_POST_REVISIONS', false); // disable revisions – shivamrajput.com</strong></p>
Save the file and that should disable all future revisions to your content.
Your auto-save interval will now be increased to 600 seconds, which is 10 minutes.
Having said that, you’ll still see the existing revisions that are already stored in your database. To clean them up, you can directly run this query in your database (easily via phpMyAdmin):
DELETE FROM wp_posts WHERE post_type = "revision";
You may alternatively install a plugin that can do it for you without having to manually run database queries.
Either way, this will delete all previously stored post revisions from your database. New revisions will not be stored as you’ve already made the changes in the wp-config.php file.
I hope this guide to “Disable WordPress Post Revisions To Optimize Speed? It will help you. If you have any additional questions, feel free to ask me in the comments section below.
If you find this article informative, do share it with your friends!
I’m A Full-Time Blogger, Affiliate Marketer, YouTuber, and Founder of shivamrajput.com…! we provide you authentic information about SEO, SMO, PPC, Tech Tips & Tricks, affiliate marketing, and how to earn money through blogging.