A Step-by-Step Guide Autoptimize for WordPress Site
If you have a WordPress site, chances are that you do some kind of image optimization. Maybe you use a plugin like WP Smush or TinyPNG, or maybe you just manually optimize your images before uploading them.
While image optimization is definitely important, another less talked about method for speeding up your WordPress site is autoptimization. It’s not as important as optimization, but it should be part of your overall optimization strategy.
In this article, we’ll show you how to set up autoptimize for WordPress site. We’ll also show you some of the benefits of using autoptimize and how to use it to speed up your WordPress site.
What Is Autoptimize for WordPress?
Autoptimize for WordPress site is available as a free plugin on WordPress.org as well as a paid enterprise version that offers additional functionality for developers. We’ll be using the free version of autoptimize in this article.
How to Set Up Autoptimize for WordPress site
Now that we’ve covered what autoptimize is and why you should use it, let’s show you how to set it up for your WordPress site.
You can configure autoptimize in a number of ways. These configurations can be applied site-wide, or you can configure it on a page-by-page basis.
To get started, install and activate the free version of autoptimize by going to Plugins > Add New and searching for “autoptimize.” Once you’ve activated it, go to Autoptimize > Settings to configure the plugin.
Here’s what each section of the settings page does:
In this section, you can enable or disable autoptimize, as well as set the plugin to optimize all pages or just the home page. HTML: In this section, you can enable or disable the optimization of HTML.
Autoptimize JS, CSS, and HTML Settings:
You can also configure the following settings:
Caching: This section lets you control how and where caching is applied.
Cache path: This setting specifies where autoptimize will cache HTML and assets.
Cache time: This option specifies how long the autoptimize cache will last before it’s regenerated.
To get around browser caching issues, you can also enable the “Override cache” setting. This will tell autoptimize to always generate a new cache file, regardless of whether the file has changed.
Combine only my scripts or styles: This setting specifies which files to combine in the concatenation process.
Gzip compression: This setting enables Gzip compression for your site.
Inline only my scripts and styles: This setting specifies which files to inline in the concatenation process.
Optimize CSS: This option tells autoptimize to optimize your site’s CSS files.
In the “Debugging” section, you can enable debug mode, which will show you information about the optimization process.
In the “Advanced” section, you can configure additional settings, such as:
Exclude scripts and styles from minification: This setting specifies which files will be excluded from the minification process.
Include jQuery: This setting tells autoptimize to include jQuery when concatenating files.
Minify HTML: This setting tells autoptimize to minify your site’s HTML code.
Output file: This setting specifies the filename that will be used for your site’s minified files.
Select HTML elements to cache: If you want autoptimize to generate HTML cache files for certain elements, you can specify them in this section.
Extra Optimizations in Autoptimize for WordPress site
Since the release of Autoptimize 2.3, there are a few new optimizations that you can enable. To access these options, go to Autoptimize > Settings and click on the “Extra Optimizations” tab.
In this section, you can enable or disable the following optimizations:
Remove comments from static resources: This setting tells autoptimize to remove comments from static resources.
Inline critical CSS: This setting tells autoptimize to inline critical CSS into your pages.
Preload critical static resources: This setting tells autoptimize to preload only the critical static resources.
That’s it! Now you know how to configure autoptimize to optimize your WordPress site.