How to Remove WordPress Generator Meta Tag

Secure WordPress
5/5 - (2 votes)

WordPress adds a generator meta tag to your site’s header, and that tag shows which WordPress version you run. The snippet below removes the tag from the header for security reasons.

Instructions:

Add this code to your theme’s functions.php file or to a site-specific plugin:

remove_action(‘wp_head’, ‘wp_generator’);

Note: If this is your first time adding code snippets to WordPress, take a backup first and paste the snippet carefully, so you don’t accidentally break your site.

Related articles

nslookup practical commands

Anyone who works in IT has run into a failed DNS request at least once, and it can be frustrating. In this…