One of the major features of WordPress 2.6 is Revisions; Revisions are a powerful feature for anyone who likes to keep a track of a page/post’s modifications, But they’re not for everybody.
There has been quite a bit of complaining that WordPress does not include a option to disable Revisions via the admin interface, and instead relied on a wp-config.php constant being defined. This plugin is designed to allow Configuring this option via the WordPress admin panel, And to set it on a per-post/page basis.
Version 1.1 seperates the global options into Posts and Pages, You may choose to globally disable revisions for Posts, yet leave them enabled for pages, or vice versa.
MU Compatibility: No, This is not MU Compatible – Well, At least I dont think it is, I have not written it for MU and do not understand the differences between WP and WPMU with respect to plugins. I might look into it for the next version if there are enough requests for MU Compat.
Eg. I might Disable Revisions Globally on my blog, I will now only have the Live version, and the Autosave. However, I might decide i want to Revision this page, So i just change the revision option to Enabled, Revisions are now only enabled for this page, nothing else. I could also optionally tell it to only save 3 revisions for this page.
Screenshots:
Links:
WordPress.org Plugin directory / Download: http://wordpress.org/extend/plugins/revision-control/
Known Issues:
- Disabling Post revisions on a post Deletes all revisions for that post, However, Disabling globally does not delete current Revisions.
- Selected option does not stick, Or appears to stick to a non-selected value. Finally Fixed in 1.5


When I check “disable”, leave the “revision” screen and come back to it, there is no longer any option checked! For the rest: thanks a lot for this plugin, especially the number setting option.
I just noticed that the disable function not only looses its checkbox, but it also doesn’t work. I CAN disable revisions per post, but I just noticed that I had revisions for posts I edited after installing your plugin and set things to disable.
Seems to be funny for me also. I set it globally to two revisions for both pages ans posts. But on the edit post or page screens, it still has revisions “enabled”. Even if I change the radio tick to “limit to (2) revisions on a particular post, after I save the post or page the next time the radio tick is changed back to enable.
Tut to further complicate matters, even though the radio won’t stick, the list of revisions shown is only two. Also, and this is really weird, the time of the revisions is off by two hours from the blog’s time and the last edited time that is shown up above in the WP save box.
hi. Thanks for plugin
perfect.
Regards
Thanks for the plugin and it’s working perfectly so far. Mahalo.
The plugin works for the most part, but occasionally a revision is still made. In between posting 2 posts, I had to go back and edit another post. When I made a new post, a number was skipped.
When I typed in the number that was skipped, it led me to a revision page for an Autosave revision.
I’m wondering, could you give a feature to automatically delete all revision several days after the last edit? i think it would be a great benefit…
Thats a good idea actually, Not that it’ll be useful to me.. I might look into it and may possibly release it as a seperate plugin instead.
Thanks!
Man, thank you very much for this plugin. It saved me. I already thought I have to give up Wordpress and switch to another blogging tool.
Here is just one suggestion: within plugin configuration, add button to immediately activate revision prunning. Your plugin works, but one has to go and resave each article to activate pruning of old revisions.
Great plugin.
All the revisions have built up and are killing the load times :(
Thanks for sharing it :)
activate pruning of old revisions
Yes, Its planned for a future release to allow easy-access to pruning revisions created previously.
thanks. i just came here to request to add a feature that would remove all previous revisions!
I read you plugins code and have some suggestions belong to safety and comming WP 2.7 too.
1st of all, i like it very much. But some code lines seems not safe to me:
$submenu['options-general.php'][17] =
if entry 17 is been already used (WP or any other plugin) you would overwrite it! Could be better to store it like:
$submenu['options-general.php'][] =
at the end (as append) and sort it afterwards.
Also WP 2.7 introduces complete management of boxes. That’s why i would suggest to replace the posts/page revision box by a more sophisticated box, that allows the delete of explicite revisions too. If you are interested, i will write the example and would send it to you. Please let me know (also mail possible), how you think about.
Hi,
I’m very aware of the $submenu constraints, 17 cannot be used by any plugins unless they specifically set it, Any that use the API will be appended to the end somewhere, 17 is used to insert ‘Revisions’ between 2 of the standard menu sections. (I follow trunk development very closely, and will notice any breakage)
I have been rewriting it for 2.7 over the last few months, And will release a new version shortly after 2.7 is released (eventually)
Seriously one of the most useful plugins I’ve found.
Thank you!
Maybe wordpress can come to their senses and just incorporate it.
When will revision control for 2.7 be ready? Looks like a very useful plugin for people like me who are always revising.
I’ve had a few issues with the latest rewrite, so i’m going to package up a maintainence release of the current stable to work with 2.7 for people today.
I’ll release 1.9 today, and 2.0 (rewrite) in the coming weeks.
I think the 1.9 version is broken.
Sorry, Fixed in 1.9.1, Seems the WordPress.org plugin packager doesnt respect svn:externals…
Hmmm how long does WP.org take to update w/ the latest version usually? It seems I can’t even go to wp-admin. Should be good to delete /revision-control and extract latest correct in terms of updating it? Just double-checking. Thanks for the work.
Hopefully it updates soon.. Should update every 15minutes i believe.
You’ll have to FTP in, Remove the old files, and re-install(the plugin), Heres a direct link to the 1.9.1 version: http://downloads.wordpress.org/plugin/revision-control.1.9.1.zip
Thanks. Will do that.
Hello,
Problem: I am a writer, I absolutely want to keep some revisions. Because copyright, plagiarism, personal organisation, update of content… But I do not want to save all revisions.
Context: There are two kinds of revisions. The historical-archive ones (long term backup version) and the writing revision (short term worked version)
Currently: It is problematic and risky to manage the process entirely manually. It is also problematic to define a fixed number of revision because you can loose historical versions.
Answer: Is it possible that your plugin allows to save specific versions (user’s action) while the fixed number does concern only the latter ones. I supposed that this imply that the plugin should conserve at last (e.g) 5 revisions from current date to start date (start date is the last long term save version). That means that user can have both a manual treatment of long term backup versionning, while automatic treatment of short term versionning.
Regards.
Interesting idea really.. So basically.. Save only 5 revisions per day for the last 7 days, save only 1 revision per day for all dates previous..
Not sure if they already responded, but that sounds like a fantastic feature — essentially a “protect” this revision feature that would stop the pruning from deleting it. Alternatively you could think of it as a “sticky” feature too — keep this revision available.
PolyWogg
Hello,
I’m using the latest version now with WP2.7 and have one issue with it:
It seems to be working ok, but in the past week I had two published posts with future dates which I decided later to edit a little more before they become actually visible for visitors on the published date. In both cases I get the message that there is a saved version of this post more recent (!) than the version I just opened, in my opninion the only (?) version.
I’m using this plugin since a month or two and disabled all revisions (posts and pages).
Pretty sure the Autosave functionality isnt touched by my plugin, Only the Revisions, I dont have any plans to disable the Autosave functionality however (And if it is currently disabling that functionality, I’ll be re-enabling it next time i touch the code)
This plugin is working perfectly with Wordpress 2.7 here. I find it so useful. Thank you very much for releasing it free of charge.
Seriously one of the most useful plugins I’ve found.
Thank you!
This one’s a bit odd, but maybe a known “feature”.
FYI, my site is just getting going, so I’ve only got three posts, but autosaves and some tweaking as I get used to it had created six or seven revisions of a couple of my first posts. So this plugin was exactly what I was looking for — I was about to try and edit wp-config (shudder) as it was the only option I could find. (FYI, I hadn’t even thought I would need this until I peeked at my autobackup of my database and saw it was a LOT larger than it should have been for a couple of small posts, and found multiple copies of my post).
So I installed the tool, set it to save 2 revisions only, went into my existing posts, and it was still showing the six or seven revisions from before. No problem, there’s a handy little delete tag you included. So I deleted them. Here’s the wonky bit — I got the following error message:
Warning: Invalid argument supplied for foreach() in /mnt/w1003/d42/s31/b02cdf58/www/polywogg.ca/personal/wp-admin/includes/plugin.php on line 626
Warning: Cannot modify header information – headers already sent by (output started at /mnt/w1003/d42/s31/b02cdf58/www/polywogg.ca/personal/wp-admin/includes/plugin.php:626) in /mnt/w1003/d42/s31/b02cdf58/www/polywogg.ca/personal/wp-includes/pluggable.php on line 850
I have no idea what those two errors mean, but it *did* delete the revisions, just didn’t complete cleanly. But when I went back to the page, the one I deleted was gone. But each time I clicked delete on a revision, I got that error.
I’m assuming future revisions will prune automatically, but just thought I would mention it. I’m using 2.7 and the latest version from the plug-in directory…
Thanks again, and a happy new year to you!
PW
The plugin doesnt prune at all when activated.
Once a new revision is created (ie. by clicking save) then it’ll prune revisions for the current post.
As for the warning produced.. Thats an odd bug with the way WP handles the menu code.. Turns out, I’ve got a patch to submit to WordPress Trac to handle that.. I thought i’d worked around it in the latest version of the plugin though.. Apparently not.
Hi,
Great plugin. Shows clean posting page and you can delete manually a revision. One thing I could not figure out that either it removes only the entry at post page or it deletes all the related records (entries) from the database? Is there a way to undelete a revision ?
Once you save a new revision of a post, If you’ve got it set to store x number of revisions, it’ll delete any older than that.
Once a revision is deleted, Its gone, No way to get it back. Thats one of the nice things about the WordPress revision manager, you’ve got the full history at your fingertips :)
Great plugin; I’ve had it installed from the beginning to keep all those revisions in check. Any chance that you would extend your plugin to bring flagged revisions to WordPress? (See this idea.)
That sounds like it might fit in with the rewrite of the plugin which i have planned.. I just need some more motivation to get around to it :)
I’ll add that idea to the list though, it seems like a pretty easy thing to implement.
Hi,
Once the plugin activated, I get an error when trying to load the options page. Is it a known issue ?
No it is not, Whats the error message? (And how are you accessing the page? Through the plugins page, or the Admin menu?)
The error message is a WordPress error : “Cannot load revision-control”. I clicked on the “revisions” link in the plugin page (URL : /wp-admin/options-general.php?page=revision-control). Is there another way to access the options page (other than through the plugin page) ?
Hm, Must’ve changed the URL and forgotten to update it.. i’ll fix that up sometime soon :)
However, You should find “Revisions” under Settings in the menu.
Thanks for your efforts, saved my load times… I had tons
of old revisions…
a global prune would be good for first time installers,
I’ve got to go through each post and resave?
thanks though.
-j
Great plugin, thanks.
I also get error “cannot load revision control” there is no revision control option in the settings list.
I have also loaded revision control to another blog at the same time without problem.
Both blogs are 2.7 running revolution church theme on same host with similar plugins.
Any Ideas?
Thanks in advance
The last line in the plugin file, where you hook into the “init” action.
This gives me problems on certain servers. $GLOBALS works fine on all servers, but on certain ones php craps out when I try to assign a function to a $GLOBALS variable, which is what this hook is doing.
Isn’t there a more simple way to instantiate the plugin class? What is the reasoning behind this crazy method?
This is one of the plugins I make sure to install on every WordPress, but I guess that also gave me some insight into this bug.
Assigning to a $GLOBALS option is only needed since the class instance needs to be able to be referenced to from other locations, and on PHP4, AFAIK thats the simplest method.
What configurations cause the problem? I’ve seen many plugins which use the same instancing code, infact, its written as a ‘must-do for plugins using classes’ somewhere..
I’m somewhat wondering if its a PHP issue with something in the code rather than the globals part..
I was going to ask if your ‘Revision Control’ still supported WP 2.6 (the description says it does, but in the sidebar it says: ‘Requires WordPress Version: 2.7 or higher’)
Then I noticed Revision Control has not been tested for compatibility with WPMU. Are you planning to add do any testing with WPMU?
How to Write Plugins for Wordpress MU:
http://www.ringofblogs.com/2008/05/31/how-to-write-plugins-for-wordpress-mu-updated/
Here’s some links to Codex information on WPMU:
codex.wordpress.org/WordPressMU
codex.wordpress.org/WPMU_Functions
codex.wordpress.org/WPMU_Global_Variables
If you need additional help, these folks are pretty responsive:
http://mu.wordpress.org/forums/forum.php?id=10
I hope this helps!
My main hurdle with MU compatibility is installing MU in the first place, I always have problems (Which surprises everyone it seems)
MU compatibility is planed in the future, Since WP 2.8/WPMU are making inroads in helping plugins work on either.. But it’ll happen at some stage.
Also, You cant trust my Documentation. I simply never get around to writing it/updating it…
You should be able to install WPMU locally with XAMPP:
http://www.apachefriends.org/en/xampp.html
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start. At the moment there are four XAMPP distributions (accessible from the link above):
- Linux
- Windows
- Mac OS X
- Solaris
Once XAMPP is installed, this should help:
http://codex.wordpress.org/Installing_WPMU
If you need any help, please don’t hesitate to give a shout in the WPMU Plugins Forum:
http://mu.wordpress.org/forums/forum.php?id=10
Cheers!
Any plans to make your plugin work with Wordpress v2.8? As of now I receive “internal service error” with your plugin enabled.
I received a WordPress error saying that I don’t have permission to access the page when I clicked on the settings page and yet I am the blog administrator.
An update has been released to address that issue in 1.9.2
I’m also getting the error, that I don’t have permission to access the page although I’ve updated to v1.9.2.
Hey, I’m using WP 2.8.1 and the latest release of this plugin and still getting the page with the warning telling me that I dont have permission to access the page when I clicked on the settings page and yet I am the blog administrator. What’s wrong?
WordPress 2.8.1 introduces a new security enhancement to WP, 1.9.2 was untested (Flu and didnt have easy access to a server to test on), And WordPress.org seems to be misbehaving and not notifying people that 1.9.3 is available.. Hang in there.. it’ll get fixed sooner or later, If you cant live without the options page for a few days when who knows.. (Per-post options still work as expected)
Cool. v1.9.7 works fine on WP 2.8.1 now. Thanks!
By the way, have you thought about adding a complementary function that allow an admin to definitely erase ALL the revisions in the database? I’ve moved one blog from a friend to my server and noticed that revisions may generate lots and lots of useless data in the db. And a plugin able to delete all that mess surely would rock ;)
In your readme file, you have the changelogs in the reverse order. It’s supposed to be most recent version first, as shown here: http://westi.wordpress.com/2009/06/20/changelogs-changelogs-changelogs/
This is causing an issue with various plugins (like Changelogger) that expect the most recent revision to be first, with the result that they can’t display your change information correctly.
I use Windows Live Writer to post in WordPress2.8.2 and version 1.9.7 seems not working, still generate revision
I never thought of external writers, And honestly dont know if it should work or not.
I’ll consider testing that with the next major release in a few years.
Hello there, I’m having the same problem of WP telling me that I don’t have the permission to access the settings page. WP2.8.3 + Revision Control 1.9.7. Hope you could fix it soon ;)
Not sure why you’re having that problem. Remove it and re-install it. Else you’re on your own for the time being, as Its working for me, and i’m not longer supporting the plugins for the time being.
Sad to read that. I love this plugin and make the maintanance a breeze.
Yeah.. But what can you do when you simply have no time to keep up with things, And dont actually use the plugin yourself? :(
Try this @ wp-config.php
define(‘WP_POST_REVISIONS’, false);
it’s the same as deactivating this via plugin ;)
Thanks for this patch for the lamest ‘feature’ ever released from WordPress. I just upgraded from 2.1 and can’t believe that WordPress has failed to provide an off button for Revisions since 2.6!! Revisions is the most ridiculous thing I have ever seen from WordPress. Is there no longer any adult supervision at WordPress?
Revisions make perfect sense in the way in which they are used by WordPress. Revisions are designed to keep an audit log of who changes what, and when. Whilst many personal blogs will not need it, many will also find benefits from it in due course.
The only arguments i have seen are either idiotic, or plain wrong. Post ID’s should never be relied upon (posts..pages..attachments…custom objects…etc..), and the extra data in the database is minimal (We’re talking a blog here, few hundred rows, with good indicies, Compare it against a “small” database to a DBA and we’re looking at a minuscule database..).
To to future commenter’s: remember, Revisions are a feature that many people use, If it doesn’t suit you, then fine, theres many ways to turn it off, including this Plugin. But this is not the place to flame WordPress, Its developers, Or anyone who puts in time to support a product you are using, Please be nice, and realize you wouldn’t be using the project if it wasn’t for us. If you do not like what is happening to wordpress (Supporting the functionalities more people are using every day) then please fuck off, There are plenty of other projects which may suit you such as Drupal, or Joomla! or maybe even SmallBlogRunningProjectThatIsLightWeightButUses200MBOfMemory Pty Ltd’s product. Or of course, You can just contribute to WordPress yourself and shape the future of the product you choose to use….
See: http://dd32.id.au/2009/10/01/dear-all-commeners/
there’s a small bug in the plugin where you check to see if the user has WP_POST_REVISIONS already defined in their wp-config.php with the intention of alerting them on the settings page if they have.
Since you have a ‘return’ immediately after the check, your settings page is never hooked in if WP_POST_REVISIONS is already defined, so to the user it just looks like the plugin is doing nothing. I found out the hard way after just installing myself where I’ld previously been using the config file method.
???????wordpress2.9????????????
No idea what that says, but, No, Its untested with WordPress 2.9, and will remain so.
New version will support 2.9+ which is currently in the works.
Hi,
this may already be suggested: how about adding an option not to delete revisions but storing them in a different table. That one can be indexed differently and a such does not eat up such a large quantities of memory (for example Best related posts plug-in indexes “post_title” and “post_content”).
Best regards, Dominik
Internet marketing and online advertising is now becoming increasingly popular and most effective in the field of advertising as it is the medium that involves a large number of users worldwide.
thank you ;)
Thanks for this plugin. I always had to fully disable my revision in the wp-config.php file. Now I can enable it again. :)
Getting an environment that MU can install in isn’t my problem, Its keeping the configuration in working order afterwards, I always get it installed, and then the entire thing blows up in my face as soon as i try plugins/etc.