Service to clear css of unused classes

I’m implementing google page speed insights recommendations for my site.

I’m going to get 100/100 score. One of the recommendations is to clean css. For the years of development was a lot of changes of styles.css. How could I clear css of unused classes? Could I use online services of software? Is there any tool that will find and remove unused css classes? What is the right way to do it?

There’s a Grunt task you could use, or you could use something like PurifyCSS which works quite nicely in conjunction with Webpack.

If you’ve used neither Grunt nor webpack before, Grunt is probably the easier of the two to set up.

1 Like

Website is based on Wordpress. I don’t use nodejs.

Shouldn’t really matter.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.