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:

Latest comments (2)

phpdev profile image
Torsten Wenzel

Both codes are the same.

Image description

texe profile image
Chris Texe • Edited on

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

Image description

We're hiring!

We're Hiring

We're looking for a Senior Full Stack Engineer to join the DEV team.

Head here to learn more.