Thursday, April 23, 2020

WordPress Post Revisions Everything You Need to Know

WordPress post revisions are a helpful core feature that let you quickly view previous versions of your posts or pages, as well as see what changes have been made and restore one of those previous versions, if desired.In this article, we will cover everything that you need to know about WordPress post revisions. In addition to learning what revisions are and how they function, youll also learn how to:Access all the revisions for your postsCompare two revisions against one anotherRestore a revision to the WordPress editorChange how many revisions WordPress storesCompletely disable revisions by default in WordPress:Every time that you save a draft or publish/update a post, WordPress saves a copy of how the post looked at that exact moment as a revision.You can always go back in and access that specific revision to view it or restore it to the current version of your post. Its there forever.Additionally, each revision also tracks which user made the changes and when, which is helpful fo r keeping track of whos doing what with your content.How autosaves connect with revisionsRevisions are connected to another feature called autosaves. By default, WordPress will save a copy of your content every 60 seconds while youre editing it (this saved copy is overwritten every 60 seconds there can only ever be one autosave for each user).This is to help you avoid losing your content in the event of a browser crash or lost Internet connection.You can also access autosaves using the revision interface. Autosaves are labeled Autosave and are marked with red text, though, which makes them stand out from regular revisions.How to view WordPress post revisionsTo access revisions for your post, look for the Revisions option under Publish in the WordPress editor. Then, click the Browse link.Note, this option will only show up after you have at least two different versions of the post. If youve never edited the post before, you wont see it:In the Revisions interface, you can use the sli der to move between different revisions. Each time you move the slider, youll see:A version of the previous revision on the leftA version of the selected revision on the rightAs you drag the slider, youll also see:Who made each revision (helpful for multi-author blogs or working with editors)When the revision was madeTheres also helpful color-coding to indicate the specific changes that were made between each revision. For example:A green background indicates added contentA red background indicates deleted contentHow to compare different revisions against one anotherBy dragging the slider, you can compare two revisions but only in sequential order.If you want to compare two revisions that didnt happen sequentially, you can check the box for Compare any two revisions and then use the additional slider option to select the exact revisions to compare:How to restore a post revisionWhen you restore a post revision, you overwrite the current WordPress editor to restore the content from th e revision.To do this, all you need to do is select the revision that you want to restore with the slider and then click the Restore This Revision button:If you select an autosave, youll see Restore This Autosave instead:Once you click the button, youll be taken back to the WordPress editor and youll see the restored version. Youll need to save a draft or update the post to make the revision permanent, though.Of course, if you want to restore the version that you overwrote, you can always jump back into the Revisions area and restore the previous version from before you restored the current version. Its revision-ception!How to modify how WordPress handles post revisionsSome webmasters want to modify the WordPress post revisions system for performance reasons. By default, WordPress stores a separate revision every single time you make a change to a piece of content.If youre constantly editing and adjusting content, this can quickly add up.See, each time that WordPress saves a revisio n, it stores a complete copy of that revision in your sites database. This is, in part, why youre able to speed up your WordPress site by periodically optimizing your WordPress database to remove post revisions and other gunk.For this reason, some WordPress hosts, like WP Engine, will automatically disable revisions on all the sites hosted there.But if you want or need to do things yourself, there are two main ways to modify the WordPress post revisions functionality:Change how many revisions WordPress stores. You can, for example, cap the revision number at 10 so that WordPress deletes older revisions once it reaches 10 stored revisions.Completely disable revisions. Wed recommend limiting revisions over completely disabling them. But it is possible to completely disable the revision functionality.****Even if you disable post revisions, your database will still store all the revisions from before you disabled them. To fix this, you can use a database cleaner plugin.To perform both t hese actions in the most user-friendly way possible, the free WP-Disable plugin is a great option: Reduce HTTP Requests, Disable Emojis Disable Embeds, Speedup WooCommerce Author(s): optimisation.io - jody nesbittCurrent Version: 1.5.21Last Updated: August 24, 2018wp-disable.1.5.21.zip 80%Ratings 202,788Downloads WP 4.5+Requires It lets you manually adjust or disable the number of stored revisions. To use it:Install and activate the plugin from WordPress.org (heres how to install WordPress plugins)Click on the new Optimisation.io tab in your WordPress dashboardGo to the Admin tab in the plugins interfaceUse the drop-down beside Post revisions number. You can choose a number of revisions to save or select 0 to disable revisionsHow to modify WordPress post revisions via wp-config.phpWe dont recommend this option for beginners (stick to the plugin above). But if youre comfortable editing your sites wp-config.php file, you can also modify WordPress post revisions using WP_POST_R EVISIONS.To modify the number of revisions, use this code snippet:define( 'WP_POST_REVISIONS', 3 );Replace the number 3 with the desired number of revisions.Or, to completely turn off post revisions, you can set it to false:define('WP_POST_REVISIONS', false);Wrapping things upWordPress post revisions are a handy feature that allow you to quickly compare or restore older versions of your posts.While they are helpful, and we wouldnt recommend completely disabling them, they can clutter up your database if you constantly edit posts.For that reason, we recommend using the WP-Disable plugin or editing your sites wp-config.php file to cap the number of revisions. A number like 10 is a good starting place.Have any other questions about post revisions in WordPress? Leave a comment and well try to help out! Everything you need to know about #WordPress post revisions

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.