1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

unused css remover for wordpress

Discussion in 'Black Hat SEO' started by Marcink99, Sep 5, 2012.

  1. Marcink99

    Marcink99 Power Member

    Aug 23, 2010
    Likes Received:
    Does anyone have or know a tool that will automatically find unused css and generate new css for wordpress?
  2. bobred

    bobred Junior Member

    Dec 21, 2011
    Likes Received:
    Whilst not quite automatic, there is a firefox add on "css-usage" that you can use to visit a few pages on your site and it will record which css is used and which isn't.. Though you need to manually delete the CSS that it marks as unused....

    Once you've cleaned up your CSS, it's a good idea to run it through an online css compressor to clean/compress it even more :)
    • Thanks Thanks x 1
  3. martha2

    martha2 Newbie

    Apr 26, 2010
    Likes Received:
    It would be difficult to remove unused CSS since it's one big file that covers many different pages (category page, post page, homepage, archives, tag page, widgets, etc.) I wouldn't recommend doing this unless you know exactly which rules will be unused.

    As bobred pointed out in previous post, use a css compressor to get rid of unnecessary spaces and new lines. If you want to clean up unused rules because of the Google speed test tool, don't worry about it. Deleting couple of lines of "unnecessary" code won't make much difference.