Code to Disable WordPress Post Revisions in Gutenberg Block Editor

# Disable WordPress Post Revisions
define('WP_POST_REVISIONS', false);

If you want to completely disable Revisions in WordPress on the context that it increases database size, add this code to your config.php file in the root directory (the public_html folder).

However, we never suggest this option. Instead you can limit the number of revisions. WordPress sometimes goes out of control OR your hosting provider can return Error 522. In this case your content may get erased.

Having some saved previous revisions, will help you restore your content. Here’s how you will limit the number of post revisions.