Results 1 to 2 of 2

Thread: Shrink Your Wordpress Databases by Deleting Revisions

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,327 Times in 1,258 Posts

    Shrink Your Wordpress Databases by Deleting Revisions

    When you update a blog post, Wordpress stores the old version of your post as a revision document. If you make very many updates, these revisions can have a significant impact on your database size. On some of my Wordpress sites, half the blog posts stored in the DB were revisions.

    If you're sure that you don't need these older versions of your blog posts, you can delete them permanently with this MySQL command:
    Code:
    DELETE FROM wp_posts WHERE post_type = "revision";
    You might want to make a database backup first.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. Thanked by:

    Aquarezz (18 March, 2011), Hellas (20 March, 2011), Loko (18 March, 2011)

  3. #2
    TopDogger's Avatar
    TopDogger is online now Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    2,951
    Thanks
    341
    Thanked 884 Times in 672 Posts
    After deleting the post revisions, add the following to the wp-config.php script. It disables post revisions. I added this to all of my blogs.
    Code:
    define('WP_POST_REVISIONS', false);
    For most WordPress sites, tracking post revisions is a useless feature.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  4. Thanked by:

    garfish (22 June, 2011), Will.Spencer (20 March, 2011)

Similar Threads

  1. Deleting Facebook Posts
    By Will.Spencer in forum Social Networks
    Replies: 6
    Last Post: 13 August, 2010, 11:28 AM
  2. Deleting accounts with 0 posts
    By Sbfc_ in forum Community Building
    Replies: 10
    Last Post: 16 May, 2010, 10:45 AM
  3. Smowtion deleting all my proxies
    By Habaku in forum Web Proxies
    Replies: 9
    Last Post: 29 March, 2010, 16:51 PM
  4. Merging Wordpress Databases
    By garfish in forum Wordpress
    Replies: 6
    Last Post: 5 December, 2009, 14:41 PM
  5. Replies: 0
    Last Post: 13 July, 2009, 19:12 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •