Optimize your static site

What you need: Simply Static Pro

The Optimize settings (under Simply Static > Optimize) bundle a set of performance features that run automatically during a push: minifying and combining files, removing render-blocking resources, optimizing images, generating critical CSS, and versioning assets. Each section works on its own, so you can turn on whatever fits your site. Here's what each one does.

Minify & Aggregation

Minify and aggregate your CSS, JavaScript, and HTML to reduce file sizes and cut down the number of requests a browser has to make.

Turn on Enable Minify & Aggregation to enable the whole section. Enabling it also minifies your HTML.

Minify

Minifying strips out whitespace, comments, and other characters that browsers don't need, which makes files smaller.

  • Minify CSS and Minify JavaScript shrink your stylesheets and scripts.
  • Exclude stylesheet URLs and Exclude JavaScript URLs let you skip specific files, one per line, if minifying one of them causes problems.
  • Protect jQuery Globals prevents the minifier from renaming the jQuery , $ , and wp  variables. Turn this on if minification breaks scripts that depend on jQuery.

Aggregate

Aggregation combines many small files into a few larger bundles, so the browser makes fewer requests.

  • Aggregate CSS combines your stylesheets into fewer bundles, grouped by media attribute and deferral status.
  • Aggregate JavaScript combines your scripts into fewer bundles, grouped by loading attributes (defer, async, delayed) and position (head or body).
  • Exclude patterns lets you keep certain files out of the bundles using glob patterns, one per line. This is useful for scripts that break when combined, such as Google Maps init scripts, payment SDKs, or anything that uses document.write() . For example: *maps* , *stripe* , *paypal* .

Defer & Delay

Eliminate render-blocking CSS and JavaScript to improve your Lighthouse scores and load speed.

Turn on Enable Defer & Delay to switch the section on, then choose what to optimize:

  • Defer Non-Critical CSS loads non-essential stylesheets asynchronously using the media="print"  pattern, so they no longer block the page from rendering.
  • Critical CSS Patterns lists the stylesheets that must stay render-blocking, so your above-the-fold styles aren't deferred. The defaults already cover common theme and block stylesheets (*/style.css , */styles.css , */global.css , */theme*.css , */wp-block-*.css ). Add your own patterns, one per line.
  • Defer Synchronous Scripts adds the defer attribute to render-blocking scripts while preserving their execution order, thereby keeping jQuery dependencies safe.
  • Optimize Google Fonts preloads Google Fonts stylesheets, adds preconnect hints, and applies display=swap  for faster font loading.
  • Delay Non-Critical JavaScript holds back third-party scripts like analytics, tag managers, and tracking pixels until the visitor interacts with the page (first click, scroll, or keypress), which reduces Total Blocking Time.
  • Additional Delay Patterns lets you delay extra scripts using glob patterns. A long list of common services is already covered out of the box, including Google (Tag Manager, Analytics, Ads, reCAPTCHA), Meta Pixel, HubSpot, Hotjar, and many more, so you only need to add patterns for anything custom, such as *example-tracking.com* .

Image Optimization

Optimize Images with ShortPixel compresses your images via the ShortPixel API to reduce their file sizes. It's off by default and requires a ShortPixel account and API key.

Critical CSS

Critical CSS generates the above-the-fold CSS for your homepage and injects it into every page, removing render-blocking stylesheets during initial paint and speeding up loading.

This feature requires Simply Static Studio, so the Enable Critical CSS Generation toggle is only available with a Studio plan.

Versioning

Versioning appends a version query string to your asset URLs, which helps browsers and CDNs fetch the newest files after you make a change (a technique often called cache busting).

  • Version CSS adds a version query string to your CSS files.
  • Version JavaScript adds a version query string to your JavaScript files.

Applying your settings

All of these optimizations run automatically during a push. Click Save Settings, then Push, and the Activity Log will show the optimization steps as they run.

One tip: aggregation, deferring, and delaying can occasionally affect how a page loads. After turning them on, push your site and test it, paying attention to interactive features and third-party widgets. If something misbehaves, use the matching exclude, critical, or delay pattern field to fine-tune rather than switching the whole feature off.