How to Remove WordPress Version Number Using cPanel

Once in a while, you may read about websites getting hacked. As you may know, 32% of the websites are powered by WordPress and still counting.

More and more hackers are targeting WordPress websites. And it's always recommended not to leave any vulnerability.

Most of the people don't realize that a hacker can hack a website by checking its WordPress version number. If you use an old version, it's possible that any hacker may inject malicious code.

The fix is to keep everything updated and hide WordPress version number so that no one can know even if you use an old version.

Not everyone is active, and it's possible they might not get a chance to update WordPress just after the launch of the latest version. So, hiding the version number is vital.

There are many tutorials on the web, but most of them offer an incomplete solution which removes the WordPress version number from the header, but not from RSS feeds.

In this tutorial, I am going to provide you with a permanent solution.

How to Edit functions.php

If someone suggests you copy and paste a code in the header.php file, it's not going to work. You need to use the legit method.

As you may already know, functions.php is the file which controls all the WordPress functions of a WordPress website. Do you know how to edit such a file?

There are two different ways; one is using FTP, another is using cPanel. A few web hosting companies don't allow FTP access, so I am going to use the cPanel method.

Note: If your WordPress theme developer is smart, they will provide you a theme with a built-in code, which hides WordPress version.

But you need to be sure. So, follow the steps.

Step 1:

Login to your cPanel account and look for the file manager icon. Most probably, you can find it under the Files' section.

How to Remove WordPress Version Number Using cPanel

The design layout may vary because every web hosting company offers a different cPanel layout. Bluehost uses blue, iPage uses green, etc.

Step 2:

Now if you see a popup to choose the directory you want to open, either choose document root or the public_html directory.

How to Remove WordPress Version Number Using cPanel

But some companies open up the home directory, from which you can click on the public_html link from the left-hand sidebar.

Step 3:

As you may know, the plugins, themes of a site are present in the wp-content folder, so open it.

How to Remove WordPress Version Number Using cPanel

Step 4:

Click on the themes folder to see all active and inactive themes. Open your active WordPress theme folder.

How to Remove WordPress Version Number Using cPanel

Step 5:

Scroll a bit, and you can find the functions.php file. Right-click and choose edit. As always, you can also use the standard Edit option from the navigation menu.

How to Remove WordPress Version Number Using cPanel

A popup appears to confirm encoding, and you need to click on the Edit button.

Step 6:

You can see a new tab in the web browser showing all the codes available in the functions.php file.

functionwp_remove_version() {
return'';
}
add_filter('the_generator', 'wp_remove_version');

Copy and paste the code in the file. Click on the Save Changes button from the top-right corner. Now if you check the source code of your site, you can't find WordPress version number.

Congrats, you have learned to hide WordPress version.

It's Easy to Remove the WordPress Version Number

Every time people start talking about WordPress being an unsafe platform, they forget that keeping a website safe is their responsibility.

There are tons of free tutorials available, which help WordPress users to harden the security level of their websites. As you can see, hiding WordPress version number isn't a big deal.

Conclusion

I hope editing the functions.php file doesn't scare you. But I would like to suggest you take the backup of your site and its database before editing anything.

Do you think you can now remove WordPress version number?

Check out these top 3 WordPress hosting services:

Was this article helpful?