Do multiple revisions really slow down WordPress?

I have read numerous times that I should clean up my database to keep performance high. Keeping multiple revisions of posts is always cited as a big performance stealer.

I'm suspicious of this claim. I get that the table will be significantly larger with 10 revisions than 2, but will it really be slower in operation? Given that there are indexes (or should be) on the fields you look things up on frequently, queries should still be nearly as quick.

I can't see any difference in my own sites, but I don't have that much data. I'm curious at what point, sizewise any improvement would actually start to show up, if indeed one ever does.

I'm not arguing for site owners to up the number of revisions they want to keep, I'm just trying to understand the real world effect, compared to the big performance improvement claims I so often see.

Topic revisions Wordpress performance

Category Web


I don't have the reputation to merely comment, but I believe that this question of post revisions affecting performance is still relevant today.

There are two sides to this question of performance, the frontend and the backend (admin). One of my sites developed a problem where just a single page post was taking over two minutes to load in the editor.

It was hard to troubleshoot as there was nothing in the PHP error log. The plugin "Query Monitor" said that there was just 257 database ops taking a total time of .31 seconds.

There were no other performance issues on the frontend or backend. On the client side, the console reported a bunch of deprecated react components. The network waterfall showed a steady progression, but difficult for me to understand the cause from this information.

Everything looked fine. To complicate matters, the editor would randomly load up the post in just over two seconds.

There was nothing special about the page post except that it had 32 revisions which was way beyond every other post on the site. I trashed the original post and re-created it. Problem solved.

I believe that the high number of revisions was the cause of the very slow loading time. To avoid this in the future, I have set max revisions to 4. It seems to me that this should be set to a sensible default as a best practice.

I know this is long winded, but I am hopeful that it will save someone else a few hours of head scratching.


No. Databases are smart, for the most part. If you have performance issues, then you need to find the actual problem and solve that directly. Having millions of rows in a well indexed database won't make any real difference. That's why indexes exist.


Having 2 revisions or 100,000 will not change front end performance in a default plugin-less WordPress setup

However plugin and theme authors who do not query the database correctly, could end up accidentally searching/querying revisions, which could have some performance issues

Here’s a snippet on it

revisions take up space in your WordPress database. Some users believe that revisions can also affect some database queries run by plugins. If the plugin doesn’t specifically exclude post revisions, it might slow down your site by searching through them unnecessarily


Yes, it will affect performance to some degree. Revisions are stored in the database and if the database stores too much revision data then it will eventually affect site performance.

Best thing to do is limit revision count in your wp-config.php

define( 'WP_POST_REVISIONS', 3 );

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.