Limit or Disable Post Revisions in WordPress

What is a post revision you ask? Well, according to the WordPress Codex:

The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons).

But wait, that sounds like nothing but good. Why would I want to disable or limit post revisions? By disabling, or limiting, the WordPress post revisions you will free up space within your database. A smaller database means faster load times and less CPU usage.

To do this, take one of the snippets below and place it in your wp-config.php anywhere above the line “/* That’s all, stop editing! Happy blogging. */”.

Disable WordPress post revisions:

This snippet of code completely removes the ability to have revisions. It’s probably not the best choice, but it’s definitely an option.

Limit WordPress post revisions:

This snippet of code limits the post revisions to 10. You can replace 10 with any number that you want.

, , ,

No comments yet.

Leave a Reply