How to Remove WordPress Generator Meta Tag

WordPress meta tag basically displays the version number of wordpress and it is visible by default. WordPress version can be useful for hackers so that they can plan their attack according to the version. Thus, bloggers might want to remove the generator meta tag which shows the wordpress version.

Step 1 – View Page Source

First of all, let us see where the version is written. For that, we will have to view the page source.
Simply right click on any empty space of the site’s page and click on the “View Page Source “option.
A new page will open up containing the code of the site which runs in the backend. You will be able to see the Meta tag that displays the wordpress version.

Meta Tag

Step 2 – Go to editor

In order to remove this, log in to wordpress Administrative Dashboard through the Site Admin option.
Once there, go to the Appearance tab and click on the “Editor” option from the list.

Open Site Editor

Step 3 – Theme Functions

Once done, the theme editor page will open up. From there, click on the “Theme Functions” option available in the templates section.


Step 4 – Insert method

As a result, the theme functions editor will open up. Scroll down to the bottom of the editor and insert the method of “remove_action”. This method will remove the generator meta tag from the WordPress header.
Once you are done, click on the “update file” button in order to make the changes effective.
Now visit the site and view its page source again. The wordpress meta tag will no longer be there.

Remove Action method

And that’s it