How to Use Akismet on WordPress Multisite with 1 License Key
Millions of sites depend on the Akismet service for blocking the never-ending flood of comment spam targeted at WordPress. Today we have a handy tip for WordPress multisite super admins that should save you quite a bit of time in the future.
Did you know that you can actually hard code your WordPress.com API key into your config file so that it works for your entire multisite network?
There is a little note at the top of the akismet.php file that says:
/** If you hardcode a WP.com API key here, all key config screens will be hidden */
Hiding all of the key config screens is a beautiful thing! It makes life easier for all of the admins on your network.
Here’s how to do it:
Open up your wp-config.php file. Find the line that says “That’s all, stop editing! Happy blogging.” Add this constant below and replace ‘your-key’ with your WordPress.com API key:
/** Define WordPress.com API Key */
Save it and re-upload. That’s it! So easy, right?
This keeps you from requiring each blog owner to have his own license key or having to add your key over and over again.
Please note that you still need to make sure to “Network Activate” the plugin so that it is applied to all blogs across your network.
This is one tip that you’ll want to apply to all of your multisite installations that depend on Akismet for protection from comment spam.