Select Page

If you want to hide the fact that your WordPress site is built on WordPress, then you need to remove the generator meta tag. WordPress by default adds a meta tag in the <head> tag of your website that looks like this:

<meta name=”generator” value=”WordPress 5.5.4″ />

It is a good idea to disable this meta tag as it tells hackers and other malicious actors that your website is built on WordPress. Or you might just want to hide this detail from websites like Builtwith that show the technologies a website is built with.

If you want to remove the generator meta tag, place this code in your theme’s functions.php file:

remove_action('wp_head', 'wp_generator');

The above code will remove the function wp_generator from running when the wp_head hook is triggered. This is the function that generates the generator meta tag and the above snippet disables it from running inside the <head> tag in your theme.