Cybersalt Extensions Documentation
Guides and reference for Cybersalt's Joomla extensions
  1. You are here:  
  2. Home
  3. Extensions
  4. SiteGround Cache

Cybersalt SiteGround Cache

Cybersalt SiteGround Cache gets SiteGround's server cache working on your Joomla site. SiteGround puts a cache in front of every site it hosts. It serves stored copies of your pages without running Joomla at all, which is much faster for your visitors and much lighter on your hosting account.

Out of the box that cache almost never stores a Joomla page, for two reasons:

  • Joomla gives every visitor a session cookie. SiteGround won't store a page that sets a cookie, because the next visitor would be handed someone else's cookie.
  • Joomla marks every page "do not cache". SiteGround respects that.

That's why the SiteGround dashboard warns that fewer than 60% of your visits are served from cache. The plugin removes both obstacles on the pages every visitor sees the same way, tells SiteGround those pages can be stored, and clears the stored copies when you change your content.

New to SiteGround Cache? This page is the reference manual. For an overview of what Cybersalt SiteGround Cache does, with screenshots and the download, see its page on cybersalt.com.

Release history. This page documents the current release. For what changed in each version, see the changelog.

Requirements. Joomla 5.0 or newer (it runs natively on Joomla 5 and Joomla 6), PHP 8.1 or newer, and SiteGround hosting. The plugin talks to a service that only exists on SiteGround's servers. It installs anywhere, but on other hosts it shows a notice and does nothing.

Cybersalt SiteGround Cache is free and open source, available from cybersalt.com.

The plugin's Plugin tab: a status panel showing SiteGround Hosting Detected, Cache Daemon Reachable and Set-Cookie Suppression Stripping, above the cache settings ⤢ Click to enlarge
The status panel at the top of the Plugin tab, on a SiteGround site where everything is working.

Installing

  1. Download the zip (plg_system_sgcache_v*.zip) from cybersalt.com.
  2. In your Joomla admin go to System → Install → Extensions and upload the zip.
  3. Go to System → Manage → Plugins, search for SiteGround Cache and make sure System - Cybersalt SiteGround Cache is enabled (its status icon is green).

The plugin registers Cybersalt's update server, so new versions show up under System → Update → Extensions like any other extension. Updating keeps your settings.

Checking it works

  1. Open the plugin. The status panel at the top of the Plugin tab should show SiteGround Hosting: Detected, Cache Daemon: Reachable and Set-Cookie Suppression: Stripping. Click Run Test to check again.
  2. Open your site in a private (incognito) browser window, open the developer tools (F12) and go to the Network tab. Reload the page and click the first request in the list. Its response headers should include X-Cache-Enabled: True and no Set-Cookie.
  3. Reload once more. X-Proxy-Cache: HIT means SiteGround served the page from its cache. MISS on the first load is normal: that's the visit that filled the cache.
  4. The ratio on your SiteGround dashboard climbs over the next day or two as the cache fills.

Use the browser, not curl. Checking from a command line often gets a 403 error, because SiteGround's firewall blocks requests that don't look like a browser.

What gets cached and what doesn't

PageCached?
Ordinary pages, for visitors who aren't logged inYes
Any page for a logged-in user No, unless you turn on Cache for Logged-in Users (Advanced tab)
Pages with a Joomla form on them: contact forms, login modules, Convert Forms and so on No. The plugin spots the form's security token and leaves the page alone, so the form still submits.
Pages from an excluded component. By default these are Users, Smart Search, Contacts and PrivacyNo
Addresses listed in Excluded URLsNo
Anything other than a normal page view, such as a form being submittedNo

The plugin only tells SiteGround a page can be cached once it has checked that no cookie is left on it. If something else adds a cookie after the plugin has run, the page goes out marked as not cacheable, and the plugin logs a warning so you can find out which extension did it.

When the cache is cleared

With Auto-Purge on Content Change on (the default), the plugin clears stored pages for you:

You do thisThe plugin clears
Save or delete an articleThat article, its category page and the home page
Publish or unpublish an articleThat article and the home page
Save, delete, publish or unpublish a categoryThe home page
Save anything else Joomla treats as content, such as a module, a menu item or an item in another extensionThe home page
Save a template or a template styleEverything
Install, update or remove an extensionEverything

To clear it yourself, use the Purge SG Cache button at the top of every admin page, or Purge All Cache on the plugin's Advanced tab.

The Joomla admin header with the Purge SG Cache button beside the Joomla version ⤢ Click to enlarge
The Purge SG Cache button sits in the admin header on every page.

Settings

Plugin tab

SettingDefaultWhat it does
Enable Dynamic CacheYes Marks cacheable pages for SiteGround's cache. Turn it off and nothing is cached.
Auto-Purge on Content ChangeYes Clears the affected pages when content changes (see the table above).
Purge Threshold10 If one save would clear more than this many pages, the plugin clears everything at once instead. From 1 to 100.
Excluded URLs(empty) Addresses that should never be cached, one per line, relative to your site, for example /members-area. Use it for pages that show different content to each visitor. You don't need it for pages with forms.
Excluded ComponentsUsers, Smart Search, Contacts, Privacy Components whose pages are never cached. Pick from the list of installed components.

Toolbar tab

The Toolbar tab with Show Purge Button in Admin set to Yes and Button Mode set to Simple - Purge All ⤢ Click to enlarge
The Toolbar tab controls the Purge SG Cache button.
SettingDefaultWhat it does
Show Purge Button in AdminYes Shows the Purge SG Cache button in the admin header.
Button ModeSimple - Purge All Simple: one button that clears everything. Dropdown: the same button plus a list of your own shortcuts.
Purge Specific Path(empty) Dropdown mode only. One shortcut per line, written as Label|/path, for example Blog|/blog or News|/news.

Logs tab

The Logs tab with the inline log viewer: SiteGround Active, counts of entries, purges, warnings and errors, and a list of log entries ⤢ Click to enlarge
The log viewer shows what the plugin has been doing and lets you filter, download or clear the log.
SettingDefaultWhat it does
Enable File LoggingNo Writes cache activity to a log file in your Joomla logs folder. Useful when something isn't working; leave it off otherwise.
Verbose LoggingNo Logs every page view and why it was or wasn't cached. Turn it on only while troubleshooting: it records the address of every page visited, which can include search terms or member-only paths.
Log File / Max Log Sizesgcache.log / 5 MB The file name, and the size at which the log is rotated. The last five rotated files are kept.
Enable Debug PanelNo Shows a panel at the bottom of admin pages listing the cache operations from that page load. Only administrators see it.

Advanced tab

The Advanced tab with Vary by User Agent, Cache for Logged-in Users, Suppress Session Cookie on Cacheable Pages and the Purge All Cache button ⤢ Click to enlarge
The defaults on the Advanced tab are right for almost every site.
SettingDefaultWhat it does
Vary by User AgentNo Stores separate copies for different browsers, for sites that send mobile visitors a different page from desktop visitors.
Cache for Logged-in UsersNo Lets SiteGround cache pages for logged-in users too. Only turn this on if every user sees exactly the same content; otherwise one member could be shown another member's page.
Suppress Session Cookie on Cacheable PagesYes Removes Joomla's session cookie from pages that can be cached. Leave it on: with it off, SiteGround can't store anything.
Purge All Cache  Clears everything SiteGround has stored for this site.

Troubleshooting

SymptomCause and fix
The SiteGround dashboard still says fewer than 60% of visits come from cache Give it 24 to 48 hours, then do the header check under Checking it works. If pages show X-Cache-Enabled: False, turn on file logging and verbose logging, visit one of those pages, and look at the log: it records why the page wasn't cached.
The status panel says SiteGround Hosting: Not detected The site isn't on SiteGround, or it has moved away. The plugin can't do anything there, so it can be disabled or uninstalled.
A form says it has expired or its token is invalid Update to version 2.2.1 or newer, which leaves pages with forms uncached. If the form is loaded in a way the plugin can't see, add its page to Excluded URLs.
A change doesn't show up for visitors Click Purge SG Cache. Outside articles and categories the plugin only clears the home page, so a changed module or menu shows on other pages once their stored copy is cleared.
A visitor sees content meant for someone else Add that page to Excluded URLs straight away, and let us know which page and which extension shows the content, so we can handle it automatically.
The log shows set_cookie_not_stripped or cache_claimed_with_cookie Another extension is adding a cookie to the page. The page is left uncached, which is safe. Verbose logging shows which pages it affects.

Questions people ask

Does it replace Joomla's own cache? No. Joomla's System - Page Cache plugin stores pages inside Joomla; SiteGround's cache sits in front of the server and is faster still. You don't need Joomla's page cache as well.

Will logged-in members see stale pages? No. Logged-in users always get fresh pages unless you turn on Cache for Logged-in Users.

What happens if I move the site away from SiteGround? The plugin notices, shows a notice in the admin and stops doing anything. You can then uninstall it.

Is it made by SiteGround? No. It's an independent Joomla plugin by Cybersalt. It talks to SiteGround's cache the same way SiteGround's own WordPress plugin does.

Getting help

Questions and bug reports are welcome through the Cybersalt support form or GitHub.

You'll get the quickest answer if you include your Joomla and PHP versions, the plugin version (shown on the plugin's About tab), the address of a page that shows the problem, and, if you can, the response headers from that page.


Cybersalt SiteGround Cache is developed by Cybersalt Consulting Ltd. and released under the GNU General Public License v2 or later. SiteGround is a trademark of SiteGround; this plugin is not affiliated with or endorsed by SiteGround.

The status panel — click anywhere to closeClose × The status panel and cache settings The Purge SG Cache button — click anywhere to closeClose × The admin header with the Purge SG Cache button Toolbar tab — click anywhere to closeClose × The Toolbar tab Logs tab — click anywhere to closeClose × The Logs tab and log viewer Advanced tab — click anywhere to closeClose × The Advanced tab

Subcategories

Changelog

Main Menu

  • Home
  • Extensions A-Z
  • Guides