Enabling & Limiting WordPress Revisions

Most WordPress websites have a post revisions feature which stores older versions of pages and posts as you update them. This is very handy if you make a really bad edit or something strange happens in the editor and you lose everything in the window. Strange things happen once in a while.

Some sites have this feature disabled. (Dreamhost 1-click installs, for instance, install with this feature turned off. Grrr!)

How to enable post revisions

Open up your wp-config.php file for editing. You’ll find it in the main folder where all your WordPress php files are.

You may already have a line like this:
define(‘WP_POST_REVISIONS’, false);

If so, change “false” to the number of revisions you want to keep. Try to strike a balance between the number you might actually need, and database size. The higher the number, the more data you’re storing.

If not, add the following line, with “5″ being the number of versions stored. You can change it to whatever number you like.
define(‘WP_POST_REVISIONS’, 5 );

If you want to keep unlimited numbers, change “false” to “true”

Save the file, and your future edits will cause post revisions to be saved.

This entry was posted in WordPress Tips. Bookmark the permalink.

2 Responses to Enabling & Limiting WordPress Revisions

  1. kera says:

    hey… can you do the same with Page revisions?

  2. Tzaddi says:

    Good question. They call it post revisions, but it also applies to pages.