Warung Online
Sabtu, 05 Maret 2011

Akismet Key and How to Resolve Akismet Detected Problem

Where to find your API key for Akismet

Akismet is one of the plugins that comes bundled with self-hosted WordPress blogs. It’s designed to stop spam comments from showing up on your blog, and though it won’t be enough on its own once your blog gets properly indexed, for new bloggers it should do the trick.
In order for Akismet to work properly, you’ll need to grab an API key from WordPress.com. That’s right, from WordPress dot com, even though you have a self-hosted WP blog. Here’s where to find it:
  • You’ll need to sign up for an account with WordPress.com first.
  • You’ll have the option to get a free WP blog, or just a user name; if you’re only signing up to get the API key, then the latter will be fine.
  • Once you’ve got your account, sign in,
  • and navigate to My Account > Edit Profile (currently on a drop-down menu from the top left).
  • Your API key is at the top of the profile page.
  • Add it to your self-hosted WordPress blog under Plugins > Akismet Configuration.
What if you have more than one blog? WP API keys will work on as many blogs as you want them to. And if all this WordPress.com and self-hosted WordPress stuff has you confused, this post should help.

“Akismet has detected a problem.”

Since I’ve upgraded to WordPress 2.8.2 and a new version of spam-killer Akismet, I’ve had an annoying error message just about every time I’ve looked at the dashboard of any of the blogs I look after:
Akismet has detected a problem. A server or network problem is preventing Akismet from working correctly.
Clicking for more information gets me an even more alarming message:
akismet
Server Connectivity Unable to reach any Akismet servers.
A network problem or firewall is blocking all connections from your web server to Akismet.com. Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet and firewalls.
As someone else said on the WP support forum, I think it’s a bit of a glitch. Even if you have a bunch of red bars saying the Akismet server can’t be reached, refresh that page, and they all go green, indicating that your spam filters are back in place.
As far as I can see, this error message is not indicative of any real problem. Akismet is still catching spam for me. It’s either an over-enthusiastic error message, or an under-enthusiastic server that isn’t responding to my constant pings.
Sensible people will probably just ignore this message. But if you really can’t live with it (and I’m getting pretty close to unbearably annoyed myself) this is how to get rid of it.
  • Go to Plugins, Editor and select Akismet.
  • Find  :
function akismet_warning() { echo "
<div id='akismet-warning' class='updated fade'><p><strong>".__('Akismet has detected a problem.')."</strong> ".sprintf(__('A server or network problem is preventing Akismet from working correctly. <a href="%1$s">Click here for more information</a> about how to fix the problem.'), "plugins.php?page=akismet-key-config")."</p></div>
"; } 
  • Note, all those line breaks are there in the original. Change it to  
function akismet_warning() {
//echo "<div id='akismet-warning' class='updated fade'><p><strong>".__('Akismet has detected a problem.')."</strong> ".sprintf(__('A server or network problem is preventing Akismet from working correctly. <a href="%1$s">Click here for more information</a> about how to fix the problem.'), "plugins.php?page=akismet-key-config")."</p></div>";
} 
    In other words, get rid of the line breaks (or you’ll get error messages) and comment out the warning.
I’m not deleting it altogether because I’m sure that removing error messages isn’t – overall – a good idea. It’s just that this one is so very annoying and doesn’t actually mean there’s a problem.

Blog Archive