The WordPress Generator Tag: Remove or not?
W
WordPress shows the version number in the meta generator tag by default. IT is probably best practices to remove it for security reasons. This is very simple to do in wordpress, just add a line of code within the functions.php file in the root of your theme.
To remove meta generator tag in wordpress, follow the steps below:
- Login into your wordpress admin panel as administrator.
- Go to Appearance -> Editor and click on the file functions.php
- Go to the bottom of the page and add the following line of code before the ?> and click Update.
It goes like this :
remove_action('wp_head', 'wp_generator');
I
f you do not have functions.php file, you may create one with the content below and upload to your theme folder:
Then type the following :
<?php remove_action('wp_head', 'wp_generator'); ?>
Done, you have just removed meta generator tag in wordpress
Now clear your wordpress cache (if you have any) and visit the source of the front page to verify the existence of meta generator tag.






