Friday 13 September 2013

How To Disable Or Limit WordPress Post Revisions

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.
Post Revisions are a feature introduced in WordPress 2.6. A revision is automatically stored in your database, whenever you save or draft a post or a page. Earlier this year, I posted an article about Deleting Old WordPress Post Revisions at this link.

Today we're going to learn a very simple tweak to disable or limit WordPress post revisions without installing any crappy plugin, which saves a lot of space. We just have to add a little snippet to your our config.php file.

Limit WordPress Post Revisions:

To limit Post revisions simply open wp-config.php (located in root of WordPress installation) and add following code to the end of file:

define('WP_POST_REVISIONS', 3);

Replace 3 with maximum number of Post revisions per post/page.

Disable WordPress Post Revisions:

To disable Post revisions simply open wp-config.php (located in root of WordPress installation) and add following code to the end of file:

define('WP_POST_REVISIONS', false );

 Save your config.php file & that's it!
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.