Home » Blog » Remove/Hide WordPress Version Meta Tag

Remove/Hide WordPress Version Meta Tag

Related to WordPress installation and security settings, it is a good thing to remove the WordPress version info, especially on the meta-tag. Inside your <head> and </head> you will see something like this:

<meta name="generator" content="WordPress 2.7" /> <!-– leave this for stats please -->

That line will be included by default. For the older version of WordPress, we can simply remove that line by removing a line that generates that information. Inside header.php file (in theme directory), we should see this line:

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-– leave this for stats please -->

Unfortunately, the latest WordPress does not include this in the header.php, it’s included somewhere in the core file. We can modify the core file directly to remove it, but it’s not recommended since we have to do it again when we upgrade our WordPress. Fortunately, there is a simple solution. Just put this following line inside functions.php file inside our theme directory. If there is no functions.php, we can create it.

<?php
remove_action('wp_head', 'wp_generator');
?>

That’s it? Yes, that’s it. :)

Recent blog entries

Contact us

Send your email to: hello@orangescale.com or use our handy contact form. You can write us in English or Bahasa Indonesia.

Subscribe to RSS

Get the latest updates sent to your inbox. It's free. Or, choose your own RSS reader.

Find Us

We upload many photos at Flickr. You can follow us at Twitter. For videoblog, we have orangebox.tv