{"id":9289,"date":"2023-12-13T04:48:36","date_gmt":"2023-12-13T04:48:36","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?post_type=manual_kb&#038;p=9289"},"modified":"2025-11-22T04:47:40","modified_gmt":"2025-11-22T04:47:40","slug":"how-to-remove-wordpress-version-number","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/how-to-remove-wordpress-version-number","title":{"rendered":"How to Remove WordPress Version Number"},"content":{"rendered":"Revelling your WordPress version number to all may make you an easy target for version-targeted attacks. So in this article, I am going to show you how to remove WordPress version number.\n\nWe can remove WordPress version number in 3 ways\n\n1 By using a WordPress plugin\n\n2 <span id=\"By_editing_Generator_Meta_Tag\">By editing &#8220;Generator Meta&#8221; Tag<\/span>\n\n3 <span id=\"By_using_version_removal_function\">By using version removal function<\/span>\n\n<em><strong>Note:- Do not make any changes in any of the functions if you are not sure of what you are doing.<\/strong><\/em>\n<h2 id=\"by-using-a-wordpress-plugin\">By using a WordPress plugin<\/h2>\n<ol>\n \t<li>Login into your wordpress dashboard and go to <strong>Plugins<\/strong>.<\/li>\n<\/ol>\n<!-- \/wp:post-content --><!-- wp:image {\"align\":\"center\",\"id\":3537,\"width\":574,\"height\":606,\"sizeSlug\":\"full\",\"linkDestination\":\"none\",\"className\":\"is-style-default\"} -->\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3537 aligncenter\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/08\/image.png\" alt=\"\" width=\"574\" height=\"606\"><\/figure>\n<\/div>\n<!-- \/wp:image --><!-- wp:paragraph -->\n\n2. Click &#8220;<strong>Add New<\/strong>&#8220;, search for &#8220;<strong>WP-Hardening plugin<\/strong>&#8221; and click on <strong>Install Now<\/strong> button.\n\n<!-- \/wp:paragraph --><!-- wp:image {\"align\":\"center\",\"id\":3729,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n\n<!-- \/wp:image --><!-- wp:paragraph -->\n\n<!-- wp:image {\"align\":\"center\",\"id\":3737,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"466\" class=\"wp-image-3737 aligncenter\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/09\/Untitled.png\" alt=\"\"><\/figure>\n<\/div>\n<!-- \/wp:image -->\n\n3. Click <strong>&#8220;Activate<\/strong>&#8221; to activate the plugin.\n\n<!-- wp:image {\"align\":\"center\",\"id\":3738,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"466\" class=\"wp-image-3738 aligncenter\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/09\/Untitled-1.png\" alt=\"\"><\/figure>\n<\/div>\n<!-- \/wp:image -->\n\n<!-- \/wp:paragraph --><!-- wp:image {\"align\":\"center\",\"id\":3730,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n\n<!-- \/wp:image --><!-- wp:paragraph -->\n\n4. After activating the plugin, go to &#8220;<strong>Security Fixers&#8221; <\/strong>tab and then look for &#8220;<strong>Disable Information Disclosure &amp; Remove Meta information<\/strong>&#8221;\n\n5. Toggle the switch next to \u201c<strong>Hide version number<\/strong>\u201d and that&#8217;s all.\n\n<!-- wp:image {\"align\":\"center\",\"id\":3741,\"width\":704,\"height\":469,\"sizeSlug\":\"full\",\"linkDestination\":\"none\"} -->\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3741\" src=\"https:\/\/youstable.com\/blog\/wp-content\/uploads\/2021\/09\/1-edited-1.png\" alt=\"how to remove WordPress version number\" width=\"704\" height=\"469\" srcset=\"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/09\/1-edited-1.png 960w, https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/09\/1-edited-1-768x512.png 768w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/figure>\n<\/div>\n<!-- \/wp:image -->\n\n<!-- wp:heading -->\n<h2 id=\"by-editing-generator-meta-tag\"><strong>By editing Generator Meta Tag<\/strong><\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n\nIf you are confident of your coding skills, you can remove the WordPress number manually from the generator meta tag:\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n\n1 Login into your control panel\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n\n2 Navigate to &#8220;File Manager&#8221;.\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n\n3 Select your domain and go to its Public_html directory\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n\n4 Go to &#8220;wp-content\/themes&#8221; directory.\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n\n5 Find a file name <strong>functions.php<\/strong> under your activated theme and add the following line of code at the bottom.\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>remove_action('wp_head', 'wp_generator')<\/code><\/pre>\n<!-- \/wp:code -->\n\n<!-- wp:heading -->\n<h2 id=\"by-using-version-removal-function\"><strong>By using version removal function<\/strong><\/h2>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n\nAlternatively, we can remove the WordPress version by using &#8220;<strong>removal function&#8221;<\/strong>.\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n\nFollow the steps-1 to Steep-5 given above, edit your function.php file and paste the following code at the bottom.\n\n<code><\/code>\n\n<!-- \/wp:paragraph -->\n\n<!-- wp:code -->\n\n<!-- \/wp:code -->\n\n<!-- wp:syntaxhighlighter\/code -->\n\n<!-- \/wp:syntaxhighlighter\/code -->\n\n<!-- wp:syntaxhighlighter\/code {\"language\":\"php\"} -->\n<pre class=\"wp-block-syntaxhighlighter-code\">function remove_version_info()\n{\n  return '';\n}\nadd_filter('the_generator', 'remove_version_info');<\/pre><!-- \/wp:syntaxhighlighter\/code -->","protected":false},"excerpt":{"rendered":"<p>Revelling your WordPress version number to all may make you an easy target for version-targeted attacks. So in this article, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6880,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[],"tags":[],"class_list":["post-9289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Remove-WordPress-Version-Number-01.jpg","author_info":{"display_name":"YouStable","author_link":"https:\/\/www.youstable.com\/blog\/author\/youstable"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=9289"}],"version-history":[{"count":2,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9289\/revisions"}],"predecessor-version":[{"id":15801,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/9289\/revisions\/15801"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/6880"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=9289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=9289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=9289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}