Thursday, May 2, 2024
HomePHPTake away Generator Tag from WordPress Web site

Take away Generator Tag from WordPress Web site


Since you’re studying this publish, you in all probability already know that WordPress provides a meta generator tag to all web sites by default. The generator tag tells us the WordPress model getting used to generate and handle the web site content material.

All web site homeowners who use WordPress ought to positively know the model that they’re utilizing. Nevertheless, there are numerous different methods so that you can test the at the moment put in WordPress model in your web site. The issue with the meta generator tag is that it makes the WordPress model data publicly accessible.

WordPress Generator TagWordPress Generator TagWordPress Generator Tag

Somebody with malicious intentions can then use this data to take advantage of the identified vulnerabilities within the specific model. Subsequently, it is sensible to take away the generator tag out of your WordPress web sites. On this tutorial, I’ll present you precisely how one can do away with the WordPress generator tag with ease.

Eradicating the WordPress Generator Tag With no Plugin

Earlier than instantly leaping to the removing course of, let’s first attempt to perceive how the tag will get added to the WordPress supply code within the first place.

The generator tag is added to the supply with the assistance of wp_generator() perform that is known as utilizing the wp_head hook. There are numerous different capabilities referred to as behind the hook after the preliminary name to the wp_generator() perform. Nevertheless, they will not be a problem if we cease the perform name chain initially.

WordPress core information depend on the the wp_head hook to name a bunch of different capabilities. A type of capabilities is the wp_generator() perform. The road accountable for including the callback to this perform is:

Now, we will undo the impact of the add_action() name with the assistance of a remove_action() name that appears like this:

The above line needed to be added to the capabilities.php file of your theme. The WordPress generator tag will probably be faraway from any web site that makes use of the above line. Here’s a screenshot of the web page supply with this line added to my theme’s capabilities.php file:

No WordPress Generator TagNo WordPress Generator TagNo WordPress Generator Tag

Eradicating the WordPress Generator Tag With a Plugin

Identical to most different issues, you can even discover a plugin within the WordPress listing that may do away with the WordPress generator tag. Listed below are the steps that it’s essential to observe:

Seek for the Meta Generator and Model Information Remover plugin within the WordPress listing.

WP Generator Removal PluginWP Generator Removal PluginWP Generator Removal Plugin

Set up and activate the plugin.

Navigate to the Settings > Meta Generator and Model Information Remover possibility from the primary navigation in WordPress admin dashboard. It is best to see some checkbox choices just like the picture under.

WP Generator Tag Removal Plugin OptionsWP Generator Tag Removal Plugin OptionsWP Generator Tag Removal Plugin Options

They’ll all be checked by default. A test in opposition to the primary possibility titled Take away WordPress default meta generator tag will do away with the generator tag from you. There are numerous different choices accessible that take away the model data for quite a lot of plugins.

Upon getting checked the related choices, click on on the Save Adjustments button on the backside of the plugin web page.

Last Ideas

Upon getting adopted the steps listed in both of those sections, it is possible for you to to take away the generator tag out of your WordPress web site.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments