How to get Elementor to stop saving so many revisions?

Rifat WordPress Tutorials Oct 28, 2021

WordPress is a popular CMS that we use to build websites. While creating a website, we often use pages, posts, and CPT (Custom Post Type) that are internal WordPress features. In order to keep a history of everything that has been made, WordPress applies to it a revision system. A revision is then a feature that stores on after a certain delay (60 seconds) changes that are made on either a post, a page, or a CPT. As Elementor uses CPT, building a page might create a huge amount of revisions which, can be a problem regarding the database size. This tutorial will then show you how to use Elementor history, by either explaining how it works or disabling that.

How To Disable WordPress Revision (Autosave)

Unfortunately, there is no direct way that will let you disable the autosave feature. But yes, you can disable autosave by decreasing the autosave amount. You must need to change a few lines of code. The wp-config.php file manages your autosave through WP_POST_REVISIONS. You can configure it by increasing or decreasing the time if you want.

Log in to cPanel and go to file manager. From there, go public_html and right-click on the wp-config.php file and click Edit. A pop-up window will appear. Click Edit to open the editor. If you are using an FTP client, you need to download that file and open it with your favorite text editor. Then look for the following code or add one if it doesn't exist before the line that says "Stop editing".

define( 'AUTOSAVE_INTERVAL', X ); 

Change the value of X that means seconds 1 for immediate page save or 999,999 for probably almost never to autosave. The setting interval of 86400 seconds is a day and so the autosave interval will be set for a day.

Create Amazing Websites

With the best free page builder Elementor

Start Now

How To Disable Or Limit WordPress Revisions

If you want to control the revision number of any page or post that shouldn’t consume more space, you can limit the number of post revisions to be saved in the database by performing the following steps. Also, you can completely disable it if you don't want any previous edits.

  1. Go to WordPress installed Directory.
  2. Open wp-config.php in any of your favorite text editor
  3. Add the following code,

For revision limit -

define(‘WP_POST_REVISIONS’, 3); 

You can set any number you might prefer.

For disable revision -

define('WP_POST_REVISIONS',false);

4. Save the changes and upload the same file to your WordPress installed directory.

How To Control Elementor History

We know that Elementor uses the WordPress revision feature. the History feature is also associated with this. This allows you to go back and forth on everything you did, no matter how much work you have done in the editor. By pressing the history button, you will see the Action and Revision tabs.

In the Action tab, you can see the logs of all the actions you did. By clicking on them, you can undo or redo what you have done at a certain moment in time. You will see the names of the actions or the names of the changes you have made. At the bottom of the Actions list, you’ll find the start point of your editing.

You can also use Ctrl+Z (Windows) or Cmd+Z (Mac) to undo your last action and Ctrl+Shift+Z or Cmd+Shift+Z to redo your last action.

In the Revision Tab Each time a page is updated, a new version is created. This is revision, so you can switch to any revision you have made before. Each revision item lists the date, time, and creator of the revision. Click on Apply to restore the revision on the current page. Click on discard to return to the current version of the page.

Elementor Revisions Drawback

The revision option is really unnecessary for a user who creates and modifies content offline, copies, and pastes online. The frustrating thing is that these revisions cannot be disabled or restricted directly from the WordPress dashboard as it is a core function of WordPress. Here are some issues that can generate problems because of autosave, and since there is no sign of WordPress developers to make this feature optional in the near future, we have to understand what problems this occurs.

Revision increase the Database Size

Each post stored in your database has a size. Every time it is revised its size increases. So the more modifications are made, the bigger the size of the database will be. I will try to explain to you through a small comparison of how much difference between a post without revision and revised post size.

Without Revisions:

Number of Pages / Posts500
Size of Each Page / Post50 KB
Database Size Without Revisions500 * 50 = 25000 KB = 25 MB

With Revisions:

Revisions per Page / Post5
Total Revisions500 * 5 = 2500
Size of Each Revision50 KB
Total Size of Revisions2500 * 50 = 125000 KB = 125 MB
Total Size of Actual Posts500 * 50 = 25000 KB = 25 MB
Total Database Size125 + 25 = 150 MB
% of Increase in Size(150 – 25) 25 * 100 = 500% (5 times)

Backup problems due to WordPress revisions

Although there is no problem in the hosting space due to the large size, this file size will make you suffer during MySQL database backup. According to the size shown above, when you upload all the content of a MySQL database to phpMyAdmin, it will take five times longer than usual, exceeding the time limit of exporting, which results in "Time Out" with incomplete backup. Again, if the file download limit is already set, such as 50 MB, you will not be able to complete the backup, which will result in a high risk of content loss.

The conflict between custom fields with revisions

Many developers have noticed that these WordPress revisions create conflict issues among custom fields created using some plugins. Undoubtedly, custom fields are more important to a live website than having tons of dead revisions that have no use.

Slow loading on WordPress editor

When we open a post in WordPress's local editor or Gutenberg editor, the latest files and the old revisions are activated, which reduces the editor's loading speed. So if the file autosave duration is increased, fewer files will be saved, and the chances of slowing down will be reduced.

Post revision and Autosave features are implemented for support for the users. We recommend you to follow the above techniques if you need to decrease the storage in your database. Share this with your mates and help them increase their site performance.

Summary

During this tutorial, we've talked a lot about WordPress Revisions which are used by Elementor to store revisions. Those willing to control WordPress revisions should perform some modifications on the wp-config.php. We've also explained what are the "Actions" and "Revisions" on Elementor's editor, which are significantly different from Revision. If you've enjoyed this tutorial, don't hesitate to share it on the social network. And follow us on Facebook and Twitter for more useful tutorials like this one.

Divi WordPress Theme