WordPress revisions are a useful feature, but they can significantly increase your database size over time. If you want to keep your site optimized and running smoothly, disabling or limiting revisions is a great way to reduce database overhead. In this article, we’ll explain what WordPress revisions are, how they impact your database, and how to reduce or disable them effectively.

1. What is a Revision in WordPress?

Disable and Reduce Revisions in WordPress

WordPress revisions are automatic backups of your posts and pages. Every time you edit a post, WordPress saves a new version (revision) so you can restore previous edits if needed. Revisions include:

  • Autosaves – WordPress automatically saves your work every 60 seconds.
  • Draft Revisions – Every update you make to a draft is saved as a separate revision.
  • Published Revisions – Changes made to published posts also get stored as revisions.
  • While this feature is useful for content creators, it can lead to database bloating over time, especially for websites with frequent content updates.

2. How Revisions Increase Database Size

Each revision is stored as a separate entry in the WordPress database, specifically in the wp_posts table. This means:

  • If you edit a post 20 times, WordPress may store 20 extra copies of it.
  • Large websites with multiple authors can accumulate thousands of revisions.
  • An increased database size slows down queries and affects site performance.
  • Backups take longer due to the unnecessary data stored.

For high-traffic or large-content websites, uncontrolled revisions can contribute to slow site performance and increased server load.

3. How to Limit & Reduce Revisions in WordPress

If you don’t want to completely disable revisions, you can limit the number of saved revisions instead. Here’s how:

Limit and Reduce WordPress Revisions via wp-config.php

Wordpress Reduce Revisions

Open your wp-config.php file in the WordPress root directory.

Add the following line before the /* That’s all, stop editing! */ comment:

define('WP_POST_REVISIONS', 5);

This will keep only the last 5 revisions for each post, automatically deleting older ones. You can change the number to suit your needs.

4. How to Disable Revisions in WordPress

If you don’t need revisions at all, you can disable them completely.

 

Disable Revisions via wp-config.php

Disable WordPress Revisions

Open wp-config.php , Add the following line before /* That’s all, stop editing! */:

define('WP_POST_REVISIONS', false);

This will prevent WordPress from storing any revisions in the database.

Delete Existing Revisions from Database
Even after disabling revisions, old revisions remain in the database. To remove them, run this SQL query in phpMyAdmin:

DELETE FROM wp_posts WHERE post_type = "revision";

 

💡 Tip: Always create a backup before running database queries!

5. Conclusion

WordPress revisions are helpful, but they can clutter your database and slow down performance. By limiting or disabling them, you can:

✔ Reduce database size
✔ Speed up queries and backups
✔ Improve overall site performance

If you need revisions, limit them to a reasonable number. If you rarely use them, consider disabling them entirely. This simple optimization can make a big difference in keeping your WordPress website fast and efficient Also Don’t Forget To Update WordPress Safely on a Regular Basis. 🚀

Leave a Reply

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