WordPress: Tip for Akismet


WordPress

 

In my previous article where I had talked about how to protect your blog against spam in the comments, I had told you that Akismet left many unnecessary data in the database, slowing it down and your site or blog.

So, I will here give you a tip for cleaning your database of useless data left by Akismet. This trick works whether or not your Akismet is currently in operation.

To clean your bdd, you must go to your phpmyadmin, query tab, and insert the following queries:

SELECT *.

FROM wp_commentmeta

WHERE comment_id NOT IN)

SELECT comment_id

FROM wp_comments)

To verify that wp_commentmeta data shall are not bound to wp_comments.

Then:

DELETE FROM wp_commentmeta

WHERE comment_id NOT IN)

SELECT comment_id

FROM wp_comments)

To remove.

Removed the unnecessary entries, you empty "wp_commentmeta' of data related to Akismet:

SELECT *.

FROM wp_commentmeta

WHERE meta_key LIKE '%akismet%'

Then:

DELETE FROM wp_commentmeta

WHERE meta_key LIKE '%akismet%'

 

And, with it, your bdd will be cleaned of all unnecessary data left by Akismet!

 

Leave a comment

Your email address will not be published. Required fields are marked *