While you save a draft or replace a submit, WordPress shops a replica of the adjustments from the former model. This option is useful for those who ever wish to revert to a prior model of your content material, however those revisions take house to your database. In case you have numerous revisions, this will soak up your server garage and in all probability have an effect on your web page efficiency over the years. On this article, we’ll see how one can set up WordPress revisions to optimize your web page efficiency.

What We Imply through “WordPress Revisions”

A revision is only a stored replica of the adjustments in your web page and submit content material. WordPress routinely shops a revision each 60 seconds whilst your browser has a submit or web page open. It additionally shops a revision each time you click on to replace.

You’ll view the ones revisions to look all of the adjustments made between updates, and you’ll be able to additionally repair them to a prior revision. This is helping be sure you don’t lose an excessive amount of of your paintings if one thing is going flawed, akin to a pc crash or energy outage. It additionally provides you with a save level that you’ll be able to repair for those who alternate your thoughts on an edit. You’ll even revisit a unique model of your content material months later. They’re all saved within the WordPress database so that you can see.

The way to Repair Web page and Submit Revisions

Those saved WordPress revisions make it simple to revive your pages and posts to earlier variations. Let’s check out how one can repair revisions in each the vintage and Gutenberg editors.

The way to Repair Submit Revisions within the Vintage Editor

Restore Post Revisions in the Classic Editor

Within the Vintage editor, the record of revisions seems on the backside underneath the content material editor. Merely click on on a revision to look a comparability between that revision and the present content material or some other revision.

The way to Repair Submit Revisions within the Gutenberg Editor

Restore Post Revisions in the Gutenberg Editor

Within the Gutenberg editor, the collection of revisions is proven in a separate segment in the precise sidebar. Click on this to open the revision display.

Restoring a Submit Revision

Restore Post Revisions in the Gutenberg Editor

Clicking a revision in both editor takes you to the similar revision display. It presentations you the content material for the present date and time on one facet of the display, and what’s other from the present content material at the different facet. The present revision shows above the content material at the left. A slider and earlier and subsequent buttons on the most sensible display the more than a few revisions to match them. As you’ll be able to see on this instance, the revision display presentations the identify has modified.

Restoring a Post Revision

This revision presentations the identify and content material have modified from one revision to the following. To revive this revision, all you must do is click on Repair This Revision within the higher proper.

The place are WordPress Submit Revisions Saved?

WordPress web page and submit revisions are nice if you wish to have them, however additionally they use house to your database, and that may decelerate the full efficiency of the web page. Particularly websites with huge archives. Through the years, the database will get better with revisions you don’t want. This may upload as much as numerous revisions to your database. Thankfully, it’s simple to regulate WordPress revisions. In case you’re certain you don’t want them, it’s easiest to transparent them.

WordPress submit revisions are saved inside of your WordPress database. You’ll get admission to them in numerous techniques.

Warning: Making adjustments in your database will also be bad. You should definitely have a recent backup prior to making any adjustments.

Organize WordPress Revisions with phpMyAdmin

Accessing Post Revisions with phpMyAdmin

You’ll delete your revisions the usage of SQL. In case you have get admission to in your cPanel to your internet host’s dashboard, make a choice phpMyAdmin underneath Databases. Yours would possibly glance other from mine, however they must paintings the similar.

Accessing Post Revisions with phpMyAdmin

Make a selection the Databases tab within the phpMyAdmin dashboard, after which select the database you’d like to switch. Make notice of the desk prefix. You’ll use this within the SQL command. For mine, it’s blurred out somewhat, however it’s going to be no matter comes prior to the underscore. Similar to “wp21c9_”.

Accessing Post Revisions with phpMyAdmin

Make a selection the SQL tab, paste this snippet into the sector, and run the command.

DELETE FROM yourtableprefix_posts WHERE post_type = "revision";

This may increasingly take away all of the revisions in that database. Remember to substitute the instance yourtableprefix_ with yours.

Organize WordPress Revisions with FTP

Accessing Post Revisions with FTP

You’ll additionally prohibit the collection of revisions WordPress shops prior to they ever increase sufficient to decelerate your web page. For this, you’ll edit your web page’s wp-config.php document by means of an FTP client.

To find the world of the document this is categorized “WordPress Database Desk Prefix”, and paste those code snippets in it. This primary snippet is what is going to prohibit the collection of revisions your web page assists in keeping.

outline('WP_POST_REVISIONS', 3); 

By means of default, WordPress saves a revision each 60 seconds. This snippet permits you to alternate that period to one thing like 120 seconds. Be sure that to not set the autosave period too top, or you’ll be at a miles upper chance of dropping content material and paintings.

outline('AUTOSAVE_INTERVAL', 120);

Accessing Post Revisions with FTP

And above, you’ll be able to see what my wp-config.php document looks as if when I added those snippets.

And, if you need no revisions in any respect, you’ll be able to disable them totally with this code. I don’t suggest having 0 revisions stored, alternatively. That may be a surefire technique to lose content material sooner or later.

outline('WP_POST_REVISIONS', false);

As at all times, I like to recommend saving a backup prior to making adjustments, particularly to PHP information. And for those who’re now not comfy enhancing your PGP information, you’re now not by myself. It’s more secure to regulate your WordPress revisions with a plugin.

Organize WordPress Revisions with a Plugin


A plugin is the most efficient means of managing revisions for many customers. There are many just right choices, however I like to recommend WP-Optimize. It has loads of WordPress optimization choices and the unfastened model even comprises scheduling removing of WordPress submit revisions.


To optimize your submit revisions, cross to WP-Optimize > Database within the WordPress dashboard. This routinely opens the Optimizations tab. Take a look at Blank All Submit Revisions and click on Run Optimizer. On my check web page, I’ve 1,087 submit revisions in my database. And at this time, I don’t want any of them, so that they’re simply taking on house.


You’ll additionally agenda the clean-up to run routinely. Agenda it to run day by day or weekly, each two weeks, and even per 30 days if you need an extended buffer duration. Cross to the Settings tab within the WP-Optimize > Database settings. Below Agenda Blank-up Settings, take a look at to Permit Scheduled Blank-up and Optimization. Select the agenda kind (weekly is the default atmosphere). Take a look at Blank All Submit Revisions and save your settings.


It’s not exhausting to regulate WordPress revisions to optimize your web page efficiency. It’s just right to have a couple of to revive when important, however too many can soak up house to your WordPress database, and as we mentioned, if that continues unchecked, it may well have an have an effect on for your web page’s efficiency. Thankfully, there are a number of choices to regulate your WordPress revisions. Have in mind, for those who’re now not comfy heading into your PHP information, that’s positive. A easy optimization plugin is the most suitable option for many customers anyway.

We need to listen from you. Do you employ any of those tips on how to set up your submit revisions? Tell us about your revel in within the feedback.

Featured Symbol by means of hanss / shutterstock.com

The submit How to Manage WordPress Revisions to Optimize Site Performance seemed first on Elegant Themes Blog.

WordPress Web Design

[ continue ]