• 03/10/2022 • 3 phút đọc • 9 lượt xem

WordPress - How to remove meta generator tags?

Việt Lâm Coder
Việt Lâm Coder
Senior Fullstack & System Architect • Hotline: 0944.71.4545

WordPress Meta Generator Tag generates codes or tags for search engines to pick up your page titles and meta descriptions. These are HTML codes used to describe the content of a page. Meta generators are always put within the head section of the code. However, displaying the meta generator tags has security issues attached to it.

In this article, I will show you the reason behind removing the meta generator tag and how you can remove the WordPress meta generator tag real quick.

Why remove the Meta Generator Tag?


Where the Meta Generator tags do not add additional value to SEO (Search Engine Optimization). It does display the WordPress version number. Now, exposing your WordPress version number publicly makes you vulnerable to version-related attacks.

Hence, removing the meta generator tag protects you against the version-targeted attacks. Deflecting a little from the topic, I will advise that you update your WordPress core version regularly. Know that the newer versions provide better security as it generally contains security patches for known vulnerabilities. You can use the WordPress auto-update feature to update the core version.

Coming back to meta generators, I have already talked about the risks they bring, the process of removing them is talked about in the next segment.

How to remove WordPress Meta Generator Tag?


WordPress removed (from version 2.5 and onwards) meta generator tag from the Template description and added it to the core. After this change, you couldn’t remove the WordPress meta generator tag from the template files simply.

I am assuming that you are on a version >2.5, in that case, you can remove the meta generator tag as following:

1. Remove WordPress Meta Generator Tag using a plugin


To make your life easy, Astra has designed this WP Hardening Plugin using which you can remove the WordPress Meta generator with just a click.


Here is how it works:

  1. Install WP Hardening from the WordPress store.

  2. Activate it. The WP Hardening icon will reflect in the bottom left corner of your admin panel.

  3. Navigate to the “Security Fixers” tab in the plugin and just flick the toggle key next to the option “Remove Meta Generator tag.”


  4. And you are done.


In addition to removing the meta generator tag, you can use this plugin to fix several other security areas. I have listed then here:

  • Stop User enumeration

  • Change login URL

  • Disable XMLRPC

  • Disable WP API JSON

  • Disable File Editor

  • WordPress version number

  • Remove WordPress Meta Generator Tag

  • Remove WPML (WordPress Multilingual Plugin) Meta Generator Tag

  • Remove Slider Revolution Meta Generator Tag

  • Remove Visual Composer / WPBakery Page Builder Meta Generator Tag

  • Remove Version from Stylesheet

  • Remove Version from Script

  • Hide directory listing of WP includes


All this you can do with just a toggle of a button.

2. Remove WordPress Meta Generator Tag from functions.php


Another way you can remove the meta generator tag from your WordPress is by editing the function.php file. All that you have to do is add the following line of code to the functions.php of a site-specific plugin:

remove_action('wp_head', 'wp_generator');

Note: This method is recommended for coding professionals only. If you have no experience with coding or are not confident enough, do not edit files, if done wrong this may break your site.

Việt Lâm Coder

Việt Lâm Coder

Tác giả bài viết và chuyên gia quản trị website. Nếu bạn gặp khó khăn trong quá trình thực hiện hoặc có nhu cầu thiết kế website, lập trình web app Laravel, hãy liên hệ ngay với tôi qua Hotline / Zalo: 0944.71.4545.

☕ Mời Tác Giả Ly Cà Phê Ấm Lòng

Nếu bài viết này giúp ích cho công việc của bạn, hãy tiếp thêm động lực cho tác giả duy trì kho tri thức bằng một ly cà phê ấm lòng nhé!

Mã QR ủng hộ tác giả
Ngân hàng TMCP Quân Đội (MB Bank)TONG VIET LAM

Có Thể Bạn Quan Tâm

Cách Mở Tab Ẩn Danh Trên Safari MacBook Đơn Giản

Cách mở tab ẩn danh trên Safari MacBook sẽ giúp cho người dùng có thể bảo vệ quyền riêng tư và duyệt web một cách an toà...

Hướng dẫn 5 cách tắt update Windows 11 vĩnh viễn chi tiết nhất

Mặc định Windows 11 sẽ được tự động cập nhật trong nền. Tuy nhiên nếu vì lý do nào đó mà bạn không muốn nhận các bản...

Hướng dẫn trỏ file hosts cho domain trên hệ điều hành Windows

– Làm cách nào để 1 website có thể hoạt động trên Share hosting, VPS, Server mà không cần cấu hình các record DNS cho do...

Kích hoạt Cloudflare Turnstile trong Contact Form 7 chống spam

Cloudflare Turnstile là giải pháp xác thực không dùng CAPTCHA giúp bảo vệ website WordPress khỏi spam một cách nhẹ nhàng...

Cách Sử Dụng DeepSeek R1 Miễn Phí Trong Visual Studio Code Với Cline?

Hãy đối mặt với thực tế: Các trợ lý lập trình AI như GitHub Copilot thì tuyệt vời, nhưng chi phí đăng ký của chúng có th...

Gmail API – Tất cả những gì bạn cần biết - 2025

Nếu bạn đang tìm cách tích hợp Gmail vào các ứng dụng của riêng mình thì Gmail API chính là thứ bạn cần! Gmail là một lự...

Hướng dẫn tạo màn hình desktop ảo bằng Task View trên Surface Windows 11

Việt Lâm Coder sẽ hướng dẫn tạo lập nhiều màn hình desktop ảo bằng Task View trên Surface Windows 11 để sắp xếp các tác...

How to Transfer PuTTY Sessions To Another Windows Machine

his is an user contributed article. PuTTY is a terminal emulator application which can act as a client for the SSH, T...

Hướng dẫn cách kiểm tra cổng đang mở (Check open port) trên linux

Với nhiều năm kinh nghiệm hỗ trợ Khách hàng của Tenten, chúng tôi nhận thấy việc thường xuyên theo dõi kiểm tra hoạt độn...

Kiểm tra tất cả các port mà Cyber Panel đang cần có được mở hay không ?

Để kiểm tra tất cả các port cùng một lúc, bạn có thể sử dụng lệnh: netstat -tulpn | grep -E ':(8090|80|443|21|40110|401...

Hướng dẫn cài đặt KeyHelp Panel

Tóm tắt về KeyHelp Bạn đã có phần cứng tốt nhất cho các dự án Internet của mình nhưng việc quản lý phức tạp, hiệu suất...

Tổng hợp danh sách Control Panel VPS free tốt nhất hiện nay

Control Panel VPS free cung cấp một lựa chọn tuyệt vời cho những người dùng muốn quản lý VPS một cách dễ dàng và hiệ...