Hide WordPress Comments

What is WordPress HTML Comment?

WordPress, along with its plugins and themes, often adds HTML comments to your website’s source code. These comments can include details about plugins and themes in use, such as names and version numbers.

<!-- This site is using Plugin XYZ v1.2.3 -->
<!-- Theme: SampleTheme v4.5 -->

While these comments are invisible to visitors, theme detectors and hackers can scan them to identify vulnerabilities or outdated software, making your site a target for attacks.

Enabling the Hide HTML Comments feature in WP Ghost can completely remove these comments from the frontend source code and make your site harder to detect or analyze.

Why Hide HTML Comments?

  • Improved Security: Prevents theme and plugin detectors from identifying the technologies used on your site.
  • Reduced Vulnerability Exposure: Hides version details that could be exploited by attackers.
  • Cleaner Source Code: Removes unnecessary comments, making your source code more compact and professional.

Hide HTML Comments

  1. Go to WP Ghost > Tweaks > Hide Options.
  2. Switch on the Hide HTML Comments option to remove the comments from the source code.
  3. Click the Save button to apply the changes.
Hide HTML Comments