Performance and monitoring
Speed up and optimise WordPress and WooCommerce step by step
A website's speed affects its sales and its ranking in Google. WordPress and WooCommerce usually slow down because of wrong settings, too many plugins or heavy themes. In this guide we go from the most basic to the most advanced, with the specific settings we recommend.
Apply the changes one at a time and, after each one, check the site (menus, forms, basket and checkout). That way you will know what has improved and what has broken something, if that happens.
To measure before and after, use PageSpeed Insights, always with the same pages: the home page, a post or category and, in shops, a product page.
WordPress and plugins up to date
Keep WordPress, the theme and all plugins up to date. As well as for security, each version brings performance improvements.
The longer you go without updating, the more likely the jump is to cause problems. Updating every week or every month, little by little, keeps the installation healthy. If an update fails, you have our daily backups to go back, and you can ask us for help to fix it. In a shop, bear in mind that restoring the database deletes any orders placed after the backup.
PHP version and OPcache
Each new version of PHP is faster than the previous one. Use the most recent one that your theme and plugins support (if they are up to date, they will normally support the latest ones).
Change it from the cPanel PHP selector or with the PHP assistant in the client area, which checks that the site still responds after the change. If something fails, go back to the previous version with one click.
In the same selector, check that the opcache extension is enabled: it stores the already compiled PHP code and avoids repeating that work on every visit.
Replace the WordPress cron
WordPress runs its scheduled tasks using visits: when someone comes in, it checks whether there are pending tasks and launches them. That slows down the unlucky visit and, on low-traffic sites, delays the tasks.
The best thing is to disable it and run the tasks with a real server cron, as we explain in disable WP-Cron to improve performance. Set up the server cron first and check that it works before disabling the WordPress one.
LiteSpeed Cache, the key piece
Each visit to WordPress runs a lot of PHP code and dozens of database queries. The cache stores the already generated page and serves it directly to the next visitor, without repeating that work. For example, the "About us" page is generated once and the following visits get it instantly and with almost no resource use.
LiteSpeed Cache is the plugin we recommend: it is developed by the same team as LiteSpeed Web Server, the web server we use, and the caching is done directly by the server. It also includes tools to optimise CSS, JavaScript, images and the database.
Use a single page cache plugin: if you have WP Rocket, W3 Total Cache, WP Super Cache or similar, disable it first.
Installation
There are two ways:
- From cPanel, with LiteSpeed Web Cache Manager, which installs and enables it on one or several sites at once.
- From WordPress, in Plugins > Add New, searching for LiteSpeed Cache (author: LiteSpeed Technologies).

Initial setup and presets
- To use image optimisation, critical CSS and VPI, LiteSpeed needs the free QUIC.cloud online services. Enable them in LiteSpeed Cache > General with the Enable QUIC.cloud services button. You do not need to use their CDN. (In older versions this step was called Request Domain Key.)
- Go to LiteSpeed Cache > Presets and apply Basic. It enables the cache and some safe optimisations in one go.
The presets configure many options at once:
- Essentials and Basic: the safest, they rarely cause problems.
- Advanced (Recommended): a middle ground that works well on most sites.
- Aggressive and Extreme: they optimise to the maximum, but can clash with some themes or plugins (lazy loading of images, JavaScript combining, deferred JavaScript).
The simplest approach is to move up one level at a time, checking the site at each one, and keep the highest one that works well. LiteSpeed saves a copy of your configuration before applying a preset and lets you restore it from the same page.

If you prefer to adjust things by hand (or start from Basic and fine-tune), these are the values we recommend.
Dashboard
The LiteSpeed Dashboard summarises the state of the cache and the optimisations. It includes the Page Load Time and the PageSpeed Score, measured from outside, so you can follow progress without leaving WordPress.

Cache
In LiteSpeed Cache > Cache:
Cache tab
- Enable Cache: ON.
- Cache Logged-in Users: ON. It stores a private cache for each logged-in user.
- Cache Commenters: ON.
- Cache REST API: ON.
- Cache Login Page: ON.
- Cache Mobile: OFF, unless your theme or a plugin shows different HTML on mobile (a responsive design is not enough). If so, ON.
TTL tab
This is the maximum time a page stays in the cache before it is regenerated. LiteSpeed automatically purges whatever changes (when you edit a post, change a product, install a plugin), so the default values, which are high, are correct. For example, Default Public Cache TTL is 604800 seconds, one week.
Purge tab
Enable Purge All On Upgrade and leave the automatic purge rules on publish as they are.
Excludes tab
If a page should not be cached (because it shows data that changes on every visit or causes problems), add its address in Do Not Cache URIs. You can also exclude by cookies, categories, tags or user roles. LiteSpeed already excludes the WooCommerce basket, checkout and My account on its own.
ESI tab
ESI lets you cache the page and leave out just one personalised fragment (for example, the mini basket or the user's name). It is powerful but requires programming knowledge: leave it disabled if you do not need it.
Object tab
This is object caching with Redis; we cover it further down in its own section.
Browser tab
Enable Browser Cache with Browser Cache TTL at 31557600 seconds (one year). The visitor's browser will store the CSS, JavaScript and images and will not download them again on every page.
Image optimisation
LiteSpeed sends the images to QUIC.cloud, which compresses them and generates WebP versions, and sends them back without you having to do anything.
In LiteSpeed Cache > Image Optimization, Image Optimization Settings tab:
- Auto Request Cron: ON.
- Optimize Original Images: ON.
- Remove Original Backups: OFF. That way you keep the originals in case you want to revert.
- Optimize Losslessly: ON. It reduces the size a little less, but the image does not lose quality.
- Preserve EXIF/XMP data: OFF.
- Next-Gen Image Format: WebP (AVIF is paid).
- WebP/AVIF For Extra srcset: ON.
Depending on how many images you have, the process takes hours or days. Follow its progress in the summary tab of the same section.
Page optimisation
In LiteSpeed Cache > Page Optimization:
CSS Settings
- CSS Minify: ON.
- CSS Combine: ON, checking that the site looks right.
- CSS Combine External and Inline: ON.
- Generate UCSS: OFF.
- UCSS Inline: OFF.
- Load CSS Asynchronously: OFF. If you want to try it, enable it and check that the site does not briefly appear without styles.
- CCSS Per URL: OFF.
- Inline CSS Async Lib: ON.
- Font Display Optimization: Default.
JS Settings
- JS Minify: ON.
- JS Combine: ON, checking that it does not break any plugin or the theme.
- JS Combine External and Inline: ON.
- Load JS Deferred: start with OFF and try Deferred. It is what improves the score the most, but also what causes the most failures (menus, sliders, cookie notices). If something fails, add the file in JS Excludes on the Tuning tab or go back to OFF.
HTML Settings
- HTML Minify: ON.
- Load Google Fonts Asynchronously: ON if your theme loads Google Fonts from Google's servers.
Media Settings
- Lazy Load Images: ON. Images further down the page load as you scroll.
- Responsive Placeholder: ON. It reserves the image's space while it loads.
VPI
Viewport Images (VPI) analyses each page and detects which images are visible without scrolling on desktop (1300×900 px) and on mobile (480×800 px). Those are excluded from lazy loading and shown instantly; the rest still wait for scrolling. It improves the LCP in PageSpeed Insights.
Enable Viewport Images and Viewport Images Cron only if you have Lazy Load Images enabled.
Media Excludes
Here you add specific images that you do not want to be lazy loaded, for example the logo or the main image on the home page.
Localization
If your site has lots of comments or a forum, enable Gravatar Cache: it stores the avatars on your server instead of requesting them from Gravatar on every visit. In Localize Resources you can do the same with external scripts such as the Google Analytics one.
Tuning
If an optimisation breaks something, this is where you exclude the specific CSS or JS files so that LiteSpeed leaves them alone, without disabling the optimisation for everything else.
Toolbox
In LiteSpeed Cache > Toolbox:
- Purge: empties the cache of a page, of the CSS/JS or of everything. If you make a change and do not see it, first purge what is affected and, if that is not enough, Purge All.
- Import / Export: if you have several sites, export the configuration from one and import it into another so you do not have to repeat the settings. Check the exclusions afterwards, as they depend on each site.
Optimise the database
The database stores everything: posts, pages, comments, plugin and theme settings. Over time it builds up revisions, drafts, spam and temporary data that make it heavier.
In LiteSpeed Cache > Database you have it all to hand:

- Clean revisions, auto drafts, trash, spam comments and expired transients.
- Optimise tables.
- Convert to InnoDB any tables still using MyISAM.
Make a backup of the database first. If you do not want to lose all revisions, in the settings tab of that section you can limit how many are kept per post.
For deeper clean-ups, there are SQL queries to purge orphaned data.
Object caching with Redis
This is the extra step that makes the difference in shops, sites with registered users or pages that cannot be cached: it keeps in memory the results of the queries WordPress repeats and avoids requesting them from the database again.
All plans include Redis. It is enabled in a few minutes by following what object caching is and how to enable it with Redis.
Optimise images
Images are usually the heaviest part of a page.
Dimensions
These are the width and height in pixels. If you upload a 2000×2000 px photo and display it at 400×400 px, the visitor's browser still downloads the 2000×2000 px one. Upload images at the size they will be displayed, resizing them first with any editor (Photoshop, GIMP, or the one in your operating system).
For those already uploaded, plugins such as Smush or Imsanity resize them in bulk to a maximum size.
File size
This is how much space the file takes up. Lossless compression greatly reduces the size without any visible difference. You have three options (use only one on the same images):
- The LiteSpeed Cache image optimisation we configured above, which also generates WebP.
- The image optimiser in the client area, which compresses the JPG and PNG files of the account, a domain or a folder.
- Desktop programs such as ImageOptim (Mac) or FileOptimizer (Windows): you download the
wp-content/uploadsfolder, process it and upload it again.
CDN for static content
A CDN is a network of servers spread around the world that keeps copies of your site's images, CSS and JavaScript and serves them from the one closest to the visitor. It is especially useful if you have visitors from several countries.
We recommend two:
- QUIC.cloud, LiteSpeed's CDN, integrated with LiteSpeed Cache: set up QUIC.cloud in WordPress.
- Cloudflare, very easy to get going by changing the domain's DNS: Cloudflare to increase performance and security. Before changing the DNS, copy all your records, including the email ones.
Check the wp_options table
The wp_options table and its autoload data are one of the most common bottlenecks and go unnoticed even by experienced administrators. You have the queries to check it in optimise the wp_options table and autoload data.
Find the plugin slowing your site down
If after all this the site is still slow, there is almost always a badly coded or faulty plugin behind it. Finding it by hand among dozens of plugins is difficult.
That is what PHP X-Ray is for: it analyses a page and tells you how much time each plugin, each SQL query and each external call takes. That way you know exactly which one is to blame.
Increase the memory limit
WordPress sets a low memory limit. Raising it does not speed up the site, but it avoids errors with demanding plugins or with WooCommerce: increase memory_limit in WordPress.
Fewer plugins, and be careful with security ones
The huge catalogue of plugins is WordPress's great advantage, and also its worst enemy for performance: we often see installations with more than 50 plugins, each adding its share of slowness.
Review each plugin and ask yourself whether you really need it. If it adds nothing for your visitors or your work, delete it.
Security plugins that scan files on every visit or in the background are among those that use the most resources, and our servers already do that work. We explain it in security plugins and WordPress: our opinion. Two-step authentication, on the other hand, is well worth keeping.
You may also find useful
- Diagnose slow LEFT JOIN queries in WordPress Analyse slow taxonomy queries with LEFT JOIN, compare plans and alternatives on a copy and avoid unm...
- How to load the reCAPTCHA script with Contact Form 7 only where it is needed Assess the cost of reCAPTCHA in Contact Form 7 and limit where it loads only after identifying every...
- Improve WordPress database performance with Index WP MySQL For Speed Assess WordPress indexes with Index WP MySQL For Speed, review the changes before applying them and...
- Optimise the wp_options table and "autoload" data SQL queries to measure the autoload data in wp_options, find the options that take up the most space...
Something wrong or out of date? Tell us and we will review it.