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 which exist in this version.

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.

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

The right way of hiding the WordPress version - DO THIS!

 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

Hiding the WordPress version - the wrong way (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

Download the list of 101 WordPress tricks every blogger should know

101 WordPress tricks

Click here to Download Now

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!

Where are we hosted?

This site is proudly powered by FAST VPS InMotion Servers and given an insane speed thanks to MaxCDN!

Web Hosting MaxCDN - Speed up your website

Advertise on CollectiveRay.com

CollectiveRay (formerly known as DART Creations) is interested in developing partnerships with mutual benefit. If you like the stuff we publish and would like to develop a relationship, we'd be happy to hear from you. Go on - drop us a line - we'd love to hear from you :-)

New! DIVI 3.1 WordPress Template + PageBuilder

You'll surely create a perfect website with Divi 3.1!

Get an exclusive 20% OFF for CollectiveRay visitors until

Divi 3

 

The Outstanding HungryJPEG Bundles

AWESOMENESS! Bundles of premium font + graphic packs at more than 96% OFF!  Get this bundle for just $29 - This month ONLY!

The Hungry JPEG Awesome font bundles

 

Disclosure: CollectiveRay is funded personally out of pure passion for helping people working with websites. We do however generate some income through recommendations of products. This means if you click on a link and purchase an item we link to, we will receive a small sum out of that sale.

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run DronesBuy.net - a website for drone hobbyists.

David attard

Follow us on Social

Follow us on Facebook   Follow us on Google+   Subscribe to our RSS Feed   Follow us on Twitter