• Dec
    22


    WordPress

    Have you ever considered disabling the AutoSave feature of WordPress? WordPress is great software for blogging and other things. It is very user-friendly and intuitive to use. One thing I didn’t like is its Autosave feature. When auto save kicks in while writing a post, it slows down my writing/editing.

    Furthermore, every time autosave kicks in it inserts a new row in the data base. I first noticed it when WordPress told me that “there is a post with a later time stamp, do you like to revert back to it?” Then, it showed me various versions of the same post saved at a different time. At first, I thought it was a cool feature because I didn’t have to lose a lot when my laptop freezes.

    Almost ten times more rows than the number of posts
    So, I took a look at the database itself. In the database, wp_post table is where all the posts are saved. In my other blog, I only have 121 posts. The number of rows for wp_post is, however, a whopping 1,402 rows! That’s almost ten times more than the number of posts. That’s a lot of waste of disk space, and I’m sure it will slow down the web site access as the table is much bigger than it needs to be.

    The wp_post table has a column called post_status and it has either “publish” or “inherit”. I thought about deleting all the rows with marked with “inherit” but reconsidered as there may be some issues unknown to me.

    Disabling Autosave
    Basically, there are two ways to disable autosave. You either have to edit the configuration file or use a plugin. Both are not difficult. Here’s how.

    • Editing wp-config
      Back up to the current version of wp-config.php with a different name so you can revert back if you don’t like what it does. Then, add the following line anywhere in between the php opening (< ? php )and ending (? > ).

      define('WP_POST_REVISIONS',false);
    • Using a plugin
      This is what I want to try first because I haven’t used too many plugins that made my site slow. There are different ones available but I think I like this one.

      I’ll let you know how I like this plugin.

    No Comments