I was recently optimizing my other site to squeeze out some more speed and performance and made a simple change to a built-in WordPress setting that solved a nagging issue I’ve had. This setting has to do with page and post revisions. Don’t know what I’m talking about? Have a look toward the bottom of your page or post while you’re in edit mode and look for the revisions area. Check out the image below:
Revisions are basically drafts of your posts and pages. They are automatically saved at a specified time interval and also when you click “Save Draft”. The reasoning behind revisions is that you can go back to a previous version of what you were writing and either choose to use that older revision, or to compare to other revisions (drafts). There is a lot of flexibility here, but in my case, and maybe in yours, this flexibility is unnecessary and uses resources on your site that can slow down your page load times. They’re also all stored in your WordPress database…that’s too much clutter.
Fortunately, we can change the time between each saved revision, and also the total number of revisions that are saved. In fact, we can even turn off revisions completely. So where is this setting in the Dashboard? Logic might suggest that it would be under the Settings–>Writing options, but for some reason logic doesn’t seem to apply in respect to WordPress post and page revision settings.
In order to make these changes, you’ll need to get your hands dirty just a bit by editing the wp-config.php file on your server. Go ahead and get your FTP client started and open your wp-config.php file for editing.
Look for the line in this file that looks like this:
/* That's all, stop editing! Happy blogging. */
Just before the line above, copy and paste the following lines:
define('AUTOSAVE_INTERVAL', 120 ); // seconds (default is 60) define('WP_POST_REVISIONS', false ); // disable post revisions define('WP_POST_REVISIONS', 3); // alter number of post revisions kept.
Save your changes and you’re done! Congrats, you’ve just sped up your site and decreased the amount of data that will be stored in your database. Feel free to change the settings above to suit your individual writing habits.
BUT WAIT Adam!…I do not have an FTP client and don’t feel comfortable editing this file! Is there another option? Oh how I love WordPress, of course there’s also a plugin you can install for making these changes, but I try to avoid using too many plugins. If you like keeping your hands clean then go ahead and grab the Revision Control plugin.
If you found this article helpful, please do me a favor and share it using one the social services below and feel free to leave a comment with your website link.