Why you should disable Akismet for BBPress?

This post is one of those lessons we learn the hard way. That is by committing a mistake and realising that we were wrong all along.

Akismet is the most popular anti-spam plugin for WordPress. It has a paid pricing plan as well. Since it is owned by Automatic (the company which runs WordPress), the trust factor is really high and it is one of those plugins which I install blindly on any WordPress site.

We run an extremely popular support forum for our product WPLMS now in its 7th year. The database is 2.4 million rows with over 250k posts/topics/replies. Because of such high number and no external database plugins except our own extensions. We never considered the possibility that something might be wrong in the way the data is handled.

However, last week we started to analyse this and found a major problem. The post meta table was getting huge, the order was 1gb.

We debugged further and found that for every post created there are multiple postmeta creates which is normal, but we found that more than half of that data came from akismet.

Since this is a serialised array data, I can fairly assume that this is only used for reporting. That is this data can only be used for one purpose, to generate the beautiful graphs that Akismet shows in its panel. Then we realised, we can’t recall last time when we checked Akismet stats. So, this is a major flaw in the system which is sacrificing performance for the state of graphs.

So, I ran the following query which drastically reduced the database size.

The resulting database size.

Doing above had absolutely Zero impact on our forum performance. It also reduced the database size and the site backup was very smooth as well. This is one area where Akismet should consider to improve on.

I found this post which recommends disabling Akismet for BBPress. Which is this code :

add_action('init', 'vibe_disable_akismet_integration');
function vibe_disable_akismet_integration() {
  remove_action('bbp_ready', 'bbp_setup_akismet', 2);
}

Hopefully, this helps someone before you land up in trouble. Always maintain a schedule to check your WordPress database and maintain it, this has really helped us.

4 comments

  1. VibeThemes says:

    is it safe to use your code in our database ?
    share the Mysql Code Please

  2. teguhprayogo says:

    what about normal WP website? does it have the same result? increasing database files?

    1. Mr.Vibe says:

      Yes, it has similar results, however it would save 1 record for every post. So in case of forums you can have thousands of replies and that is where removing akismet makes a huge difference.

  3. My BBPress isn’t making any such data. Have been using it for years, so I figured there would be tons of megabytes to delete, but nope…
    Regular comments in wp_commentmeta has them for comments on blog posts though. 2 or 3 records per comment.
    WooCommerce data seems exempt too. So it’s not as bad as you suggest in your post 🙂

    Anyway, your exempt code is neat and I’m using that. No real need for Akismet to work on my BBPress since it’s registration only.

Leave a Reply

%d bloggers like this: