How to remove WordPress’ Generator meta tag without a plugin

The “generator” meta tag can be removed with one simple line of PHP. Nice.

We love WordPress. A lot. It’s amazing. But we won’t to blast out to the world our WordPress version number so that spam/malware bots will quickly find us. (They’ll still find us/you and our clients, but removing the generator tag can help in not revealing key info about your site’s architecture.)

Just place this code in your theme’s functions.php file, and viola – generator meta is gone. Kapoof.

// get rid of next/previous from head section of each page. spam bots follow these.
remove_action('wp_head', 'wp_generator');

No Comments

Leave a Reply

To include code, just include it in [code] [/code] square brackets. Sweet.