CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

WordPress 3 – Enable or Disable Revisions

Revisions feature is one of the great features in WordPress Content Management System. Revisions allow maintaining different versions of the post into the database. Whenever required we can restore the post from its revisions.

When the Revisions feature is enabled, WordPress maintains all the revisions and their information into the database tables; which increases the database size, and if the number of posts and their revisions are more, obviously there will be a performance hit.

Unfortunately, WordPress has not provided a user interface to enable/disable revisions features. But it allows enabling/disabling this feature using some configuration settings.

In this article, we will discuss enabling or disabling the Revisions feature in WordPress.

I hope you are already aware that WordPress uses the “wp_config.php” file for configuration settings. These settings will control the behavior of WordPress and its components. This is one of the important files in WordPress installation. This file contains your website’s base configuration details, such as database connection details, etc.

Follow the below steps to enable or disable Post Revisions.

Step 1. Login into your site control panel (eg: cPanel).

Step 2. Open “File Manager” and go to the location where the “wp_config.php” file exists.

Step 3. Open the “wp_config.php” file in Code Editor.

Step 4. Check whether the entry WP_POST_REVISIONS is defined in the “wp_config.php” file. Entries are defined using PHP’s define function.

If WP_POST_REVISIONS constant is not defined or edit the existing entry:

    • To enable revisions, place the below code into the “wp_config.php” file.
define('WP_POST_REVISIONS', true);
    • To disable revisions, place the below code into the “wp_config.php” file.
define('WP_POST_REVISIONS', false);

Step 5. Once you made the changes, save the “wp_config.php” file.

Step 6. Login in to your WordPress-based website as an administrator.

Step 7. Start adding new posts, and observe the following:

When the Revisions feature is enabled, you will see the “Revisions:” field under Publish section on the “Edit Post” page.

WordPress 3 - "Edit Post" page - Publish section
WordPress 3 – “Edit Post” page – Publish section

If the Revisions feature is disabled, WordPress will not display the “Revisions:” field and it is not allowed to maintain any revisions for the post.

**

WordPress 3 – Enable or Disable Revisions

Leave a Reply

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

Scroll to top