WordPress – Remove WordPress Version Number Secure WordPress

Last updated on March 13th, 2019 at 03:44 pm

Remove WordPress Version Number

Some sites will recommend that you open your header.php file and get rid of this code:

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

Or others will recommend that you open your functions.php and add the following function:

remove_action('wp_head', 'wp_generator');

But both of these ways are offering you an incomplete solution. These ways will simply remove the WordPress version number from your head area. So if someone views your website source, they will not be able to see the version.

Hide PHP Version Number in HTTP Header

Locate the keyword expose_php and set its value to Off

nano /etc/php.ini
expose_php = off
systemctl restart httpd