Managing your Onyx site caching

Onyx utilises LiteSpeed load balancers and they work alongside the LiteSpeed WordPress Caching plug-in.

WordPress installations on Onyx come with the LiteSpeed caching pre-installed. If you've migrated your site to Onyx and the plug-in is not installed, or it's been removed for some reason we have a guide on reinstalling the default plug-ins and other Onyx tools.

If you've migrated your site to Onyx from elsewhere, please be sure to disable and/or remove any other caching or optimisations plug-ins as they may well interfere with your sites performance on the Onyx platform.

The cache features of Onyx can be managed from either the Onyx Dashboard, or from within your WordPress site.

Caching is not a one-click solution - to optimise a site well takes time and plenty of testing. Please ensure you test all your site's functionality thoroughly, both during and after making any caching changes to everything still works as expected.

Manage caching from the Onyx dashboard

  1. You'll need to start by logging in to your Onyx dashboard.
  2. From your Onyx dashboard, click the Manage button for the site you'd like to access.
  3. From the Settings drop-down on the left click Caching
  4. You'll now see the caching options available;
    1. Disable web caching - disables the LiteSpeed server caching for this site (does not disable any additional Optimisation/Tuning functions enabled within the LiteSpeed Cache WordPress plug-in.
    2. Purge full web cache - causes LiteSpeed to fully purge the static file cache for this site.
    3. Purge object cache - causes Redis to purge the database object cache.
If you make changes whilst the cache is disabled and then re-enable it, please be to sure to 'Purge the full web cache' to ensure you're changes are shown correctly.

Manage caching from within WordPress

  1. You'll need to start from within your WordPress dashboard, either logging in to the site directly, or by logging in to Onyx (step 1 above) and then clicking the WordPress Admin button from the bottom of the left hand menu.
  2. The cache controls within WordPress for both files and database (object cache) are handled by the LiteSpeed plug-in.

Cache Default Settings

If you re-install the plug-in using the Onyx Tools > Re-install default plug-ins - then these default settings will already be applied, if you install the LiteSpeed plug-in manually you'd need to set them yourself.

General > Caching > Enabled

Optimize > CSS HTTP/2 Push > On

Optimize > JS HTTP/2 Push > On

ESI > Enable ESI > On

Advanced > Object Cache > On - and with Redis access settings configured

Advanced > Browser Cache > On, used to cache static resources at the ADC cache

Advanced > Browser Cache TTL > 86400 (caches static objects at ADC for 1 day, a relatively short time-frame)

Settings for Redis (Advanced Tab)

Method: Redis

Host: 185.53.56.70

Port: 5407

Password: You can get this via the define('WP_REDIS_PASSWORD' line of the sites wp-config.php file, which can be accessed via File Manager, SSH or SFTP.

Suggested Additional Settings

These may further improve your sites performance, but will likely require more testing to confirm that they don't break anything. They are not set by default.

These first three settings will primarily improve performance on HTTP/1 connections - but will likely not improve over HTTP/2 where Push which is already enabled by default

Optimize > CSS Combine > On

Optimize > JS Combine > On

Optimize > Load CSS Asynchronously

The following settings may reduce the size of CSS/JS/HTML content - but should be used with caution. Some themes already minify content, and in other cases minification may also break things - please test carefully before deploying these settings on a live site

Optimize > CSS Minify > On

Optimize > JS Minify > On

Optimize > HTML Minify > On

Optimize > Inline CSS Minify > On

Optimize > Inline JS Minify > On

Optimize > Remove Comments > On

Will improve cache hit rates particularly through the CDN (Won't affect Onyx's own static content caching though)

Tuning > Remove Query Strings > On

Tuning > Load Google Fonts Asynchronously > On

Reduces the size of initial page loads, can cause issues with some styles though and may not provide as great UX when scrolling quickly on slower connections as images might not load quickly enough

Media > Lazy Load Images > On

Will increase server load and bandwidth usage, but make links within pages load more quickly when clicked.

Advanced > Instant Click > On

Advanced Configuration

Whilst the LiteSpeed plug-in will, in most cases work straight out of the box - it has a wealth of additional optimisation and tuning features.

Rather than re-invent the wheel, here's a link to the LiteSpeed documentation that runs through all the other features.


How did we do?


© onyx.io 2019