Current Status: compatible

Autoptimize is a simple but well-known plugin focused on improving the performance of a WordPress site.

Let’s look at how it works with The Events Calendar and find out what we need to do to configure the plugin so that the calendar is properly cached for the fastest loading possible.

What you need

👋 Throughout this article, we will be using both The Events Calendar and Events Calendar Pro the examples throughout this article. The entire list of folders is provided at the end of the article.

JavaScript options

Once Autoptimize is installed and activated on your site, navigate to Settings → Autoptimize from the WordPress dashboard. After that, head over to the JS, CSS & HTML sections.

Then look for the “JavaScript options” on the page.

Autoptimize Javascript options. There're a few checkbox options provided by Autoptimize and a text field labeled "Exclude scripts from Autoptimize". You should put the address of the folder where our plugins are installed on this input. On this way Autoptimize won't optimise javascripts provided by us

If the “Optimize JavaScript Code” option is checked, then head down the page to the “Exclude scripts from Autoptimize” option and insert the path where The Events Calendar is installed on the server.

Assuming you are using a standard WordPress installation, these are the paths for The Events Calendar and Events Calendar Pro:

wp-content/plugins/the-events-calendar/
wp-content/plugins/events-calendar-pro/

You can enter multiple paths in this setting, but make sure they are separated by commas. For example:

wp-content/plugins/the-events-calendar/, wp-content/plugins/events-calendar-pro/

CSS options

CSS is another asset that can be optimized and cached for better performance. For example, Autoptimize provides a number of settings to make your CSS code and files load as fast as possible. Navigate to Settings → Autoptimize from the WordPress dashboard. The first tab that we’ll use is JS, CSS & HTML. Look for the “CSS Options” section on the page.

Autoptimize CSS options. There're a few checkbox options provided by Autoptimize and a text field labeled "Exclude CSS from Autoptimize". You should put the address of the folder where our plugins are installed on this input. On this way Autoptimize won't optimise CSS provided by us

As we did with JavaScript, if the option to “Optimize CSS Code” is checked, scroll down the page to the “Exclude CSS from Autoptimize” option and insert the path where the plugins are installed. You can use the same values we used in the previous section:

wp-content/plugins/the-events-calendar/, wp-content/plugins/events-calendar-pro/

Miscellaneous options

Next is the Misc Options section, where you are able to enable the “Minify excluded CSS and JS files” option. Even if we tell Autoptimize to exclude a file when it optimizes assets, it will still minify those excluded files. It’s sort of a service they do to make sure all your code is optimized, even if it isn’t included in the compiled assets.

We generally recommend disabling that option because it can lead to unintended errors and conflicts with other code.

Misc options box provided by Autoptimize plugin.

There's a few checkboxes where we recommend uncheck "Minify excluded CSS and JS files" option.

Plugins paths

The server paths for each of our plugins are outlined below for your reference when configuring Autopimize settings for CSS and JavaScript.

Plugin NameAssets Folder
The Events Calendar/wp-content/plugins/the-events-calendar/
Events Calendar Pro/wp-content/plugins/events-calendar-pro/
Events Tickets/wp-content/plugins/event-tickets/
Events Tickets Plus/wp-content/plugins/event-tickets-plus/
Filter Bar/wp-content/plugins/the-events-calendar-filterbar/
Virtual Events/wp-content/plugins/events-virtual/
Community Events/wp-content/plugins/the-events-calendar-community-events/
Community Tickets/wp-content/plugins/the-events-calendar-community-events-tickets/
Eventbrite Tickets/wp-content/plugins/the-events-calendar-eventbrite-tickets/

To copy-paste

You can use the below to copy-paste all of our plugin folders easily.

/wp-content/plugins/the-events-calendar/,
/wp-content/plugins/events-calendar-pro/,
/wp-content/plugins/event-tickets/,
/wp-content/plugins/event-tickets-plus/,
/wp-content/plugins/the-events-calendar-filterbar/,
/wp-content/plugins/events-virtual/,
/wp-content/plugins/the-events-calendar-community-events/,
/wp-content/plugins/the-events-calendar-community-events-tickets/,
/wp-content/plugins/the-events-calendar-eventbrite-tickets/