Remove clutter from WordPress 2.5

After upgrading to WordPress 2.5 I noticed some extra tags in the HTML header of my site: an RSD link, a link to the wlwmanifest.xml and a meta tag with the name set to generator.

While the link tags were introduced in an earlier release of WordPress the meta tag came with 2.5. I’m pretty sure that the latter will cause incompatibilities with a lot of existing themes that have a line like this in their header.php:

<meta name="generator" content="WordPress 2.3.2" />
<!-- leave this for stats please -->

In this post I’d like to share my ideas about removing some clutter from your WordPress installation. Namely:

  • RSD and WLW links
  • generator tag
  • some JavaScript

Removing RSD and WLW links

Getting rid of this stuff is as easy as using the WLW Disabler plugin. After installing and activating the plugin the links are gone. That’s great.

Getting rid of the generator tag

Maybe it’s possible to write a nice plugin that removes this tag too but a quick and dirty hack is to edit the file general-template.php; you can find it in wp-includes. On line 1187 set the variable $gen to an empty string:

// ...
$gen = '';
return apply_filters("get_the_generator_{$type}", // ...

If you come up with a clean solution to this please leave a comment.
Update: I found a nice solution and wrote about it.

Living without JavaScript

Although this isn’t really related to the previous two I’d like to share this one too. I’ve disabled most of the JavaScript that comes with WordPress quite some time ago. And it works great for me: especially the admin pages load a lot faster.

Furthermore I got rid of Prototype that doesn’t play well with SmoothGallery. So, if you’re using the WordPress SmoothGallery plugin this might be something for you.

Just open the file wp-includes/script-loader.php and comment out the line saying:

$this->default_scripts();

That’s it.

Conclusion

If you don’t use Windows Live Writer and the like, using WLW Disabler should be of no harm for you. Disabling some of the JavaScript will give you a performance boost but you’ll lose some of the nifty features at the same time.

2 thoughts on “Remove clutter from WordPress 2.5”

  1. How do you comment out the line?

    With <!-- --> or /* */ or something else?

    Neither of those did it for me to disable Prototype. Can you give me an example of where to do it?

    BTW, I’m trying to do this because I want Smooth Gallery to work.

  2. Hi Jeff,
    you should find this:

    function WP_Scripts() {
      $this->default_scripts();
    }

    and you change it to this:

    function WP_Scripts() {
      #$this->default_scripts();
    }

    If you’d like to, you can read about comments in PHP here.

Comments are closed.