Technology Bites

  • Home
  • Tech
    • Software
    • Browsers
    • Google
    • Internet
    • Windows
  • Mobile
    • Android
    • Apple
    • Windows Phone
  • Products
    • Phones
    • Tablets
  • TIP US
You are here: Home / Tech News / Delete WordPress Post Revisions, Control Post Revisions

Delete WordPress Post Revisions, Control Post Revisions

WordPress Revisions are great at times, when something goes wrong with your post you are sure that there is a saved post revision to which you can revert. The post revisions feature of WordPress is real saviour in crisis times. But at some point if you are blogging regularly these post revisions will add up in the database.

If you edit your old posts sometimes to update the content or add some more information to to just make sure the post is upto date then post revisions will pile up. It is not unusual if you have tens of post revisions in your WP database. All this adds to the bulk of the database, they may not effect the site loading as these revisions are not queried when a post is requested from the front end, that means these won’t have any effect on the front page loading. But if you wish to keep the database tidy you should control how many post revisions are saved in the database. Also you should try to delete old post revisions from your WordPress database.

Delete WordPress Old Post Revisions

If you look at the WordPress plugin directory you will get a lot of plugins that will do the job for you. I am using  “Optimize Database after Deleting Revisions” plugin to do the job. As the name suggests it will delete revisions and optimizes your WordPress database.

Delete WordPress Post Revisions

Add the plugin from your WordPress Admin section, you can also add it manually via FTP.

Install the plugin, after installing go to plugin options.

It can delete all revisions of posts and pages. If you wish to preserve most recent revisions of posts you can specify a number, for example 2 revisions to keep.

optimize-wordpress-database-delete-post-revisions

It can delete trashed items, spam comments, unused tags, and orphan postmeta items. The optimizations can be scheduled to run once daily, or once in a week or once in a month. Daily running the script is not necessary, you can set a week or month for the optimizations to run.

Download Optimize Database after Deleting Revisions

Control Post Revisions

OK, now we got rid of the WordPress old post revisions now we can control how many post revisions to store in the database by adding a tag in the WordPress Config file.

By default WordPress saves unlimited number of post revisions, but keeping a small number of revisions is always advisable to keep a check on the growing database. There is no magic number on how many post revisions you want to keep in the database, but select a sensible number like 2 or 3 that is enough. You will always have these number of post revisions ready for you. You can also delete periodically old post revisions.

Control or limit post revisions

Add the following statement to your WordPress config file that is “wp-config.php”. It will limit the post revisions to 3, you can change the number to any number you want. Other revisions will automatically deleted.

define('WP_POST_REVISIONS', 3);

Add the following statement to your WordPress config file that is “wp-config.php”. This will permanently switch off post revisions.

define('WP_POST_REVISIONS', false);

That’s it, now you have deleted unwanted post revisions and also limited the number of post revisions WordPress creates.

Share this:

  • Tweet

Related

About Ram

I am a blogger and Technology Enthusiast. I write about software, tech news, gadgets. You can reach me at ram@teknobites.com, follow me on Google+ or on Twitter

« Microsoft releases Solitaire, Mahjong and MineSweeper games for Windows Phone
Google is reportedly partnering with Audi for on-board Android system »

Top Posts

  • Sync Flickr Photos with Local Folders
  • MSN launches new home page
  • Yahoo new home pages and how to get back to the old home page
  • Razr M Launcher + Circle Widgets for ALL Android Devices (ICS/JB)
  • Microsoft tool makes it easy to move from Evernote to OneNote
  • Amazon launches Prime Video service in India
  • HTC M8 might come in late March with on-screen buttons
  • Contact
  • Microsoft PDF Plugin for Office 2007
  • Lenovo Smart Band HW01 with OLED display launched at Rs 1999

About Us · Archive · Disclaimer & Privacy Policy · TIP US · Copyright © 2025 · Technology Bites

 

Loading Comments...