Command-Line Reference Joomla


JCH Optimize for Joomla adds its commands to Joomla's command-line application, through the Console - JCH Optimize plugin: jchoptimize:clear-expired in both editions, and jchoptimize:recache, jchoptimize:optimize-images and jchoptimize:page-experience in JCH Optimize Pro. They are mostly used from your server's CRON, to run work on a schedule. the section called “Using the Joomla CLI Application” explains how to run them.

Every command also accepts Joomla's own options, of which these are the most useful:

--live-site=URL

Your site's address. Needed when $live_site isn't set in configuration.php, because a command run from CRON can't work it out.

--quiet, -q

Prints nothing. Use it in CRON so you aren't emailed the output of every run.

--help, -h

Shows the command's options.

On WordPress, the same work runs with WP-Cron; see the section called “Delete Expired Cache on a Schedule”, the section called “Keep the Page Cache Warm with Recache”, the section called “Optimize Images Automatically” and the section called “Running It on a Schedule”.