How to remove unused CSS in WordPress

In this post, you will learn how to find and remove unused CSS on your WordPress website without any plugins but merely a few lines of code.


Want to get more performance optimization tipps and get notified about new tools and updates?
Then enter your email address and we will keep you up to date.


This tool uses PurifyCSS, which is a JS library made by Ilias Ismanalijev that scans your source code (HTML and JS) for used selectors and removes the unused code from your CSS files.

PurifyCSS is meant to be installed via npm and built into your build process using tools like Grunt, Gulp or Webpack. However if you're using a different development stack or building your sites with a CMS like Wordpress, you can use this online tool to clean up your stylesheet. Especially if you are using CSS frameworks like Bootstrap or a multi-purpose Wordpress theme, chances are you are actually using less than 20% of the defined CSS rules.

If you have any feedback or suggestion, please write me on Twitter:

Check out these other tools I'm working on:
JS Coverage Tool

Performs a coverage report for your JavaScript files and helps you identify unused JavaScript you might be able to remove.