17 January 2011 1 Comment

[WordPress] Database Optimization: Delete Revision Post

Hello Friends,

WordPress is One of the most popular blogging Open Source solution in now a days. WordPress come with Revision post feature in version 2.6. Revision Post feature is very useful but as time passes, it causes a load on database. Optimizing the blog is most important feature for Google search. As you write the post, it creates a Post Revision at regular interval. This results in a large number of revision post data in database. You can simply delete all revision post using below query. This results in a reduce the WordPress
database load and speed up load speed of your blog.

DELETE FROM wp_posts WHERE post_type = “revision”;

If you want to turn off the Revision Post feature, just open wp-config.php file from your root WordPress installation. Add below code.

define(‘WP_POST_REVISIONS’, false);

Let me know if you have any problem.

Note: Please take a backup of your database before executing this query.

  • http://profiles.google.com/pr.biztech pr biztech

    Your blog is so nice. Thanks for the good support with this issue of article were really great and commendable. Just visit http://www.biztechconsultancy.com