|
|
Post Revision is a nice feature in Wordpress 2.5 + letting you save multiple drafts of your posts. This is particularly useful if your blog has got different authors editing the same posts, or if you are so inattentive to delete important paragraph from your articles. Basically, the Post Revision feature allows you to see what was changed in a post, by whom and when, and revert it to a previous state if necessary. Now, if you are the sole author blogger in your website, this feature may be not that useful. Let’s learn how to make your database more efficent by disabling or limiting it!
You might think: “What the heck does my database have to do with Post Revision?”. Simple, every time a post is edited, this little function adds a new row in the wp_posts table of your database ending up with clogging it. So, if for example, you edit a post 10 times, you will have 10 new rows in wp_posts table! Here are some hacks to limit or disable it.
Clean your database
This is the first step to do if you want to get rid of all the junk Post Revision pestered your database with. To do it, simply go to your Cpanel, click phpMyAdmin and run this query:
DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = ‘revision’
Note that, despite this query has never, ever troubled anybody, it is always advisable to back-up your database first.
Disable Post Revision
To do it, simple login your FTP server, go to public_html and add the following line to wp-config.php, also making sure to place it between “<?php” and “?>”:
/ /disable the painful post revision feature
define(‘WP_POST_REVISIONS’,false);
Limit Post Revision
Again, login your FTP server, go to the public_html folder and add the following line to wp-config.php, also making sure to place it between “<?php” and “?>”:
/ /disable the painful post revision feature
define(‘WP_POST_REVISIONS’,6);
The example above limit the number of Post Revision to six.
Incredibly to say, these hacks managed to improve my database a lot, also reducing the number of slow queries it produced. Before applying these tricks my database was about 2000 Kb. After using the Clean your Database hack, it was only 1046 Kb!
Tags: hack, Wordpress
Related Articles
Latest Articles
If you can not find what you are looking for, you might want to try Google Advanced Search and get thousands of results, specifically selected for you.
Google Advanced Search
|
Leave a Comment
Incoming Search Terms for the Article:
limit post revision - wordpress saving multiple drafts -Best screen resolution 1280x800 or higher.
Web Talk is best viewed in Firefox.

Comments
How to fix blank desktop shortcut icons: hello. i did all this but i cant find the IconCache.db . can it be somewhere...
Download Online Armor Firewall with Full License Key…Working Links (Save $20): http://www.tallemu.de/promo...
How to Really Make your Internet Surfing Anonymous and Private: … the second one; to hide your IP some different...
How to Turn Off/Disable and Delete Search History in Windows 7 Explorer: Ehm…That’s works!!! Great, easy...
How to Turn Off/Disable and Delete Search History in Windows 7 Explorer: You can easily delete individual search...
Web Talk Promotion! Win 10 Easeus Data Recovery Wizard Professional Software and Save $90!: @MerleOne, Thanks for your...
How to add items to Favorites Windows 7 Explorer folder: Thanks for the information – it’s exactly what I was...
How to Find and Retrieve your Windows 7 Product Key: Sorry! Server failure. I had to upload an old backup. Guess in...
How to stop Windows 7 reboot loop: Did this work for the current 2 hour reboots that have started on Windows 7 users...
How to customize Gmail with your own colors: We understand what you are saying but obviously some of us do not have the...