Do Update Now;

Just a couple of minutes ago, I was looking through the wp_posts table and thought enough was enough. There’s a thread over at WordPress where users have been complaining about the bloat and where developers have shrug it off with ‘Space is cheap’. Or, ‘You can delete it easily’. Think of the queries, think of the queries!

First off, there’s a setting you should set in your wp-config file:

define('WP_POST_REVISIONS', false);

To check (and compare) how many revision entries your wp_posts table has:

from wp_posts group
by post_status, post_type;

You can delete the bloat by issuing:

delete from wp_posts where post_type = 'revision';

If you have access to SSH, you should check the main wordpress folder: since moving to version 2.4, I’ve seen files called ‘core’ in that directory. These are (literally) core dumps and they are huge. Obviously, WP crashes the server at times (I feel sorry for my host): so much for ‘light-weight’ or ‘state of the art’. Oh wait, I can hear the punch-line, what is it?

Oh yes: “Code is Poetry”.

This entry was posted in SQL, Wordpress and tagged . Bookmark the permalink.