LWS Optimize icon
Performance & Caching

LWS Optimize

All-in-one speed optimization: caching, WebP/AVIF, Critical CSS, lazy loading, CDN, and more. Instantly boost Core Web Vitals and site speed!

  • By Aurélien LWS
  • v4.1.7
  • Updated

Overview

LWS Optimize describes itself as: “All-in-one speed optimization: caching, WebP/AVIF, Critical CSS, lazy loading, CDN, and more. Instantly boost Core Web Vitals and site speed!”

It is active on 20,000+ WordPress sites and rated 4.6 out of 5 by 9 users on WordPress.org. Developers can extend it through 1 actions and 22 filters, listed below.

We haven't published a hands-on review of LWS Optimize yet. Want one, or need help with it? Send us a request.

How to install LWS Optimize

  1. Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
  2. Search for it. Type “LWS Optimize” and pick the one by Aurélien LWS.
  3. Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI

Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:

wp plugin install lws-optimize --activate

Requirements: WordPress 6.0+ · PHP 7.4+ · tested up to WordPress 7.1.4

Hooks & customisation

LWS Optimize 4.1.7 fires 1 actions and 22 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.

lws-optimize — top hooks
// Targeted purge for third-party integrations (Cloudflare APO, ...).
do_action( 'lwsop_purge_url', $directory, $action );

// Filter in Classes/Admin/LwsOptimizeManageAdmin.php
apply_filters( 'lws_optimize_clear_filebased_cache', $uri, "lws_optimize_clear_currentcache" );

// Filter in Classes/FileCache/LwsOptimizeAutoPurge.php
apply_filters( 'active_plugins', get_option('active_plugins') );

// Filter in Classes/Admin/LwsOptimizeManageAdmin.php
apply_filters( 'lwsop_pagespeed_api_key', (string) get_option('lws_optimize_pagespeed_api_key', '') );

// Filter in Classes/Images/LwsOptimizeImageOptimization.php
apply_filters( 'lwsop_strip_image_metadata', false, $image );

// Filter in Classes/LwsOptimize.php
apply_filters( 'wpml_current_language', null );

Browse all 23 hooks with examples →

Need LWS Optimize customised?

Tell us what you want changed, added or fixed and we'll reply with an estimate.

WP EXPERTS is independent and not affiliated with Aurélien LWS. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 17, 2026.

Alternatives in Performance & Caching

See all →

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...

7+ million installs Reviewed 178 hooks

Comprehensive image optimization with WebP, AVIF, Lazy Load, and more. Optimize images automatically for Faster Sites and Happy Visitors.

1+ million installs Reviewed 163 hooks

A very fast caching engine for WordPress that produces static html files.

1+ million installs Reviewed 42 hooks

The simplest and fastest WP Cache system

1+ million installs 22 hooks