WordPress sürüm numarasını web sitenizden kaldırmak mı istiyorsunuz?
WPBeginner’da birçok web sitesinin WordPress güvenliğini artırmasına yardımcı olduk. WordPress sürüm numarasını web sitenizin kaynak kodunda bırakmak, onu yaygın çevrimiçi saldırılara karşı savunmasız hale getirebilir.
Bu makalede, WordPress sürüm numarasını kolayca kaldırmanın doğru yolunu göstererek sitenizi olası tehditlerden korumanıza yardımcı olacağız.
WordPress Sürüm Numarası Neden Kaldırılır?
WordPress sürüm numarasını web sitenizin kaynak kodunda görünür bırakmak, sitenizi bilgisayar korsanları için kolay bir hedef haline getirebilir. Bu küçük ayrıntı, sitenizi belirli bir sürümle ilişkili güvenlik açıklarına maruz bırakabilir ve saldırganların bilinen sorunlardan yararlanmasını kolaylaştırabilir.
Varsayılan olarak, WordPress izleme amacıyla sitenizde ayak izlerini bırakır. WordPress’in dünyanın en iyi web sitesi oluşturucusu olduğunu bu şekilde biliyoruz.
Ancak bazen, WordPress’in en güncel sürümünü çalıştırmıyorsanız bu ayak izi sitenizde bir güvenlik açığına neden olabilir. Hacker’a hangi sürümü çalıştırdığınızı söyleyerek yararlı bilgiler sağlar.
Bilgisayar korsanları genellikle belirli yazılım sürümlerindeki bilinen güvenlik açıklarını hedef alır. WordPress sürüm numaranızı gizleyerek, saldırganların sitenizin hangi WordPress sürümünü çalıştırdığını belirlemesini biraz daha zorlaştırırsınız.
Tüm web sitelerinizde WordPress’in en son sürümünü kullanmanızı öneririz, böylece bu konuda endişelenmenize gerek kalmaz. Ancak, WordPress’in eski bir sürümünü kullanıyorsanız, bu öğreticiyi kesinlikle takip etmelisiniz.
Web sitenizde hangi WordPress sürümünü kullandığınıza dair tüm izleri silmek oldukça zordur. Sofistike bir saldırı hala bu bilgileri bulabilir.
Bununla birlikte, otomatik tarayıcıların ve diğer daha az karmaşık girişimlerin WordPress sürümünüzü tahmin etmesini önleyecektir.
Bununla birlikte, WordPress web sitenizden sürüm numarasını kolayca kaldırmanın bazı yollarına bir göz atalım.
- Yöntem 1. WordPress Sürüm Bilgilerini Kod ile Kaldırma (Önerilen)
- Yöntem 2. Sucuri kullanarak WordPress Sürüm Numarasını Kaldırın
Yöntem 1. WordPress Sürüm Bilgilerini Kod ile Kaldırma (Önerilen)
Bu yöntem WordPress web sitenize kod eklemenizi gerektirir. Bunu daha önce yapmadıysanız, WordPress’te kod parçacıklarının nasıl kopyalanıp yapıştırılacağına ilişkin kılavuzumuza bakın.
Şimdi, birçok web sitesi temanızın header.php dosyasını düzenlemenizi ve aşağıdaki kod satırından kurtulmanızı önerecektir:
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
Yeni bir tema güncellemesi otomatik olarak eski şablonu yeni dosya ile değiştireceğinden bu yöntem işe yaramaz.
Yaygın olarak önerilen ancak verimsiz olan bir diğer yöntem de bu kodu temanızın functions.php dosyasına koymaktır:
remove_action('wp_head', 'wp_generator');
Bu sadece WordPress başlığındaki bilgileri kaldıracaktır. Sürüm numarası web sitenizin RSS beslemelerinde görünmeye devam edecektir.
WordPress sürüm bilgilerini kaldırmanın doğru yolu, bu bilgileri görüntülemekten sorumlu işlevi devre dışı bırakmaktır.
WordPress sürüm numaranızı hem başlık dosyanızdan hem de RSS beslemelerinden tamamen kaldırabilmeniz için aşağıdaki kodu bir kod parçacıkları eklentisine eklemeniz gerekecektir.
function wpbeginner_remove_version() {
return '';
}
add_filter('the_generator', 'wpbeginner_remove_version');
Bunu daha da kolaylaştırmak için WordPress için en iyi kod parçacıkları eklentisi olan WPCode‘u kullanabilirsiniz.
WPCode, WordPress sürüm numarasını kaldırmak için bir kod parçacığı da dahil olmak üzere en popüler WordPress kod parçacıklarının tümünü içeren yerleşik bir kod kitaplığına sahiptir.
Başlamak için ücretsiz WPCode eklentisini yüklemeniz ve etkinleştirmeniz gerekir. Adım adım talimatlar için WordPress eklentisi yükleme kılavuzumuza bakın.
Eklenti etkinleştirildikten sonra, WordPress panonuzdan Code Snippets “ Library bölümüne gidin.
Ardından, ‘WordPress Sürüm Numarasını Kaldır’ snippet’ini arayın ve ‘Snippet’i kullan’ düğmesine tıklayın.
WPCode daha sonra kodu otomatik olarak ekleyecek, kod için bir başlık ekleyecek ve doğru ekleme yöntemini ayarlayacaktır.
Düzenlemenize yardımcı olmak için etiketler bile ekleyecektir.
Tek yapmanız gereken geçişi ‘Etkin Değil’den ‘Etkin’e çevirmek.
Ardından, ‘Güncelle’ düğmesine tıklayın.
Artık WordPress sürüm numarası sitenizin ön ucundan ve RSS beslemelerinden gizlenecektir.
Yöntem 2. Sucuri kullanarak WordPress Sürüm Numarasını Kaldırın
En iyi WordPress güvenlik eklentilerinin tümü, ayarlarda WordPress sürüm numaranızı gizlemek için bir seçenek sunar.
Ancak, WordPress sürüm bilgilerini otomatik olarak gizlediği ve diğer daha gelişmiş güvenlik özellikleri sunduğu için Sucuri ‘yi kullanmanızı öneririz.
Bunun da ötesinde Sucuri, HTTP trafiğini filtreleyen ve izleyen, kötü niyetli tehditleri web sunucunuza ulaşmadan önce engelleyen bir güvenlik duvarı sağlar. Kötü amaçlı kod tespit ederse, web sitesini temizlemenize ve bu süreçte tehditleri kaldırmanıza olanak tanır.
Sucuri eklentisini kurun ve etkinleştirin. Daha fazla ayrıntı için, WordPress eklentisinin nasıl kurulacağına ilişkin adım adım kılavuzumuza bakın.
Etkinleştirmenin ardından, eklenti WordPress sürüm bilgilerini otomatik olarak gizleyecektir. Sucuri Security ” Ayarlar ‘ı ziyaret ederek ve Sertleştirme sekmesine geçerek bunu doğrulayabilirsiniz.
WPBeginner’da WordPress güvenliğini artırmak için neden Sucuri kullandığımız hakkındaki yazımız da ilginizi çekebilir.
WordPress Sürümünü Tamamen Gizleyebilir misiniz?
WordPress, sürüm bilgilerini web sitenizdeki diğer çeşitli yerlere eklemeye devam edebilir.
Örneğin, CSS ve JS dosyaları için kaynak kodunda sorgu dizesi olarak yer alır.
WordPress sürüm bilgilerinin tüm örneklerini kaldırmak zaman alıcı, karmaşık olabilir ve her zaman işe yaramayabilir.
Güvenlik açısından bakıldığında, bariz jeneratör etiketlerini kaldırmak sizi bazı çok yaygın saldırılardan koruyabilir.
Ancak, birisi web sitenize girmeye kararlıysa, WordPress sürüm numaranızı gizlemek bunu durdurmak için çok az şey yapar.
Web sitenizi daha güvenli hale getirmek için uygun bir WordPress güvenlik kurulumu yapmanız gerekir. Bu, web sitenizin etrafına güvenlik katmanları ekleyerek hacklenmesini zorlaştırır.
Ve web siteniz için en iyi WordPress barındırma sağlayıcısını seçmek istersiniz, çünkü güvensiz web barındırma hack girişimlerine karşı savunmasızdır.
Umarız bu makale WordPress sürüm numaralarını web sitenizden nasıl kolayca gizleyebileceğinizi öğrenmenize yardımcı olmuştur. Ayrıca web siteniz için nasıl ücretsiz SSL sertifikası alabileceğinize ilişkin kılavuzumuzu veya küçük işletmeler için olmazsa olmaz WordPress eklentileri listemizi de görmek isteyebilirsiniz.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Jiří Vaněk says
Sometimes it fascinates me how many details can be done, e.g. in terms of security, that I would not have thought of. So I removed the WordPress version from the website according to your instructions.
Ashkan says
function wpbeginner_remove_version()
what should we write instead of “wpbeginner” _remove_version?
a specific file name or our website name or what?
WPBeginner Support says
You do not need to change wpbeginner in the function name.
Yönetici
shamol says
code not work
WPBeginner Support says
This is to remove the version number from the HTML header, if you want to remove the text that you are using WordPress then you would want to reach out to your specific theme’s support.
Yönetici
Peter says
It worked like a charm, also for woocommerce version number
Sagar Patil says
it worked, thank you.
Abhishek says
i have added this line in functions.php, but wapplyzer can still detect the version
remove_action(‘wp_head’, ‘wp_generator’);
Ben Besselink says
Well Abhi, your code doesn’t remove the version in rss feeds.
bayu says
hy.. a practice that is still usable ? I want to ask, how to hide the plugin that we use information from view page source and various wordpress detector … thanks alot.
Ragoco says
Will this prevent WordPress from auto-detect and notify me about new versions, so that i can update? Thanks
WPBeginner Support says
No it won’t. We do not recommend you to disable updates. Keeping your WordPress site up to date protects your site from security vulnerabilities. Please see our guide on why you should always use the latest version of WordPress.
Yönetici
Marine says
Hello,
The functions.php is in my theme or in wp-includes, I have 2 files.
Tx !!
WPBeginner Support says
The functions.php file in your theme is where you can add custom codes. You should never edit files in wp-includes folder.
Yönetici
Marine says
Tx !
Waqas says
thanks. Great way to do this.
Chris Copland says
For those like me who have read this to the bottom looking for a definitive answer only to be left wanting despite all the possibilities no one has Identified a solution that works for everyone.
I suggest you load WordPress in Wamp or similar and check every possibility.
How about the editorial staff have a look remove…remove the wheat from the chaff and re-post
The Right Way To Remove WordPress Version Number?
nicmare says
why so complicated? make it easy:
// remove wp version
add_filter(‘the_generator’, ‘__return_false’);
Ted says
This doesn’t work for me.
Lencho says
If I’m using a a premium theme and the developer who keeps updating it, do I need to worry about this issue?
Nick McBurney says
What do you think to using the following in functions.php?
remove_action(‘wp_head’, ‘wp_generator’);
cantor says
this does nothing, I can still get the version number using fingerprinting….
Dan says
Maybe I’m missing something here, but adding the filter does remove the version number but fails to remove it from the end of some of the styles sheets and a few .js files as well from plugins. i.e.
….css?ver=3.8.1′ type=’text/css’ media=’all’ />
Anyway to remove those as well?
Thanks
Alys says
Hi
none of these methods work with WP 3.8/ RC2
I put the code:
function wpbeginner_remove_version() {
return ”;
}
add_filter(‘the_generator’, ‘wpbeginner_remove_version’);
in the bottom of my functions.php file. No effect.
Here is a sample of the scripts loading when I look at the source code, and you can see the wp ver is still tacked onto the end….
I tried some of the other code suggestions in this thread, and none of them worked either.
Perhaps I am doing something wrong?
Many thank in advance for your suggestions.
As you can see it is still showing at the end of each.
WPBeginner Support says
Try switching to a default theme and then try to remove generator meta tag.
Yönetici
Vinicius Silva says
thanks this really help me
Chathu says
But still Sucuri shows my WordPress version using the /wp-admin/js/common.js file.
WPBeginner Support says
You can password protect WordPress admin directory.
Yönetici
Chathu says
Yes, got it. Thank you so much.
Chathu says
Nope. It’s not working. Still sitecheck.sucuri.net show me that admin file,
Web application version:
WordPress version: WordPress
Wordpress Version 3.6.1 based on: http://www.mydomain.com//wp-admin/js/common.js
Igor says
One should also delete readme.html in the root of the website because it contains WP version number.
Madona says
There is a plugin for that. Very simple > http://wordpress.org/plugins/db-prefix-change/installation/
Dave says
That plugin doesn’t remove the version number. It changes the prefix (wp_) for the database tables.
Dave says
It should also be mentioned that if you want to hide the number, you should also get rid of the readme.html file that accompanies WordPress, as it displays the version in big giant numbers right at the top of the page. Last I read, it also hides in a JavaScript file somewhere as well, but I’m not sure which one.
Jeremy Simkins says
I use this to remove the WordPress version.
‘remove_action(‘wp_head’, ‘wp_generator’); // Remove WordPress version from site’
Travis Smith says
A cleaner way is just this:
add_filter( 'the_generator', '__return_null' );
Alex says
WHERE DO I ADD THIS add_filter( ‘the_generator’, ‘__return_null’ ); in functions.php WHERE
WHICH LINE?!
Editorial Staff says
Add it in line 1. As long as it is not part of another function, then it would work.
Yönetici
Matthew Shuey says
This is arguably on of the most useful code snippets ever. Plugins break so this is a perfect way to remove the generator meta tag from WordPress.
mrahmadawais says
Why don’t wpbeginner use it ? :p
wpbeginner says
@mrahmadawais Because we keep the most updated version running.
techispot says
Sorry to say it is not working with feed, I means it not remove version number from feed, I personally add the function you specified , it remove from my home page source but not from rss page source, you can view my rss page source it is still there http://www.techispot.com/feed
Any one find solution please share
brasofilo says
i wanted to keep the generator without the version number, so i’m returning instead of an empty string…
is this correct?
Nacin says
Removing the generator code has nothing to do with security, frankly. If someone is targeting your site in particular, there are other effective ways to determine a version number. If it’s just a malicious script, it’s going to try every exploit that has ever worked regardless of your version. Indeed, we have never seen an exploit script attempting to do version detection.
Also, the statement “While plugins are great, they somewhat slow your site down,” is a bit misleading in this context, I feel. Yes, a lot of plugins that do heavy-lifting will increase drag on a server. But a good amount of core uses the Plugin API to hook into itself, using the same methods as a plugin. And adding this code to functions.php is doing the same thing.
Roger Ruz says
“Also, the statement “While plugins are great, they somewhat slow your site down,” is a bit misleading in this context, I feel. ”
Nice argument! I’m researching on how to remove plugin scripts that are not necessary/not in use to a page but being requested every time in the server.
N1NJA says
Thanks dude worked like a charm thanks again keep up the good work
Smashing Share says
Thats really great tip. Working perfect! Thanks
topdown says
It still leaves the version in the RSS source
http://wordpress.org/?v=2.9.1
Editorial Staff says
Do you have a screenshot? Because we activated this function on a few sites and it didn’t show.
Yönetici
Chuck Reynolds says
The only thing that bothers me about this is that it leaves the line open in the header… not normally an issue but my ocd hates that part
Brian says
I was using the remove_action method. Can’t thank you enough
Ray says
Realized that the “Secure WordPress” plugin already does that for you and more. Assuming most people would be interested in securing their WordPress (not just hiding the version number), it would be better to make use of that plugin to do all these for you.
Incidentally, I got to know of the Secure WordPress plugin via wpbeginner. https://www.wpbeginner.com/wp-tutorials/11-vital-tips-and-hacks-to-protect-your-wordpress-admin-area/
Nice work guys! Keep on writing!
Editorial Staff says
While plugins are great, they somewhat slow your site down. Why use a plugin if it can be done with a simple function in your functions.php file. But yes Secure WordPress plugin does that as well on all versions older than 2.4.
Yönetici
Ray says
Would have to agree with you on that: just modding the functions.php would be more efficient than adding a plugin just to remove the version number.
Nick says
Ok, I’ve found the error.
You must add the created function in the plugin.php file and not in the function.php file.
Editorial Staff says
The whole idea for this code is so you don’t have to edit any core files. If you edit plugin.php whenever you next update WordPress it will come back.
Yönetici
Nick says
Ok the error was mine, I was modifying the wrong function.php file.
The correct one is function.php inside the theme directory and not the one in the core.
Thank you!!!
Nick says
It’s strange, it gives me the error:
Call to undefined function: add_filter()
But I’ve checked the plugin.php file and I have obviously the add_filter() funciont defined.
Any suggestion? Ths.
Editorial Staff says
Did you copy and paste the code exactly from this site? It has to be inside php tags.
Yönetici
Djolhan says
It’s a nice tips, thanks a lot ! Probably the best way to remove it !
Duncan says
Great tip! nice to see a complete fix tutorial out there.
Roseli A. Bakar says
I’m sure a lot of bloggers doesn’t know how to remove the wordpress version correctly, this post is a great help.
Cayo Medeiros aka. yogodoshi says
Will it remove only the version number or the “WordPress” name too?
Editorial Staff says
It will remove both. The entire generator code.
Yönetici