Remove Unnecessary Code From Your WordPress Blog Header

There are a few links that are included in your WordPress blog header that can be removed.

Removing unnecessary code from your page header is a good idea for the following reasons:

  1. Your important page content gets moved further up on the page
  2. You increase your content to code ratio
  3. You pages will load faster. Visitors will not notice, but search engine spiders will.

Here are a few lines that you probably will not miss:

Weblog Client Link

Example:

Are you editing your WordPress blog using your browser? Then you are not using a blog client and this link can probably be removed. This link is also used by a few 3rd party sites/programs that use the XML-RPC request formats. One example is the Flickr API. So if you start having trouble with a 3rd party service that updates your blog, add this back in. Otherwise, remove it.

To remove the EditURI/RSD link from your header, open functions.php (in your theme folder) and add this line at the bottom of the page:

 Windows Live Writer Manifest Link

Example:

[html]

If you don’t know what Windows Live Writer is (it’s another blog editing client), then remove this link.

To remove the wlwmanifest link from your header, open functions.php and add this line at the bottom of the page:

WordPress Page/Post Shortlinks

Example:

URL shortening is sometimes useful, but this automatic ugly url in your header is useless. There is no reason to keep this. None.

To remove the shortlink from your header, open functions.php and add this line at the bottom of the page:

WordPress Generator (with version information)

Example:

This announces that you are running WordPress and what version you are using. It serves no purpose.

You should always be running the latest version of WordPress. If you are living life on the edge and are a few releases behind, why advertise how vulnerable you are?

To remove WordPress Generator from your header, open functions.php and add this line at the bottom of the page:

Enjoy your slightly cleaner WordPress site header! You will sleep better at night knowing that those unnecessary lines are not bloating up your source code.

17 thoughts on “Remove Unnecessary Code From Your WordPress Blog Header

  1. The part about removing shortlinks doesn’t work anymore. For whatever reason this is information wordpress absolutely wants to appear and it’s been added to multiple core files.

  2. I have seen these removal options in Yoast Seo plugin. Does this really help to load the blog faster? And is there any side effect on SEO for this?

Leave a Reply

Your email address will not be published. Required fields are marked *