WPStuffs tested WordPress tweak
Few weeks before I was using a plugin to limit the Post revisions but then I got to know the that,using plugins for small functionality like this can make your blog worse.
Actually using too many WordPress plugins isn’t a harm for your blog but even using a one poorly coded plugin is enough to make your blog vulnerable to security attacks.
So,for small tweaks like this you can edit the code rather than installing a standalone plugin.
What is Post revisions & Why should we limit it ?
Every time you change a content the new copy of the content will be created rather than deleting the existing one.The advantage of the post revision is you can always revert back to previous revisions with just a single click.
So,If you are not limiting the post revisions then you are collecting junks in your blog database.Large size database causes many problems like server slow down and also It will become cumbersome process to backup your WordPress blog.
So what can we do ? Simple,Just add a line of code in wp-config.php
Limit the Maximum no. of Post revisions
Open wp-config.php file which will be located in your blog’s root folder and Add the following code anywhere before the code require_once(ABSPATH . 'wp-settings.php');
define ('WP_POST_REVISIONS', 3);By adding above code you are limit the maximum post revisions to 3,You can change it to any value according to your need.
Disable the post revisions
If you are not interested to create post revisions then completely disable it by adding the following code anywhere before the code require_once(ABSPATH . 'wp-settings.php');
define ('WP_POST_REVISIONS', false);But I recommend you to have at least 3 post revisions to avoid any loss of data.
One more Tip
If your blog already flooded with lots of unwanted poste revisions then I recommend to use a plugin called Better Delete Revision to cleanup.
I am done now…It is your time to act.
If we do not use the mod which you have mentioned above how many times does our WordPress blog save our post every time we revise or update? If we update a post 10 times will it create 10 copies? If at all we want to use a plugin to set post revisions what is the best available plugin for this purpose? ‘Better Delete Revision’ is used to completely remove revisions right.
After reading this post I went to my WordPress dashboard and I opened a already published post but I could find how to revert back to previous edits. can you tell me how to do it in detail.
Vijesh recently posted…7 Things you should never focus in the initial stages of blogging
Yes, Every time you update a post it will be saved as a new copy.If your blog is on WordPress.com then it save maximum of 25 post revisions for particular post.After that the old one will be replaced by the new one.For self hosted WordPress the revisions are limitless.
As I mentioned you dont need to use a plugin to limit the post revisions,just a line of code is enough.In case you need to use a plugin,use WP Total Hacks it has many features and limiting post revison is also one of it feature.
To revert back to previous revisions you need to edit the particular post and enable “Revisions” options in a screen options which will be located at the top right corner.
Now if go though bottom of the post you can see a list of post revisions with time-strap.Click on the revision you want to restore.Here is a screenshot – http://awesomescreenshot.com/0dbxyztcb
Hope this helps you,Now I am going to publish this comment as a new post.
Thanks for pitching me an post idea.
Vivek R recently posted…Four Bullet Proof Methods to build a Spam free WordPress blog
I used to wear Revision Control Plugin, but this trick may be as well.
Nice trick!
Agilworld recently posted…Top Freeware Collections of The Month – February 2013
editing the wp-config.php file is the easiest way to limit or turn off post revisions.. adding up a plugin for this simple purpose is merely an add-on and I don’t prefer that..
King recently posted…HostGator 35% Off Coupon Code For Feb 2013
Great tip! Just be sure to enter it towards the middle of the wp-config.php file. I’ve seen macros used at the very end and often times, they don’t work there as its after the abspath information.