DEV Community

Cover image for Remove meta generator tag from WordPress
Chris Texe
Chris Texe

Posted on

Remove meta generator tag from WordPress

Standard WordPress installation displays version of WordPress in source code:

Image description

There are some security reasons to hide or remove this information. It's better than bad guys will not see your version of WordPress.

So, if you want to remove WordPress version from <head>section put this code into functions.php file:

After saving the file, the whole tag has gone!

And maybe better cheat bad guys?

After saving the second code in the source code you will see:

<meta name="generator" content="FrontPage 4.0">

If you want more tips follow me on Twitter: @TexeChris:

Top comments (2)

Collapse
 
phpdev profile image
Torsten Wenzel

Both codes are the same.

Image description

Collapse
 
texe profile image
Chris Texe • Edited

I think it's Dev.to bug connected with displaying Github gists. Try to refresh the page:

Image description