Speed up wordpress: Delete or reduce Revisions

0
52

If you are running a wordpress page you sooner or later ask yourself how to speed up your server to deliver that page as fast as possible. One way to do that is reducing the number of revisions wordpress stores per post / page.

Whenever you click save or publish in one of your posts / pages wordpress stores an additional row in the database. If you made a mistake you can roll back to an older version. But all these database entrys make querys to the database slower.

Thats why I usually only keep the last three revisions.

How to limit the number of revisions in wordpress

Add this code to your wordpress wp-config.php above the comment “That’s all, stop editing! Happy blogging.”

define('WP_POST_REVISIONS', 3);

/* That's all, stop editing! Happy blogging. *

WordPress will now only save a maximum of three revisions. If you save a fourth time the oldest revision will be deleted.

You can of course use any number you like.

How to delete existing revisions in wordpress

delteting all wordpress revisions with wp optimize
Delete all revisions from wordpress

After adding this limit you have to take care of all the posts which exceed that limit. I use the plugin WP Optimize for that, with the settings you can see on the side. It will delete ALL of your revisions.

Feel free to comment below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here