Since you might be studying this publish, you most likely 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 house owners who use WordPress ought to undoubtedly know the model that they’re utilizing. Nevertheless, there are lots of different methods so that you can test the at present put in WordPress model in your web site. The issue with the meta generator tag is that it makes the WordPress model info publicly obtainable.
Somebody with malicious intentions can then use this info to use the recognized vulnerabilities within the explicit 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 eliminate the WordPress generator tag with ease.
Eradicating the WordPress Generator Tag And not using a 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()
operate that known as utilizing the wp_head
hook. There are numerous different features known as behind the hook after the preliminary name to the wp_generator()
operate. Nevertheless, they will not be a difficulty if we cease the operate name chain at first.
WordPress core information depend on the the wp_head
hook to name a bunch of different features. A kind of features is the wp_generator()
operate. The road chargeable for including the callback to this operate is:
add_action( 'wp_head', 'wp_generator');
Now, we are able to undo the impact of the add_action()
name with the assistance of a remove_action()
name that appears like this:
remove_action('wp_head', 'wp_generator');
The above line needed to be added to the features.php file of your theme. The WordPress generator tag can 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 features.php file:
Eradicating the WordPress Generator Tag With a Plugin
Identical to most different issues, it’s also possible to discover a plugin within the WordPress listing that may eliminate the WordPress generator tag. Listed here are the steps that you might want to observe:
Seek for the Meta Generator and Model Information Remover plugin within the WordPress listing.
Set up and activate the plugin.
Navigate to the Settings > Meta Generator and Model Information Remover choice from the principle navigation in WordPress admin dashboard. You must see some checkbox choices just like the picture beneath.
They’ll all be checked by default. A test in opposition to the primary choice titled Take away WordPress default meta generator tag will eliminate the generator tag from you. There are numerous different choices obtainable that take away the model info for quite a lot of plugins.
After getting checked the related choices, click on on the Save Adjustments button on the backside of the plugin web page.
Closing Ideas
After 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.