{"id":11241863,"date":"2019-02-24T14:24:18","date_gmt":"2019-02-24T14:24:18","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&#038;p=11241863"},"modified":"2026-05-01T08:35:58","modified_gmt":"2026-05-01T08:35:58","slug":"revisions","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/revisions\/","title":{"rendered":"Revisions"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider. The display indicates what has changed in each revision &#8211; what was added, what remained unchanged, and what was removed. Lines added or removed are highlighted, and individual character changes get additional highlighting. Click the &#8216;Restore This Revision&#8217; button to restore a revision.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-7.0.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">View revisions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To view revisions:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the Settings sidebar.<\/li>\n\n\n\n<li>Select the Page or Post tab.<\/li>\n\n\n\n<li>Click the number next to Revisions.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Since WordPress 7.0, clicking the revision opens a new revisions screen. If you are using WordPress 6.9 or earlier, see Classic Revisions below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"569\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-1-7.0-1024x569.jpg\" alt=\"Revisions screen with highlighted texts.\" class=\"wp-image-16367590\" style=\"border-width:1px\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-1-7.0-1024x569.jpg 1024w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-1-7.0-300x167.jpg 300w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-1-7.0-768x427.jpg 768w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-1-7.0-1536x854.jpg 1536w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-1-7.0.jpg 1860w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Revisions screen<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Top slider<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The revisions screen lets you see what changed in each revision by dragging the top slider.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Color indicators<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Next to the scrollbar, you will see colored markers that indicate where changes were made and how large they are. Click a marker to jump to that location.<br>Color meanings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Green: inserted content<\/li>\n\n\n\n<li>Red: deleted content<\/li>\n\n\n\n<li>Yellow: changed content<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Show changes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Show changes icon on the left side of the slider toggles the colored highlights on and off.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"376\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-3-7.0-1024x376.jpg\" alt=\"Show changes icon\" class=\"wp-image-16367592\" style=\"border-width:1px\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-3-7.0-1024x376.jpg 1024w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-3-7.0-300x110.jpg 300w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-3-7.0-768x282.jpg 768w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-3-7.0-1536x565.jpg 1536w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-3-7.0.jpg 1676w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Restore a revision<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To restore a revision:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Use the top slider to find the revision you want to restore.<\/li>\n\n\n\n<li>Click Restore.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Classic Revisions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In WordPress 6.9 and earlier, clicking the revisions number in the sidebar opens the classic revisions screen. In WordPress 7.0, you can also open this screen by clicking Open classic revisions screen in the sidebar.<br>The classic revisions screen shows a side-by-side comparison of the HTML version of the content.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-2-7.0-1024x577.jpg\" alt=\"Classic revisions screen\" class=\"wp-image-16367591\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-2-7.0-1024x577.jpg 1024w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-2-7.0-300x169.jpg 300w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-2-7.0-768x433.jpg 768w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-2-7.0-1536x866.jpg 1536w, https:\/\/wordpress.org\/documentation\/files\/2019\/02\/revisions-2-7.0.jpg 1998w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Like the new revisions screen, you can see what changed in each revision by dragging the slider or using the Next and Previous buttons.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The revisions page also includes a Compare any two revisions mode that lets you compare any two revisions. In this mode, the slider has two handles: one for the revision you are comparing from and one for the revision you are comparing to. Drag the handles to see the changes between any two specific revisions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Autosaves<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There is only ever a maximum of one&nbsp;<a href=\"\/support\/article\/glossary#autosave\">autosave&nbsp;<\/a>per user for any given post. New autosaves overwrite old autosaves. This means that no, your tables do not grow by one row every 60 seconds. In multi-user settings, one autosave is stored for each user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Autosaves are enabled for all posts and pages but do not overwrite published content. Autosaves are stored as a special type of revision; they do not overwrite the actual post. In fact, whether your power goes out, your browser crashes, or you lose your internet connection, when you go back to edit that post, WP will toss up a warning telling you that it has a backup of your post and a link to restore the backup. When reviewing revisions, autosaves are clearly marked.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Revision Options<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Limit the number of posts revisions that WordPress stores in the database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Filter_Reference\/wp_revisions_to_keep\">wp_revisions_to_keep<\/a>&nbsp;filter allows developers to easily alter how many revisions are kept for a given post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternately, the limit can be set in wp-config.php:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">define( 'WP_POST_REVISIONS', 3 );\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">WP_POST_REVISIONS:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>true (default), -1: store every revision<\/li>\n\n\n\n<li>false, 0: do not store any revisions (except the one autosave per post)<\/li>\n\n\n\n<li>(int) &gt; 0: store that many revisions (+1 autosave per user) per post. Old revisions are automatically deleted when the post is updated again.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Revision Storage Method<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Revisions are stored in the posts table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Revisions are stored as children of their associated post (the same thing we do for attachments). They are given a post_status of &#8216;inherit&#8217;, a post_type of &#8216;revision&#8217;, and a post_name of {parent ID}- revision(-#) for regular revisions and {parent ID}-autosave for autosaves.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, WP keeps track of the changes to title, author, content, excerpt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Revision Management<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Deleting: There is an API function to delete revisions, but there is no UI. That can certainly change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Displaying Rendered Revisions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Currently revision comparison &#8220;diffs&#8221; are rendered in Text (or HTML) view; proposed filters would allow plugin developers to customize diff encoding\/rendering. (see Trac ticket&nbsp;<a href=\"https:\/\/core.trac.wordpress.org\/ticket\/24908\">#24908<\/a>)<\/p>\n\n\n\n<div class=\"wp-block-group changelog has-very-dark-gray-color has-very-light-gray-background-color has-text-color has-background is-layout-flow wp-block-group-is-layout-flow\">\n<h2 id=\"changelog\" class=\"wp-block-heading has-medium-font-size\">Changelog <\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Updated 2026-05-01\n<ul class=\"wp-block-list\">\n<li>New revisions screen for WordPress 7.0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider. The display indicates what has changed in each revision &#8211; what was added, what remained unchanged, and what was removed. Lines added or [&hellip;]<\/p>\n","protected":false},"author":14216496,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false},"category":[86,78],"class_list":["post-11241863","helphub_article","type-helphub_article","status-publish","hentry","category-publishing","category-support-guides"],"revision_note":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/11241863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles"}],"about":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/types\/helphub_article"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/users\/14216496"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/comments?post=11241863"}],"version-history":[{"count":4,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/11241863\/revisions"}],"predecessor-version":[{"id":16367593,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/11241863\/revisions\/16367593"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/media?parent=11241863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/category?post=11241863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}