Welcome to Thesis Theme Tools!

We're marking our one year anniversary with a complete redesign!
Come celebrate with us as we look forward to another great year of stimulating and useful articles -- and of course, our new skins!

WordPress: Change Editor Backups

by Mike Nichols

WordPress will make a backup of each change made to a post or page in the editor by default. This is to allow you to revert to a previous version of your entry should something go wrong.

This is a wonderful thing, with one exception: Your database will grow huge in a short matter of time! Daily database backups emailed to you by a plugin such as WP-DBManager become larger and larger day by day as WordPress saves virtual duplicates of your posts and pages.

If you write your posts and articles in a separate program on your computer, as I do, you do not need these backups, however well-intended. Or maybe you just want to control when you save a draft rather than letting WordPress decide for you. And it is possible to keep the automatic backups, but limit the number saved.

The fix is very simple. Here’s how to do it:

1. Open the file “wp-config.php” in your text editor. It is found in the root of your WordPress installation.

2. Go down past the initial material to find a place to insert the required statement. I suggest placing it after the “WordPress Localized Language” block of code that looks like this:

/**
 * WordPress Localized Language, defaults to English.
 *
 * Change this to localize WordPress.  A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
 * language support.
 */
define ('WPLANG', '');

3. To prevent WordPress from making any backups of edited posts and pages at all, insert this code:

/* PREVENT WORDPRESS FROM MAKING BACKUPS OF POSTS AND PAGES. */
define('WP_POST_REVISIONS', false);

4. If you want to limit the number of backups rather than eliminate them, insert this code. Change the number to the number of backups you want to allow. In the example below, the number of backups allowed is 3.

/* SPECIFY THE NUMBER OF BACKUPS OF POSTS AND PAGES. */
define('WP_POST_REVISIONS', 3);

5. Double-check that you have not done anything to the wp-config.php file except insert the code above, then save.

I hope this short article has been useful to you! Please feel free to leave a comment below, or you can email me directly using the “Contact” button at the top of the page.

©2009 Michael L Nichols. All rights reserved.

What next?

Your comments are always welcome, and are important to this blog’s community! Leave a comment now, or read the comments.

You can find several related articles in the “Related Articles” list below. In the footer you will find a lists of Popular Posts, Recent Posts, and you may browse by Categories, or tags. There’s also a Google Custom Search box to help you find just what you want.

Get free updates by RSS or email!

If you have enjoyed this article, please consider subscribing to article updates, using an RSS reader, or by email. It’s free and is a great way to make sure you don’t miss a single article! I also invite you to follow me on Twitter!

Why not share this article with others!

Share this article with your friends using your favorite social media service, such as StumbleUpon, or Digg. Check out the icons below under “Share This Article With Others” for other social media, including del.icio.us, Technorati, Sphinn, Friendfeed, FaceBook, MySpace andLinkedIn! You can also email or print the article, and even tweet it using Twitter!

Share and Enjoy:
  • StumbleUpon
  • Digg
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • FriendFeed
  • Sphinn
  • LinkedIn
  • Twitter
  • email
  • Print
  • PDF
category Tags: ,
  • Visit My Other Site!