So WPbeginner.com released a good article that, in my opinion, needs to be shared… or at least the subject on how to remove your WP Version. By default, WordPress keeps its version number burrowed in its code… so when you view the source, you’ll be able to locate the WP version that you are running.
Most people don’t realize it, but your website quietly gives away what version of WordPress it’s running, right there in the source code. And that tiny little number can be a goldmine for hackers. If your site is running an older version of WordPress (or even just a version known to have certain vulnerabilities), bad actors can target it using automated scripts that scan for those exact setups. It’s basically like hanging a sign on your door that says, “Hey, I haven’t updated in a while!” Removing your WordPress version number doesn’t make your site bulletproof, but it definitely makes it less of a target.
Security is all about layers. Hiding your version number is one of those small but smart steps that make it harder for bots to pick you out of the crowd. The best part—it’s easy to do. You can strip that version info with a quick code snippet or a plugin, and keep your site looking clean and professional in the process. Combine this with regular updates, strong passwords, and backups, and you’ve already made your site a lot less appealing to anyone trying to mess with it. Sometimes, security is about what *isn’t* there, and in this case, that missing version number says a lot.
So, there are a few ways to do this. But the best, or correct way to do this is using the “function method.” Basically, we’re adding a function that will remove the WP version from the header and RSS feeds.
Here is WPbeginner’s code on how to remove your wp version.. Be sure to add the following to the functions.php file.
function wpbeginner_remove_version() {
return '';
}
add_filter('the_generator', 'wpbeginner_remove_version');
As always, please remember, the best way to keep your site secure is to update your blog to the latest version. Contact CRFTD if you need website troubleshooting assistance or development!