WordPress uses the function wp_head() to add a bunch of code to the header of each page. Some of it is not absolutely necessary. This is especially true when using WordPress as a small business CMS, instead of a blog.
The code below removes the unnecessary code. Just add these to the end of your functions.php file.
This code applies to WordPress 3.0 and higher:
<?php
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
?>
This code applies to WordPress versions before 3.0:
<?php
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'adjacent_posts_rel_link');
?>

Hey thanks for this code. Does this speed up my blog?
Thanks!
Thanks for this post and code, I’ve been looking for ways to speed up my wordpress site but wasn’t sure which php codes I could remove safely