Remove WordPress Version Number Without Plugin

Help others by sharing this article

Every version of WordPress has a unique version number. For example, WordPress 5.9.2 is the latest version as of this writing. In this article, we will discuss the reasons to remove WordPress version number and will look at how we do that without using any plugin.

This information can be used by hackers to find vulnerabilities in the specific version of the software you are running. In fact, it is easy to find out which version of WordPress you are running even if you do not display this information. So removing it is just an additional step to ensure security leaks.

We all know WordPress is a great CMS and it is used to run many different types of websites. But there is a big problem in WordPress CMS and it is about security.

If you think about your WordPress security then it is not only about hiding the WordPress version number, you should always update your WordPress version.

wpamit remove wordpress version number without plugin 2

Why Should Remove WordPress Version Number?

If you use WordPress to power your website, it’s important to remove the version number from your front-end code. There are a few reasons for this:

  • You can prevent security leaks if hackers find out what version of WordPress you’re running.
  • You can prevent compatibility issues with outdated plugins or themes (for example, if you’re trying to use PHP 7 but your theme is not compatible with it).
  • It just makes your site look professional and polished!

In this article, I’ll show you how to hide WordPress version number Programmatically.

Steps to Hide WordPress Version Number without Plugin

Our recommendations before editing functions.php
Take a full backup of your website or blog.
Be careful before editing the functions.php file. If you don’t want to edit functions.php directly, use the code snippet plugin.
We recommend you use a child theme before any customization on your website. You can use a plugin to create child theme.

Also check:
Change WordPress Login Logo without Plugin
Restore WordPress Classic Widget Editor
Change WordPress Admin Dashboard Footer Text

1). Login to wordpress admin Dashboard. Go to ‘Appearance’ then ‘Theme File Editor’. Select currently active theme (If already not selected).

access theme file editor
Go to Appearance then click Theme File Editor
select active theme
Choose current active theme and click on select.

2). Click on ‘Theme Functions’. It is basically the functions.php file of your WordPress website.

access theme functions or functions.php

3). Add the below code to ‘Theme Functions’ or functions.php and then click on ‘Update File’.

//remove wordpress version number
function wpamit_remove_version() {
return '';
add_filter('the_generator', 'wpamit_remove_version');

By adding this code, you will remove the WordPress version number from WordPress RSS feeds and your website’s head section.

I hope this article helped you learn how to remove WordPress version number using a snippet.

Help others by sharing this article

Leave a Reply

Your email address will not be published. Required fields are marked *