How to hide the current WordPress version on your website – Learn WordPress from a to z

Tutorials 0 lượt xem

As the most popular and powerful CMS on the Internet, WordPress has always strived to provide a safe and comfortable system for businesses to operate their websites. To do this, the development team must always ensure the features are always updated through new versions regularly.

hide wordpress version

You should hide the version of your WordPress site due to security issues. In this article, I will show you how to manually hide your WordPress instance.

But before diving into the details, let’s understand how hackers look up your WordPress number.

How hackers can find your WordPress version

#1 View page source

see page source

Anyone can check the WordPress version by right-clicking on a website, selecting “View page source options”, and then searching for the word “builder”.

It is placed in the header section where you can see the WordPress version in the line like below:

<meta name="generator" content="WordPress 4.9.7" />

#2 Check RSS feeds

Another place that contains the version of your WordPress site is the RSS feed. To fetch the feed you can type “yourwebsite.com/feed” in your browser and get the result like below:

<generator>https://wordpress.org/?v=4.9.7</generator>

#3 Search your Readme file

The readme.html file displays your WordPress number right at the top of the page. People can go to yourwebsite.com/readme.html and can easily see it there.

Why Hide Your WordPress Version

WordPress updates to new versions often not only to improve, but also to patch old bugs.

It doesn’t matter if your version of WordPress is available to the public if you update your website regularly. However, sometimes you can forget this and it creates an opportunity for people to have bad intentions with your website.

Once hackers know your version, they can list security holes, especially when you’re running an older version website. So you need to hide the website version from everyone to avoid security risks.

One thing you should keep in mind is that including the WordPress number does not help tighten your WordPress site. But if you are visible to everyone, your website becomes an easy target for hacking.

How to manually hide WordPress version

You have 2 different ways to mask the WordPress version. Since a small change in the server can affect the entire performance of the website, it is advisable to try them only when you are confident with your coding skills.

#1 Edit the generator Meta tag

Follow these 2 steps to remove the WordPress instance from your builder meta tag:

– Login to your WordPress theme directory and find the directory /wp-content/themes/

– Add this code at the end of your WordPress theme’s functions.php file and save changes

remove_action('wp_head', 'wp_generator')

#2 Use the delete version function

Similarly, you can hide the WordPress instance by adding some code to your theme’s file. However, this code function will be slightly different from the previous function. 

– Go to your WordPress theme folder and find the folder /wp-content/themes/.

– Copy the following code and place it at the end of your WordPress theme’s function.php file.

function remove_version_info() {
return '';
}
add_filter('the_generator', 'remove_version_info');<div>
<span>1</span><span>2</span><span>3</span><span>4</span>
</div>

Epilogue

I hope these simple methods will help you to protect your WordPress website effectively.

If you find it interesting, you can follow the  WordPress basics section  to know more new knowledge.

Follow fanpage to receive the latest posts:  Group

Bài viết liên quan