This WordPress tip is about hiding the WordPress version header. Imagine yourself as a hacker who wants to break into your site. A hacker's life is made really really easy if they know what version of WordPress you are using.

This is because if they know what version you are using, they can specifically try to attack your site with vulnerabilities that exist in this version. {googleads right}If they don't know the version, it would be a hit and miss attack. On the other hand, if they do know the version, they can zone in into a specific attack which is more likely to be successful.

{automatycznie}

There are two ways of hiding the WordPress version - the wrong way(s) and the right way.

If you want to prevent WordPress from getting hacked, you really need to check out this complete article. Hiding the WordPress version is not enough, and is simply a way to make it slightly harder - but not by very much. It is called security by obscurity and is a flawed way of trying to secure your WordPress.

However, brute-forcing against all versions of WordPress would still work unless you perform other steps to prevent WordPress from getting hacked.

If you're worried about your website getting hacked, you're better off opting for a WordPress security plugin such as one of the following: 10 Best Security Plugins Compared.

Hiding the WordPress version

 Add the following function to you functions.php

function dartcreations_remove_version() { return '';
} add_filter('the_generator', 'dartcreations_remove_version');

This will hide the version from all the areas of WordPress.

Alternate Way to Hide the WordPress Version

This is an alternate way to hide the version from the head and from styles and scripts:


// remove version from head remove_action('wp_head', 'wp_generator'); // remove version from rss add_filter('the_generator', '__return_empty_string'); // remove version from scripts and styles function collectiveray_remove_version_scripts_styles($src) { if (strpos($src, 'ver=')) { $src = remove_query_arg('ver', $src); } return $src; } add_filter('style_loader_src', 'collectiveray_remove_version_scripts_styles', 9999); add_filter('script_loader_src', 'collectiveray_remove_version_scripts_styles', 9999);

JESTEM H

Chcesz szybką stronę internetową?

Kogo ja oszukuję? Czyż nie wszyscy?

Dlaczego więc tak wielu z nas walczy?

Największym wyzwaniem jest zwykle znalezienie szybkiej, niezawodnej firmy hostingowej.

Wszyscy przechodziliśmy przez koszmary – wsparcie trwa wieczność lub nie rozwiązuje naszego problemu, zawsze obwiniając coś po swojej stronie… 

Ale największym problemem jest to, że witryna zawsze działa wolno.

At CollectiveRay hostujemy za pomocą hostingu InMotion, a nasza strona jest głupio szybka. Działamy na niestandardowym stosie konfiguracji serwera LightSpeed ​​na MariaDB z silnikiem PHP 7.4 i frontem przez Cloudflare. 

W połączeniu z naszymi optymalizacjami front-endu niezawodnie obsługujemy 6000 użytkowników każdego dnia, przy szczytowej liczbie 50+ jednoczesnych użytkowników. 

Chcesz uzyskać szybką konfigurację, taką jak nasza? Przenieś swoją witrynę za darmo na hosting InMotion i uzyskaj 50% ZNIŻKI na aktualne ceny.

Wypróbuj InMotion Hosting z 50% ZNIŻKĄ na CollectiveRay goście w czerwiec 2025 TYLKO!

Hosting InMotion 50% ZNIŻKI dla CollectiveRay odwiedzający

The Wrong way of Hiding the WordPress version (avoid doing this!)

The Wrong way of hiding the WordPress version will hide your version in certain areas of the site, the common areas such as the pages, but leave it exposed in other areas

Adding the following in the functions.php file - nope, don't do that

remove_action('wp_head', 'wp_generator');

Removing the following from the header.php - also a bad idea!

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

Remember - this is not the only step to ensure your WordPress security. The best way to keep your WordPress hosted is to ensure that is kept updated all the time!

Pobierz listę 101 sztuczek WordPress, które powinien znać każdy bloger

101 sztuczek WordPress

Kliknij tutaj, aby pobrać teraz