How to Hide WordPress Version for the Security of the Site
Posted on June 6th, 2022
WordPress is a popular content management system (CMS) that helps users create and manage websites. WordPress was first released in 2003, and it has undergone continuous development. It powers some of the largest and most popular websites. WordPress is available in two versions: WordPress.com and WordPress.org. WordPress.com is a hosted service that provides users with an easy-to-use platform for creating and managing websites. WordPress.org is a self-hosted platform that gives users more control over their website’s appearance and functionality. WordPress has a rich history, and it has played an important role in the development of the internet.
WordPress enables you to create a website or blog from scratch, or to improve an existing site. Choose WordPress.com if you want an all-in-one solution that takes care of everything for you, or WordPress.org if you want more control over your site. WordPress has come a long way since its humble beginnings as a simple blogging platform. Today, WordPress is the largest self-hosted content management system (CMS) in the world, powering millions of websites and accounting for more than 37% of all sites on the web.1 While WordPress started as a simple blogging platform, it has evolved into a powerful CMS capable of powering any type of website imaginable.
Why Remove WordPress Version Details
WordPress is a great content management system that helps you easily create and manage your website. WordPress is constantly releasing new versions of its software, which provide new features and security updates. However, each new WordPress version also includes the WordPress version number in the source code. It can be a security risk, allowing attackers to check if your WordPress site is up to date easily. By hiding the WordPress version details from your website, you can make it more difficult for attackers to find out which WordPress version you are using. It will assist in protecting your site from attack.
How to Remove WordPress Version details
WordPress is a great content management system that allows you to create and manage your website or blog easily. However, WordPress also includes version information in the source code of your site, which hackers can use to exploit vulnerabilities.
There are a few simple ways to hide WordPress version details from your site. One way is to edit the functions.php file and add the following line of code: add_filter(‘the_generator,’ ‘__return_empty_string’); It will remove the WordPress version number from the source code of your site.
Another way is to edit the WordPress footer template (footer.php) and remove or comment out the line of code that displays the WordPress version number. Finally, you can install a plugin that will automatically hide WordPress version details from your site. By hiding WordPress version details, you can help to protect your site from being hacked. So, let’s learn some easy methods with the help of a step by step tutorial. We will also learn a simple way to remove WordPress versions using the plugin.
Method 1: Using Code Snippet WordPress Plugin
Code Snippet WordPress Plugin is one of the most popular plugins which is used by web developers and bloggers to improve their coding skills. It provides a wide range of features and options that help to make the code snippets more readable and efficient. The plugin also allows users to customise the code snippets according to their needs and preferences. Code Snippet WordPress Plugin is available for free and paid versions. The paid version offers more features and options than the free version. Code Snippet WordPress Plugin is compatible with all major browsers including Google Chrome, Mozilla Firefox, Opera, Safari, and Internet Explorer. Code Snippet WordPress Plugin is a must-have tool for all web developers and bloggers who want to improve their coding skills. So, follow the steps to remove WordPress version details from the WordPress websites.
Step 1: Log in to your WordPress website Admin Area Dashboard using your Username and Password.
Step 2: Then, Hover the cursor on the Plugins tab section available on the left of the screen. And then click on Add New option, as you can see in the image below.
Step 3: Find the search bar and search for Code Snippets on the next page. Here, find the right plugin from the results. You can see a reference image in the below image.
Step 4: Now, click on the Install Now button to install the plugin on your WordPress website.
Step 5: Then click on the Activate button to complete the plugin installation process, as shown in the image below.
Step 6: Firstly, let’s check the WordPress version information. To check the WordPress version through Source code, we must visit our website. To Visit the WordPress website, hover your cursor on the site name available on the left top side of the screen. Then, click on the Visit site option. You can press the CTRL + Click to open the site on the new tab.
Step 7: Then, right-click anywhere on your WordPress website page and click on the View Source Code option, as you can see in the below image. You can even press CTRL + U directly from the keyboard to use the shortcut.
Step 8: On the source code page, press CTRL + F to Run the find function. Then search for a generator. You will find some meta tags, and you can also find the WordPress version generator tag, as you can see in the below image.
Step 9: To hide this information, go back to the WordPress admin area Dashboard. And hover on the Snippets option from the left-side tab section and click on the Add New option, as you can see in the image below.
Step 10: On this page, click on the title field and enter the Name for this snippet. I used “Hide WordPress Version,” but you can select it as per your need. Then copy the below code and paste it into the next White text area, as you can see below.
function wpb_remove_version() {
return '';
}
add_filter('the_generator', 'wpb_remove_version');
Step 11: Then scroll down the page a little and find the Radio button options that allow us to apply this snippet on different pages and conditions. Select the first option as “Run snippet everywhere” this option will remove the WordPress version from the whole website. You can also apply the priority from the priority field, as you can see in the image below.
Step 12: Now, add some description about the snippet we’re creating. You can set different tags to organise the snippet easily, as you can see in the image below.
Step 13: Now click on the Save Changes and Activate button to save the snippet and apply it on your website.
Congratulations, you just successfully installed a snippet plugin which we used to remove the WordPress version information easily. Now, you can follow the steps to check the version details from the source code to confirm that this technique is working.
Method 2: Using Sucuri Security WordPress Plugin
This method is one of the fastest and quick because we just need to install a sucuri plugin on your WordPress website. The sucuri security plugin automatically removes all the WordPress version information. So, follow the steps to install the Sucuri Security plugin. But firstly let’s understand the sucuri plugin.
Sucuri Security WordPress Plugin is a plugin that provides Sucuri’s famous SiteCheck malware scanner and Sucuri blacklist checker. Sucuri Security WordPress Plugin also Sucuri’s Remote Malware Cleanup (aka Sucuri RMC) to clean up your site if it has already been hacked. Sucuri Security WordPress Plugin is the most comprehensive security solution for WordPress. Sucuri Security WordPress Plugin is free and open-source software written in PHP and licensed under the GPLv2. Sucuri Security WordPress Plugin is available from the WordPress.org plugin repository and Sucuri.net. Sucuri also offers a premium version of the Sucuri security WordPress Plugin with additional features, such as Sucuri’s proprietary scans, which are run daily, weekly, or monthly, depending on your needs. Premium users also get access to Sucuri’s expert support team if they need help cleaning up their site or fixing malware-related issues. Let’s install and see how it helps to remove the WordPress venison information from the WordPress version information.
Step 1: Log in to your WordPress website Admin Area Dashboard using your username and password.
Step 2: Then. Hover your cursor on the Plugins tab section on the left side of the screen. Then, click on the Add New option, as you can see in the image below.
Step 3: Now, Click on the search bar and search for sucuri. Then click on the Install Now button after finding the right plugin, as you can see in the image below.
Step 4: Click on the Activate button to activate the plugin.
Step 5: To check that this plugin applied the security and remove all the WordPress version information, hover your cursor on the Sucuri Security option on the left bottom side. Then click on the settings option, as you can see in the image below.
Step 6: On the settings page, click on the Hardening tab section available at the top. Within this tab section, you can see the settings already applied on the website that are available as Remove WordPress versions, as you can see in the image below.
Here, you can also check again for the WordPress version information from the source code to be ensured.
Conclusion
A secured Website is a website that has been specifically designed to protect the information of its users. This type of website uses encryption to scramble data so that the intended recipient can only decrypt it. In addition, Secured Websites often have strict access controls in place to prevent unauthorised users from accessing sensitive information. As a result, Secured Websites offer a high level of security for both individuals and organisations. While this type of website can be more difficult to set up and maintain, the added security is often worth the effort. This tutorial shows one of the ways to secure your WordPress website.