Support » Plugin: Akismet Anti-Spam » Akismet Key Config No Longer Hidden When Using WPCOM_API_KEY

  • Resolved Mike Burns


    We are in the process of upgrading our WordPress install from 3.1.4 -> 3.6.1, and updated Akismet from 2.5.6 to 2.5.9 in the process.

    We run a large multisite install, and as a result are relying on the WPCOM_API_KEY constant:

    /** If you hardcode a API key here, all key config screens will be hidden */
    if ( defined('WPCOM_API_KEY') )
    	$wpcom_api_key = constant('WPCOM_API_KEY');
    	$wpcom_api_key = '';

    It appears the comment above is no longer valid. We’re noticing after this upgrade that the Key Configuration page is still displaying the “Akismet API Key” text field with an empty value.

    This is caused by new conditional logic within akismet_conf(), and a mixture of methods to retrieve the API key — get_option( 'wordpress_api_key' ) vs. akismet_get_key().

    Any chance this function can be revisited? We don’t want site admin seeing that field.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Sadly, this has been a known and reported issue for a long time (several months). I’ve pointed it out to listed developers, and there are multiple forum posts about it.


    Having the same problem here.

    Is there any update to this or a known work around?

    Has anyone figured out where to hardcode in the Akismet key on a multisite install? Is it even possible anymore?

    I wonder if it goes here, in akismet/wrapper.php …

    $wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : 'DOES-KEY-GO-HERE?';

    Any thoughts are greatly appreciated. Thank you!

    PS: I ask because I read in another topic that this wp-config edit no longer works…

    /** Define API Key */


    This seems resolved / working in 3.0.2 – can anyone else confirm or say otherwise?

    Plugin Contributor Greg Stewart


    Marking as resolved, unless someone is still having issues.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Akismet Key Config No Longer Hidden When Using WPCOM_API_KEY’ is closed to new replies.