How to Configure Siteground Cache and Speed Optimizer for an Astra WordPress Theme

If you’re using the Astra WordPress theme and hosting your website on Siteground, there’s a chance that you might have experienced issues with the caching configuration.

Siteground automatically installs two plugins to WordPress sites hosted on their servers. The Speed Optimizer plugin is what handles your website cache. The other one that’s automatically installed is Security Optimizer. In this article we’re going to focus on the Speed Optimizer plugin.

Oftentimes, I would check my site and everything would look fine. Then, for an unknown reason it would randomly not render properly. It seemed like there was no rhyme or reason as to why it would all of the sudden break. Maybe it was an automatic plugin or WordPress update happening in the background causing the issue? I’m not exactly sure, as I didn’t let it keep happening before I deleted the Speed Optimizer plugin altogether.

Just deleting the plugin may have solved the problem temporarily, but it seemed that the plugin would reappear — so, I ended up just disabling it and leaving it in the plugins directory. Handling the issue this way didn’t address the fact that my website’s performance would actually benefit if I had caching properly configured, but I didn’t have the time to troubleshoot and decided that I would come back to address the problem.

After reapproaching the issue and testing further, here’s how I ended up configuring my Siteground Speed Optimizer cache settings so that my site doesn’t mysteriously lose it’s styling.

tip. While editing and testing your cache settings, view your website in an Incognito or Private browser window. By viewing the site as a normal user and continually refreshing after making updates, you’ll be able to get a better understanding of how the site is loading without the Administrator Dashboard getting in the way and potentially influencing the website’s rendering behavior.

1. configure siteground server cache

Before getting into the configuration of the Speed Optimizer plugin, take a look at your Siteground hosting environment and make sure that NGINX Direct Delivery and Memcached are both turned on.

2. configure the speed optimizer plugin caching settings

Now that we know the server has NGINX Direct Delivery and Memcached enabled, we’ll want to log into the WordPress Dashboard so we can configure Siteground’s Speed Optimizer plugin.

If Speed Optimizer is not yet enabled, navigate to your Plugins, install it if it isn’t already, then activate it.

With the plugin activated, go to Speed Optimizer > Caching and disable File-Based Caching, leaving Dynamic Caching and Memcached enabled.

3. configure the speed optimizer css settings

Next, let’s go to Speed Optimizer > Frontend Optimization. Here, we’re going to turn on Minify CSS Files, as well as Combine CSS Files.

When the style.css file in my child theme was combined with everything else, I lost a lot of custom styling. By excluding style.css, it fixed the issue and allowed me to combine all of the other stylesheets. Here’s the file that I ended up excluding:

/themes/oldhamdesign/style.css

4. configure the speed optimizer javascript settings

With the CSS settings now in place, let’s take a look at the frontend Javascript settings.

Enable Minify JavaScript Files, Combine JavaScript Files, and Defer Render-blocking Javascript.

Next, I excluded three JavaScript files from Exclude from JavaScript Combination. These three files were all Spectra Blocks plugin JavaScript files. The files excluded were the following:

/plugins/ultimate-addons-for-gutenberg/lib/zip-ai/sidebar/build/sidebar-app.js
/plugins/ultimate-addons-for-gutenberg/assets/js/modal.min.js
/plugins/ultimate-addons-for-gutenberg/assets/js/spectra-block-positioning.min.js

3. configure the speed optimizer general settings

Once my JavaScript settings were updated I went into the General tab and configured my settings as shown below.

Since implementing these changes (fingers crossed), I’ve encountered no rendering issues with my website, alleviating the unexpected breaks that were previously occurring.

If you’re experiencing caching issues while using Siteground’s Speed Optimizer plugin with an Astra theme, consider adjusting the settings mentioned above. These tweaks could potentially resolve any caching issues and simultaneously enhance the speed of your website.

let's work together.

Request a quote and we'll schedule a free consultation to discuss your project and learn how I can help your business, organization, or startup.

Scroll to Top