Minifying CSS and JavaScript resources
One of the easiest ways to get a faster site is to minify your files. You can think of minification as similar to reducing the margins on a Word document. You can literally get more words on the page so it takes fewer pages to print. We do that with files such as CSS, JavaScript, and HTML.
There are a few tools that can do that for us:
- WP Rocket (https://wp-rocket.me) (paid)
- W3 Total Cache (https://wordpress.org/plugins/w3-total-cache/) (free)
- Autoptimize (https://wordpress.org/plugins/autoptimize/) (free)
And there are even more than this. There are loads of options to help speed up your site. We’re going to use Autoptimize because it’s straightforward to set up and there’s lots of room to customize advanced settings once you know what you’re doing.
Setting up Autoptimize
Let’s set up Autoptimize. Perform the following steps:
- Log in to your site and navigate to Add Plugins...